search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Chandrashtama API

The Chandrashtama API identifies the periods when the Moon transits the 8th house from an individual's natal Moon sign — traditionally considered a time of emotional turbulence or instability. This API helps users or astrologers determine Chandrashtama durations for different Moon signs, nakshatras, and padas based on date, time, and location.


Step-by-Step Find Chandrashtama API Postman Testing Integration

For a complete walkthrough on testing this API in Postman, refer to the official support documentation:

Step by Step Find Chandrashtama API Postman Testing Integration
https://support.divineapi.com/indian-astrology-apis/testing-panchang-api-find-grah-gochar-api-using-postman


Supported Language Codes

You can retrieve the response in multiple Indian languages by passing the lan parameter in the request body.

Reference Article:
https://support.divineapi.com/general-api-support/translating-an-indian-vedic-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada

Guide:
If the lan parameter is not specified, the API will return the response in English (en) by default.


API Endpoint

POST https://astroapi-3.divineapi.com/indian-api/v2/chandrashtama

This endpoint returns Chandrashtama data for all Moon signs, showing the nakshatras, padas, and the time duration of the Chandrashtama period.


Headers

NameTypeDescription
Authorization*StringYour API Access Token. Example: Bearer {token}

Request Body

NameTypeRequiredDescription
api_keyStringYesYour Divine API key.
monthIntegerYesMonth of calculation. Example: 05.
yearIntegerYesYear of calculation. Example: 2023.
placeStringYesPlace name, e.g. New Delhi.
latFloatYesLatitude of the location. Example: 28.6139.
lonFloatYesLongitude of the location. Example: 77.2090.
tzoneFloatYesTimezone offset. Example: 5.5. Refer to Timezone Guide.
lanStringNoLanguage code as per the supported list. Default is en.

200: OK Planets Chandramasa Table successfully

{
    "success": 1,
    "data": [
        {
            "moonsign": "Gemini",
            "chandrashtama": [
                {
                    "nakshatra": "Vishakha",
                    "padas": [
                        4
                    ]
                },
                {
                    "nakshatra": "Anuradha",
                    "padas": [
                        1,
                        2,
                        3,
                        4
                    ]
                },
                {
                    "nakshatra": "Jyeshtha",
                    "padas": [
                        1,
                        2,
                        3,
                        4
                    ]
                }
            ],
            "start_date": "2025-07-23 05:58:11",
            "end_date": "2025-07-24 01:29:11"
        },
        {
            "moonsign": "Cancer",
            "chandrashtama": [
                {
                    "nakshatra": "Moola",
                    "padas": [
                        1,
                        2,
                        3,
                        4
                    ]
                },
                {
                    "nakshatra": "Poorva Ashadha",
                    "padas": [
                        1,
                        2,
                        3,
                        4
                    ]
                },
                {
                    "nakshatra": "Uttara Ashadha",
                    "padas": [
                        1
                    ]
                }
            ],
            "start_date": "2025-07-24 01:30:11",
            "end_date": "2025-07-24 05:59:10"
        }
    ]
}

Field Explanation

moonsign: The Moon sign under consideration.

chandrashtama: List of nakshatras and padas (quarters) marking the Chandrashtama period.

nakshatra: The specific lunar mansion associated with the Chandrashtama period.

padas: The quarter(s) of the nakshatra under Chandrashtama influence.

start_date: The timestamp when Chandrashtama begins for that Moon sign.

end_date: The timestamp when Chandrashtama ends.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-3.divineapi.com/indian-api/v2/chandrashtama' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'place="New Delhi"' \
--form 'lat="28.6139"' \
--form 'lon="77.2090"' \
--form 'tzone="5.5"' \
--form 'lan="en"'

Node.js

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-3.divineapi.com/indian-api/v2/chandrashtama',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': '{Your API Key}',
    'month': '05',
    'year': '2023',
    'place': 'New Delhi',
    'lat': '28.6139',
    'lon': '77.2090',
    'tzone': '5.5',
    'lan': 'en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript (jQuery AJAX)

var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("month", "05");
form.append("year", "2023");
form.append("place", "New Delhi");
form.append("lat", "28.6139");
form.append("lon", "77.2090");
form.append("tzone", "5.5");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-3.divineapi.com/indian-api/v2/chandrashtama",
  "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);
});

Python

import requests

url = "https://astroapi-3.divineapi.com/indian-api/v2/chandrashtama"

payload = {'api_key': '{Your API Key}',
'month': '05',
'year': '2023',
'place': 'New Delhi',
'lat': '28.6139',
'lon': '77.2090',
'tzone': '5.5',
'lan': 'en'}

headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload,)

print(response.text)

Best Practices

Always include both Authorization and api_key in your request.

Ensure accurate lat, lon, and tzone for precise Chandrashtama period calculations.

Time-sensitive computations depend on correct timezone data; verify local offset.

Handle array-type responses like chandrashtama gracefully in your UI.

Use the lan field to support multilingual applications.