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 Nakshatra Transit API

The Planets Nakshatra Transit API provides detailed information on when a planet enters a specific Nakshatra or its individual Pada (quarter). This API helps astrologers, researchers, and developers track precise planetary movements across Nakshatras throughout the year, supporting both whole Nakshatra and Pada-based transit modes.


Step-by-Step Find Planets Nakshatra Transit API Postman Testing Integration

For a complete walkthrough on how to test this API using Postman, refer to the official documentation:

Step by Step Find Planets Nakshatra Transit 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 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

CodeLanguage
enEnglish
hiHindi
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada

Guide:
If lan is not specified, the default response language will be English (en).


Planet Name Parameters

Use one of the following planet names as the path parameter :planet in the request URL.

sun
moon
mercury
venus
mars
jupiter
saturn
uranus
neptune
pluto

API Endpoint

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

This endpoint returns the planetary transit data across Nakshatras (and optionally Nakshatra Padas) for a given planet, month, and year.


Headers

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

Request Body

NameTypeRequiredDescription
api_keyStringYesYour Divine API key.
monthIntegerYesMonth of transit calculation. Example: 05.
yearIntegerYesYear of transit 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.
pada_transitIntegerNoSet to 1 to enable Pada Transit Mode; default is 0.
lanStringNoLanguage code from the supported list. Default is en.

200: OK Nakshatra Transit successfully

// Nakshatra Transit
{
    "success": 1,
    "data": {
        "message": "Sun have 2 transit in April 2025.",
        "transit": [
            {
                "date": "2025-04-14 03:22:00",
                "nakshatra": "Ashwini",
                "nakshatra_number": 1
            },
            {
                "date": "2025-04-27 19:11:00",
                "nakshatra": "Bharani",
                "nakshatra_number": 2
            }
        ]
    }
}

// Nakshatra Pada Transit
{
    "success": 1,
    "data": {
        "message": "Sun have 8 transit in April 2025.",
        "transit": [
            {
                "date": "2025-04-03 23:05:00",
                "nakshatra": "Revati",
                "nakshatra_number": 27,
                "nakshatra_pada": 2
            },
            {
                "date": "2025-04-07 08:20:00",
                "nakshatra": "Revati",
                "nakshatra_number": 27,
                "nakshatra_pada": 3
            },
            {
                "date": "2025-04-10 17:46:00",
                "nakshatra": "Revati",
                "nakshatra_number": 27,
                "nakshatra_pada": 4
            },
            {
                "date": "2025-04-14 03:22:00",
                "nakshatra": "Ashwini",
                "nakshatra_number": 1,
                "nakshatra_pada": 1
            },
            {
                "date": "2025-04-17 13:07:00",
                "nakshatra": "Ashwini",
                "nakshatra_number": 1,
                "nakshatra_pada": 2
            },
            {
                "date": "2025-04-20 23:00:00",
                "nakshatra": "Ashwini",
                "nakshatra_number": 1,
                "nakshatra_pada": 3
            },
            {
                "date": "2025-04-24 09:02:00",
                "nakshatra": "Ashwini",
                "nakshatra_number": 1,
                "nakshatra_pada": 4
            },
            {
                "date": "2025-04-27 19:11:00",
                "nakshatra": "Bharani",
                "nakshatra_number": 2,
                "nakshatra_pada": 1
            }
        ]
    }
}

Field Explanation

date
The exact timestamp when the planet enters the specified Nakshatra or Pada.

nakshatra
The name of the Nakshatra where the planet is currently transiting.

nakshatra_number
The ordinal number of the Nakshatra (1 for Ashwini, 27 for Revati, etc.).

nakshatra_pada
The quarter (Pada) of the Nakshatra, available when pada_transit = 1.

message
A summary text specifying the total number of Nakshatra or Pada transits during the specified month.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

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

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-nakshatra-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/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)

Implementation Notes

Always include both the Authorization header and api_key in your request.

Replace :planet with the correct planet name in the URL.

Use pada_transit = 1 for a more granular breakdown of planetary movement within each Nakshatra.

Accurate lat, lon, and tzone inputs ensure precise timing results.

Cache repetitive requests to improve performance and reduce API calls.

Integrate this API with Grah Gochar or Panchang APIs to offer a complete planetary movement dashboard.