### NodeJS Request for Physical Compatibility Source: https://developers.divineapi.com/western-api/synastry/physical-compatibility This NodeJS example demonstrates how to make a POST request using the 'request' library to calculate physical compatibility. Ensure the 'request' library is installed. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-4.divineapi.com/western-api/v2/synastry/physical-compatibility', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'p1_full_name': 'Rahul Kumar', 'p1_day': '24', 'p1_month': '05', 'p1_year': '1998', 'p1_hour': '14', 'p1_min': '40', 'p1_sec': '43', 'p1_gender': 'male', 'p1_place': 'New Delhi', 'p1_lat': '28.7041', 'p1_lon': '77.1025', 'p1_tzone': '5.5', 'p2_full_name': 'Simran Kumari', 'p2_day': '24', 'p2_month': '05', 'p2_year': '1998', 'p2_hour': '14', 'p2_min': '40', 'p2_sec': '43', 'p2_gender': 'female', 'p2_place': 'New Delhi', 'p2_lat': '28.7041', 'p2_lon': '77.1025', 'p2_tzone': '5.5', 'lan': 'en' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Get Synastry Planetary Positions via NodeJS Source: https://developers.divineapi.com/western-api/synastry/planetary-positions This NodeJS example uses the 'request' library to make a POST request for synastry planetary positions. It includes setting up request options with headers and form data. Ensure the 'request' library is installed (`npm install request`). ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-4.divineapi.com/western-api/v1/synastry/planetary-positions', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'p1_full_name': 'Rahul Kumar', 'p1_day': '24', 'p1_month': '05', 'p1_year': '1998', 'p1_hour': '14', 'p1_min': '40', 'p1_sec': '43', 'p1_gender': 'male', 'p1_place': 'New Delhi', 'p1_lat': '28.7041', 'p1_lon': '77.1025', 'p1_tzone': '5.5', 'p2_full_name': 'Simran Kumari', 'p2_day': '24', 'p2_month': '05', 'p2_year': '1998', 'p2_hour': '14', 'p2_min': '40', 'p2_sec': '43', 'p2_gender': 'female', 'p2_place': 'New Delhi', 'p2_lat': '28.7041', 'p2_lon': '77.1025', 'p2_tzone': '5.5', 'lan': 'en' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Get Synastry Planetary Positions via Python Source: https://developers.divineapi.com/western-api/synastry/planetary-positions This Python example uses the 'requests' library to perform a POST request for synastry planetary positions. It defines the URL, payload with all necessary birth data, and headers, then sends the request and prints the response text. Ensure the 'requests' library is installed (`pip install requests`). ```python import requests url = "https://astroapi-4.divineapi.com/western-api/v1/synastry/planetary-positions" payload = {'api_key': '{Your API Key}', 'p1_full_name': 'Rahul Kumar', 'p1_day': '24', 'p1_month': '05', 'p1_year': '1998', 'p1_hour': '14', 'p1_min': '40', 'p1_sec': '43', 'p1_gender': 'male', 'p1_place': 'New Delhi', 'p1_lat': '28.7041', 'p1_lon': '77.1025', 'p1_tzone': '5.5', 'p2_full_name': 'Simran Kumari', 'p2_day': '24', 'p2_month': '05', 'p2_year': '1998', 'p2_hour': '14', 'p2_min': '40', 'p2_sec': '43', 'p2_gender': 'female', 'p2_place': 'New Delhi', 'p2_lat': '28.7041', 'p2_lon': '77.1025', 'p2_tzone': '5.5', 'lan': 'en'} headers = { 'Authorization': 'Bearer {Your Auth Token}' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` -------------------------------- ### Generate Kundali PDF using NodeJS Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-prakash This NodeJS example demonstrates how to make a POST request using the 'request' library to generate a Kundali PDF. It includes all necessary form data and headers. Ensure the 'request' library is installed (`npm install request`). ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://pdf.divineapi.com/indian-api/v2/kundali-prakash', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'full_name': 'Rahul Kumar', 'day': '24', 'month': '05', 'year': '2023', 'hour': '14', 'min': '40', 'sec': '43', 'gender': 'male', 'place': 'New Delhi, India', 'lat': '28.7041', 'lon': '77.1025', 'tzone': '5.5', 'lan': 'en', 'company_name': 'DivineAPI', 'company_url': 'https://divineapi.com/', 'company_email': 'admin@divineapi.com', 'company_mobile': '+91 212 1212 12', 'company_bio': 'Discover the best Horoscope API and Tarot API services at Divineapi.com. They offer Daily\nHoroscope API for all twelve zodiac signs, along with Indian astrology services like\nPanchang, Kundali, and Kundali Matching. Check out their website for more information\nand enjoy accurate and engaging astrology insights for your audience!', 'logo_url': 'https://divineapi.com/assets/logo.png', 'footer_text': 'DivineAPI' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Get Planet Returns List using NodeJS Source: https://developers.divineapi.com/western-api/planet-returns/planet-returns-list This NodeJS example demonstrates how to use the 'request' library to send a POST request for planet returns data. It includes setting headers and form data. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-8.divineapi.com/western-api/v1/planet-returns-list', 'headers': { 'Authorization': 'Bearer your API Access Token' }, formData: { 'api_key': 'your API Key', 'planet': 'Moon', 'full_name': 'Rahul Kumar', 'day': '24', 'month': '5', 'year': '2023', 'hour': '14', 'min': '40', 'sec': '43', 'gender': 'male', 'place': 'New Delhi', 'lat': '28.7041', 'lon': '77.1025', 'tzone': '5.5', 'lan': 'en', 'return_year': '2024', 'return_lat': '19.0760', 'return_lon': '72.8774', 'return_tzone': '5.5', 'return_place': 'Mumbai, Maharashtra, India', 'house_system': 'P' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### NodeJS Request for Synastry Contrasting Aspect Reading Source: https://developers.divineapi.com/western-api/synastry/contrasting-aspect-reading This NodeJS example demonstrates how to make a POST request using the 'request' library to get a synastry contrasting aspect reading. Ensure the 'request' library is installed and your authentication tokens are correctly set. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-4.divineapi.com/western-api/v1/synastry/contrasting-aspect-reading', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'p1_full_name': 'Rahul Kumar', 'p1_day': '24', 'p1_month': '05', 'p1_year': '1998', 'p1_hour': '14', 'p1_min': '40', 'p1_sec': '43', 'p1_gender': 'male', 'p1_place': 'New Delhi', 'p1_lat': '28.7041', 'p1_lon': '77.1025', 'p1_tzone': '5.5', 'p2_full_name': 'Simran Kumari', 'p2_day': '24', 'p2_month': '05', 'p2_year': '1998', 'p2_hour': '14', 'p2_min': '40', 'p2_sec': '43', 'p2_gender': 'female', 'p2_place': 'New Delhi', 'p2_lat': '28.7041', 'p2_lon': '77.1025', 'p2_tzone': '5.5', 'lan': 'en' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Integrate Loshu Grid API with NodeJS Source: https://developers.divineapi.com/numerology-apis/chaldean-numerology/loshu-grid-api Example implementation for calling the Loshu Grid API using NodeJS. Ensure you have the 'request' library installed. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-7.divineapi.com/numerology/v1/loshu-grid', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'day': '24', 'month': '05', 'year': '2023', 'fname': 'Rahul', 'lname': 'Kumar', 'lan': 'en' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Get Yearly Prediction with Python Source: https://developers.divineapi.com/numerology-apis/chaldean-numerology/yearly-prediction This Python example uses the 'requests' library to make a POST request for yearly predictions. Ensure you have the 'requests' library installed (`pip install requests`). ```python import requests url = "https://astroapi-7.divineapi.com/numerology/v1/yearly-prediction" payload = {'api_key': '{Your API Key}', 'day': '24', 'month': '05', 'year': '2023', 'fname': 'Rahul', 'lname': 'Kumar', 'lan': 'en'} headers = { 'Authorization': 'Bearer {Your Auth Token}' } response = requests.request("POST", url, headers=headers, data=payload,) print(response.text) ``` -------------------------------- ### Fetch Composite Planetary Positions with NodeJS Source: https://developers.divineapi.com/western-api/composite-chart/planetary-positions This NodeJS example demonstrates how to make a POST request using the 'request' library to get composite planetary positions. It includes setting up headers and form data. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-8.divineapi.com/western-api/v1/composite/planetary-positions', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'p1_full_name': 'Rahul Kumar', 'p1_day': '24', 'p1_month': '05', 'p1_year': '1998', 'p1_hour': '14', 'p1_min': '40', 'p1_sec': '43', 'p1_gender': 'male', 'p1_place': 'New Delhi', 'p1_lat': '28.7041', 'p1_lon': '77.1025', 'p1_tzone': '5.5', 'p2_full_name': 'Simran Kumari', 'p2_day': '24', 'p2_month': '05', 'p2_year': '1998', 'p2_hour': '14', 'p2_min': '40', 'p2_sec': '43', 'p2_gender': 'female', 'p2_place': 'New Delhi', 'p2_lat': '28.7041', 'p2_lon': '77.1025', 'p2_tzone': '5.5', 'lan': 'en' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Make a Daily Transit Request using NodeJS Source: https://developers.divineapi.com/western-api/transit/daily-transit This NodeJS example demonstrates how to make a POST request to the Daily Transit API using the 'request' library. Remember to install the library and replace placeholders with your credentials. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-4.divineapi.com/western-api/v1/transit/daily', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'full_name': 'Test', 'day': '24', 'month': '05', 'year': '2023', 'hour': '14', 'min': '40', 'sec': '43', 'gender': 'male', 'place': 'New Delhi', 'lat': '28.7041', 'lon': '77.1025', 'tzone': '5.5', 'lan': 'en' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Make a Weekly Transit Request using NodeJS Source: https://developers.divineapi.com/western-api/transit/weekly-transit This NodeJS example demonstrates how to make a POST request to the weekly transit API using the 'request' library. Remember to install the library and replace the placeholder values for authentication and API key. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-4.divineapi.com/western-api/v1/transit/weekly', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'full_name': 'Test', 'day': '24', 'month': '05', 'year': '2023', 'hour': '14', 'min': '40', 'sec': '43', 'gender': 'male', 'place': 'New Delhi', 'lat': '28.7041', 'lon': '77.1025', 'tzone': '5.5', 'lan': 'en', 'transit_planet': 'Moon' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Generate Ascendant Report with NodeJS Source: https://developers.divineapi.com/western-api/natal-astrology/ascendant-report This NodeJS example uses the 'request' library to make a POST request for the ascendant report. It includes all necessary parameters and headers. Make sure to install the 'request' package. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://astroapi-4.divineapi.com/western-api/v2/ascendant-report', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'full_name': 'Rahul Kumar', 'day': '24', 'month': '05', 'year': '2023', 'hour': '14', 'min': '40', 'sec': '43', 'gender': 'male', 'place': 'New Delhi, India', 'lat': '28.7041', 'lon': '77.1025', 'tzone': '5.5', 'house_system': 'P' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Python Example for Kundali PDF Ananta Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-ananta Generate Kundali PDF Ananta reports using Python. This example demonstrates making a POST request with the 'requests' library. ```python import requests import json api_key = 'YOUR_API_KEY' url = 'https://api.divineapi.com/v1/reports/kundali-pdf-ananta' headers = { 'Authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' } payload = { 'name': 'Rohit Kumar', 'dob': '1990-01-01T10:00:00Z', 'pob': 'New Delhi', 'tob': '10:00:00' } try: response = requests.post(url, headers=headers, data=json.dumps(payload)) response.raise_for_status() # Raise an exception for bad status codes print('Kundali generated successfully:', response.json()) except requests.exceptions.RequestException as e: print(f'Error generating Kundali: {e}') ``` -------------------------------- ### NodeJS Example for Kundali PDF Ananta Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-ananta Integrate Kundali PDF Ananta generation into your NodeJS application. This example uses the 'axios' library for making HTTP requests. ```javascript const axios = require('axios'); const generateKundali = async () => { try { const response = await axios.post('https://api.divineapi.com/v1/reports/kundali-pdf-ananta', { name: 'Rohit Kumar', dob: '1990-01-01T10:00:00Z', pob: 'New Delhi', tob: '10:00:00' }, { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } }); console.log('Kundali generated successfully:', response.data); } catch (error) { console.error('Error generating Kundali:', error.response ? error.response.data : error.message); } }; generateKundali(); ``` -------------------------------- ### cURL Example for Kundali PDF Ananta Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-ananta Use this cURL command to generate a Kundali PDF Ananta report. Ensure you have the correct API endpoint and parameters. ```bash curl -X POST https://api.divineapi.com/v1/reports/kundali-pdf-ananta \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Rohit Kumar", "dob": "1990-01-01T10:00:00Z", "pob": "New Delhi", "tob": "10:00:00" }' ``` -------------------------------- ### Generate Kundali PDF using NodeJS Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-ananta This NodeJS example demonstrates how to make a POST request to the Kundali Ananta API using the 'request' library. It includes setting up the request options with headers and form data, including API keys, birth details, and company information. Error handling is included. ```javascript var request = require('request'); var options = { 'method': 'POST', 'url': 'https://pdf.divineapi.com/indian-api/v2/kundali-ananta', 'headers': { 'Authorization': 'Bearer {Your Auth Token}' }, formData: { 'api_key': '{Your API Key}', 'full_name': 'Rahul Kumar', 'day': '24', 'month': '05', 'year': '2023', 'hour': '14', 'min': '40', 'sec': '43', 'gender': 'male', 'place': 'New Delhi, India', 'lat': '28.7041', 'lon': '77.1025', 'tzone': '5.5', 'lan': 'en', 'company_name': 'DivineAPI', 'company_url': 'https://divineapi.com/', 'company_email': 'admin@divineapi.com', 'company_mobile': '+91 212 1212 12', 'company_bio': 'Discover the best Horoscope API and Tarot API services at Divineapi.com. They offer Daily Horoscope API for all twelve zodiac signs, along with Indian astrology services like Panchang, Kundali, and Kundali Matching. Check out their website for more information and enjoy accurate and engaging astrology insights for your audience!', 'logo_url': 'https://divineapi.com/assets/logo.png', 'footer_text': 'DivineAPI' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` -------------------------------- ### Customize Natal Wheel Chart with API Parameters Source: https://developers.divineapi.com/western-api/natal-astrology/natal-wheel-chart This example demonstrates how to configure a natal wheel chart by specifying various parameters such as house system, aspect types, colors, and graphic layout. Ensure color values are in valid hex format. ```python 'house_system': 'P', 'node_type': 'meannode', 'aspect_orbs_type': 'FIXED', 'aspect_orbs_value': '5_30', 'aspects_type': 'ALL', 'planet_aspects': 'ASPECTS_INNER_CIRCLE', 'graphic_layout': 'INNER_V1_HOUSE_CUSPS_PLANETS_DEGREES_SIGNS', 'degrees_color': 'COLORED_BY_SIGN', 'planet_glyphs': 'COLORED_SMALL', 'main_background': '#ffffff', 'sign_background': '#f0f0f0', 'house_background': '#e0e0e0', 'house_text_color': '#333333', 'aspect_background': '#d0d0d0', 'lines_color': '#000', 'sign_element_air_color': '#60a5fa', 'sign_element_fire_color': '#f87171', 'sign_element_water_color': '#38bdf8', 'sign_element_earth_color': '#a3e635' ``` -------------------------------- ### Generate Kundali PDF using JavaScript (jQuery AJAX) Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-prakash This JavaScript example uses jQuery AJAX to send a POST request for generating a Kundali PDF. It constructs the request using `FormData` and `$.ajax` settings. Ensure jQuery is included in your project. ```javascript var form = new FormData(); form.append("api_key", "{Your API Key}"); form.append("full_name", "Rahul Kumar"); form.append("day", "24"); form.append("month", "05"); form.append("year", "2023"); form.append("hour", "14"); form.append("min", "40"); form.append("sec", "43"); form.append("gender", "male"); form.append("place", "New Delhi, India"); form.append("lat", "28.7041"); form.append("lon", "77.1025"); form.append("tzone", "5.5"); form.append("lan", "en"); form.append("company_name", "DivineAPI"); form.append("company_url", "https://divineapi.com/"); form.append("company_email", "admin@divineapi.com"); form.append("company_mobile", "+91 212 1212 12"); form.append("company_bio", "Discover the best Horoscope API and Tarot API services at Divineapi.com. They offer Daily Horoscope API for all twelve zodiac signs, along with Indian astrology services like Panchang, Kundali, and Kundali Matching. Check out their website for more information and enjoy accurate and engaging astrology insights for your audience!"); form.append("logo_url", "https://divineapi.com/assets/logo.png"); form.append("footer_text", "DivineAPI"); var settings = { "url": "https://pdf.divineapi.com/indian-api/v2/kundali-prakash", "method": "POST", "timeout": 0, "headers": { "Authorization": "Bearer {Your Auth Token}" }, "processData": false, "mimeType": "multipart/form-data", "contentType": false, "data": form }; $.ajax(settings).done(function (response) { console.log(response); }); ``` -------------------------------- ### JavaScript (jQuery AJAX) Example for Kundali PDF Ananta Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-ananta Implement Kundali PDF Ananta report generation in your web application using jQuery AJAX. This snippet shows how to send a POST request. ```javascript $.ajax({ url: 'https://api.divineapi.com/v1/reports/kundali-pdf-ananta', method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, data: JSON.stringify({ name: 'Rohit Kumar', dob: '1990-01-01T10:00:00Z', pob: 'New Delhi', tob: '10:00:00' }), success: function(response) { console.log('Kundali generated successfully:', response); }, error: function(error) { console.error('Error generating Kundali:', error.responseJSON || error.responseText); } }); ``` -------------------------------- ### Generate Kundali PDF using JavaScript (jQuery AJAX) Source: https://developers.divineapi.com/pdf-report-api/vedic-reports/kundali-pdf-ananta This JavaScript example uses jQuery AJAX to send a POST request to the Kundali Ananta API. It constructs a FormData object with all required parameters, including authentication, birth details, and company branding. The AJAX settings configure the request method, URL, headers, and data handling. ```javascript var form = new FormData(); form.append("api_key", "{Your API Key}"); form.append("full_name", "Rahul Kumar"); form.append("day", "24"); form.append("month", "05"); form.append("year", "2023"); form.append("hour", "14"); form.append("min", "40"); form.append("sec", "43"); form.append("gender", "male"); form.append("place", "New Delhi, India"); form.append("lat", "28.7041"); form.append("lon", "77.1025"); form.append("tzone", "5.5"); form.append("lan", "en"); form.append("company_name", "DivineAPI"); form.append("company_url", "https://divineapi.com/"); form.append("company_email", "admin@divineapi.com"); form.append("company_mobile", "+91 212 1212 12"); form.append("company_bio", "Discover the best Horoscope API and Tarot API services at Divineapi.com. They offer Daily Horoscope API for all twelve zodiac signs, along with Indian astrology services like Panchang, Kundali, and Kundali Matching. Check out their website for more information and enjoy accurate and engaging astrology insights for your audience!"); form.append("logo_url", "https://divineapi.com/assets/logo.png"); form.append("footer_text", "DivineAPI"); var settings = { "url": "https://pdf.divineapi.com/indian-api/v2/kundali-ananta", "method": "POST", "timeout": 0, "headers": { "Authorization": "Bearer {Your Auth Token}" }, "processData": false, "mimeType": "multipart/form-data", "contentType": false, "data": form }; $.ajax(settings).done(function (response) { console.log(response); }); ``` -------------------------------- ### Chart Shape API Response Example Source: https://developers.divineapi.com/western-api/natal-astrology/chart-shape A successful response includes the identified chart shape and its corresponding SVG representation. This SVG can be directly rendered in your application. ```json { "status": "success", "code": 200, "message": "Request successful", "data": { "chart_shape": "Dual Cluster", "svg": "