Grah Gochar (Planet Transit) API
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.
Step-by-Step Find Grah Gochar API Postman Testing Integration
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
Supported Language Codes
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.
Planet Name Parameters
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
plutoAPI Endpoint
POST https://astroapi-3.divineapi.com/indian-api/v2/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.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Your API Access Token. Example: Bearer {token} |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes | Your 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. |
| sign_lan | Integer | No | 0 for English 1 for Sanskrit, Default is '0' |
200: OK Grah Gochar details fetched successfully
{
"success": 1,
"data": {
"total_transit": 1,
"transit": [
{
"sign": "Taurus",
"sign_no": 2,
"datetime": "2023-05-15 11:45:00"
}
]
}
}Field Explanation
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.
Example Code Implementations
Below are example implementations in various programming environments.
cURL
curl --location 'https://astroapi-3.divineapi.com/indian-api/v2/grah-gochar/:planet' \
--header 'Authorization: Bearer your API Access 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/grah-gochar/:planet',
'headers': {
'Authorization': 'Bearer your API Access 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/grah-gochar/:planet",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer your API Access 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/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'}
files=[
]
headers = {
'Authorization': 'Bearer your API Access Token'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Implementation Notes
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.