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

Planets Retrograde Transit API

The Planets Retrograde Transit API provides astrologically significant retrograde and progressive (direct) dates for major planets. Retrogression is an essential concept in Vedic astrology, indicating periods of reversal, review, delay, or intensified planetary influence. This API helps you fetch month-wise retrograde or progressive transition points for a selected planet based on location and timezone.


Step-by-Step Planets Retrograde Transit API Postman Testing Integration

For a guided setup, request example, and troubleshooting steps, refer to the official integration article:

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 localize the API response 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

Supported codes include:

CodeLanguage
enEnglish
hiHindi
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada

Guide: If lan is not provided, the default language will be en.


Supported Planets

This API supports retrograde transit checks for the following planets:

mercury

venus

mars

jupiter

saturn

uranus

neptune

pluto

Pass one of the above as the: planet path parameter.


API Endpoint

POST https://astroapi-3.divineapi.com/indian-api/v1/planet-retrograde-transit/:planet

Replace: planet with the actual planet name, for example:

POST https://astroapi-3.divineapi.com/indian-api/v1/planet-retrograde-transit/mars

Headers

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

Request Body

NameTypeRequiredDescription
api_keyStringYesYour Divine API key.
monthIntegerYesMonth for which retrograde transit is to be calculated. Example: 05.
yearIntegerYesYear for which retrograde transit is to be calculated. Example: 2023.
placeStringYesPlace name, e.g. New Delhi.
latFloatYesLatitude of the place, e.g. 28.6139.
lonFloatYesLongitude of the place, e.g. 77.2090.
tzoneFloatYesTimezone offset, e.g. 5.5. See timezone guide: https://developers.divineapi.com/divine-api/understanding-time-zones-a-comprehensive-guide
lanStringNoResponse language code. Default is en.

200: OK Retrograde Transit successfully

{
    "success": 1,
    "data": {
        "message": "Mars have 1 transit in December 2024.",
        "transit": [
            {
                "date": "2024-12-07 04:59:00",
                "retrograde": "true",
                "progressive": "false"
            }
        ]
    }
}

Response Fields Description

success
Indicates whether the request was processed successfully. 1 means success.

data.message
A human-readable summary of how many retrograde/progressive transitions the specified planet has in the given month and year.

data.transit
An array of retrograde-related transition objects.

Each object inside transit includes:

FieldDescription
dateExact timestamp (server/localized to inputs) when the retrograde or progressive motion begins.
retrograde"true" if the planet turns retrograde at this timestamp.
progressive"true" if the planet turns direct/progressive at this timestamp. Only one of retrograde or progressive will be true at a time for a single record.

Notes on Behaviour

You must provide accurate location (place, lat, lon) and tzone to ensure correct astronomical calculation.

Some months may have no retrograde or progressive events for a planet; in such cases, the transit array may be empty and the message will indicate zero events.

Only the planets that have a retrograde phenomenon are supported (the list given above).

This is a month- and year-specific query; for a yearly dashboard you will need to call this endpoint for multiple months.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-3.divineapi.com/indian-api/v1/planet-retrograde-transit/: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"'

Node.js

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-3.divineapi.com/indian-api/v1/planet-retrograde-transit/:planet',
  '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/v1/planet-retrograde-transit/: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);
});

Python

import requests

url = "https://astroapi-3.divineapi.com/indian-api/v1/planet-retrograde-transit/: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)

Implementation Guidelines

Always send both Authorization (Bearer token) and api_key; both are mandatory.

Make sure the path parameter :planet is one of the supported retrograde planets.

Use the correct timezone offset to avoid off-by-hours issues in returned timestamps.

You can log or display both retrograde and progressive entries to show the full cycle for the user.

For multilingual astrology dashboards, bind the lan parameter to user preference.