Copy page
Copy page as Markdown for LLMs
The Grah Gochar (Planet Transit) API provides detailed planetary transit data, identifying when a planet moves from one zodiac sign to another. This transition influences the astrological environment and plays a major role in predictive astrology. The API returns the zodiac sign, sign number, and exact date-time of transit for a specified planet, helping astrologers and developers integrate accurate transit data into their systems.
For a complete walkthrough on testing this API in Postman, refer to the official documentation:
Step by Step Find Grah Gochar API Postman Testing Integration
https://support.divineapi.com/indian-astrology-apis/testing-panchang-api-find-grah-gochar-api-using-postman
You can receive the API 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
| Code | Language |
|---|---|
| en | English |
| hi | Hindi |
| bn | Bengali |
| ma | Marathi |
| tm | Tamil |
| tl | Telugu |
| ml | Malayalam |
| kn | Kannada |
Guide:
If lan is not provided, English (en) will be used as the default language.
The API supports the following planet names to be used in the request URL as path parameters:
sun
moon
mercury
venus
mars
jupiter
saturn
uranus
neptune
pluto
POST https://astroapi-3.divineapi.com/indian-api/v1/grah-gochar/:planet
Replace :planet with one of the planet names listed above.
This endpoint returns the date, time, and zodiac sign where the specified planet transits during a given month and year.
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Your API Access Token. Example: Bearer {token} |
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes | Your Divine API key. |
| month | Integer | Yes | Month of transit calculation. Example: 05. |
| year | Integer | Yes | Year of transit calculation. Example: 2023. |
| place | String | Yes | Place name, e.g. New Delhi. |
| lat | Float | Yes | Latitude of the location. Example: 28.6139. |
| lon | Float | Yes | Longitude of the location. Example: 77.2090. |
| tzone | Float | Yes | Timezone offset. Example: 5.5. Refer to Timezone Guide. |
| lan | String | No | Language code from the supported list. Default is en. |
{
"success": 1,
"data": {
"message": "Sun have 1 transit in May 2023.",
"transit": [
{
"sign": "Taurus",
"sign_no": 2,
"datetime": "2023-05-15 11:45:00"
}
]
}
}message
A summary text indicating how many transits occurred for the planet within the requested period.
transit
An array containing detailed transit data, including the sign and the corresponding timestamp.
sign
The zodiac sign into which the planet has transited.
sign_no
The sequential number of the zodiac sign (1 for Aries, 2 for Taurus, etc.).
datetime
The precise timestamp of the planetary transit in the format YYYY-MM-DD HH:MM:SS.
Below are example implementations in various programming environments.
curl --location 'https://astroapi-3.divineapi.com/indian-api/v1/grah-gochar/:planet' \
--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"'
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://astroapi-3.divineapi.com/indian-api/v1/grah-gochar/sun',
'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);
});
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/v1/grah-gochar/:planet",
"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);
});
import requests
url = "https://astroapi-3.divineapi.com/indian-api/v1/grah-gochar/:planet"
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)
Always include both the Authorization header and the api_key in the request.
Replace :planet with the appropriate planet name in the endpoint URL.
Ensure accurate lat, lon, and tzone values for precise timing calculations.
Time and sign details vary based on the specified timezone and coordinates.
Use the lan field for multilingual support.
This API is ideal for building transit calendars, horoscope sections, and planetary movement trackers.