Logo

SEARCH ASTRO INSIGHT API DOCS

Home Vedic Astrology
POST Vedic API v1

Planetary Positions

The Planetary Positions API provides Panchang related calculations and insights based on Vedic Astrology principles. This endpoint is designed for astrology applications, report generation systems, horoscope platforms, and developer integrations requiring structured JSON responses and reliable REST API access.

https://json.astroinsightapi.com/api/v1/panchang/planets
Credit Cost
1 Credit
Avg Latency
~69ms
Auth Type
Basic Auth
Format
JSON / UTF-8

Available Response Languages

🇬🇧 English en
🇮🇳 Hindi hi
🇮🇳 Marathi ma

API Overview & Calculation Details

Methodology and astrological context for Planetary Positions.

Planetary Positions

The Planetary Positions API returns the precise sidereal positions of all major Vedic astrological planets for a given date, time, and geographic location. This is a foundational endpoint in the AstroInsight API suite — the planetary longitude and sign data it provides underpins virtually every higher-level astrological calculation, from birth chart generation and Dasha computation to transit analysis and compatibility matching.


What This API Does

This endpoint computes the exact sidereal positions of the nine Vedic grahas (planets) — including the two lunar nodes — for the specified date, time, and coordinates. Positions are calculated using the selected Ayanamsha to convert tropical (Western) longitudes to the sidereal (Vedic) zodiac. The result is a complete snapshot of the sky as seen from the given location at the given moment, expressed in the sidereal coordinate system used in Jyotish (Vedic astrology).


Data Returned

The response provides positional data for all nine Vedic planets, typically including:

  • Planet name — Sun (Surya), Moon (Chandra), Mars (Mangal), Mercury (Budha), Jupiter (Guru), Venus (Shukra), Saturn (Shani), Rahu (North Node), Ketu (South Node)

  • Sidereal longitude — The precise degree and minute position within the sidereal zodiac (0°–360°)

  • Zodiac sign (Rashi) — The sidereal sign the planet occupies (Aries through Pisces)

  • Degree within sign — The planet's position expressed as degrees and minutes within its current sign

  • Nakshatra — The lunar mansion (star constellation) the planet occupies, along with its pada (quarter)

  • Nakshatra lord — The ruling planet of the Nakshatra

  • Retrograde status — Whether the planet is currently in retrograde motion

  • House position — The astrological house the planet occupies relative to the Ascendant (if applicable)

  • Ayanamsha value — The sidereal correction applied, as per the selected system


Main Use Cases

  • Birth chart (Kundali) generation — Supplying the planetary position data required to construct a Vedic natal chart (Lagna chart) for any date, time, and place of birth

  • Transit analysis — Tracking the current or future positions of planets relative to a natal chart to identify significant astrological transits and their effects

  • Dasha and Antardasha calculation — Providing the Moon's Nakshatra position, which is the starting point for computing the Vimshottari Dasha (planetary period) sequence

  • Compatibility and synastry — Comparing planetary positions between two charts for Kundali Milan (marriage compatibility) and other synastry analyses

  • Astrological research and tools — Serving as a raw data source for custom astrological algorithms, research applications, and chart rendering engines

  • Muhurta and electional astrology — Identifying favourable planetary configurations for selecting auspicious moments for important activities


Key Functionality

  • All nine Vedic grahas — Returns positions for the complete set of Jyotish planets in a single response: Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, and Ketu

  • Sidereal coordinate system — All longitudes are expressed in the sidereal zodiac using the selected Ayanamsha, in strict accordance with Vedic astrology methodology

  • Nakshatra-level precision — Each planet's position is resolved down to the Nakshatra and pada level, enabling Nakshatra-based calculations such as Dasha, compatibility, and muhurta

  • Retrograde detection — Flags planets currently in retrograde motion, a key factor in Vedic chart interpretation and transit analysis

  • Configurable Ayanamsha — The X-Ayanamsha header allows selection of the sidereal correction system (e.g., Lahiri, Raman, KP), ensuring compatibility with different Vedic astrology traditions and software

  • Location and time aware — Accepts full date, time (to the second), latitude, longitude, and timezone offset, enabling accurate position calculations for any moment and place in history or the future

  • Multi-language support — The Accept-Language header enables planet names, sign names, and Nakshatra names to be returned in the preferred regional or vernacular language

Request Parameters

Payload specifications for JSON request body.

application/json
Parameter Type Description & Example
day
Required
integer
Day of birth (1–31).
Example: 15
month
Required
integer
Month of birth (1–12).
Example: 9
year
Required
integer
Year of birth (e.g., 1994).
Example: 1994
hour
Required
integer
Hour of birth in 24-hour format (0–23).
Example: 12
min
Required
integer
Minute of birth (0–59).
Example: 30
sec
Optional
integer
Second of birth (0–59). Optional. If not provided, it is considered as 0.
Example: 30
lat
Required
float
Latitude of the birth location.
Example: 28.6139
lon
Required
float
Longitude of the birth location.
Example: 77.1025
tzone
Optional
float
Timezone offset from UTC. Optional. If not provided, it is considered as 5.5 (IST).
Example: 5.5

Required & Optional Headers

Header Key Value / Format Description
Authorization
Required
Basic {base64} Base64 encoded string of CLIENT_ID:CLIENT_SECRET.
Content-Type
Required
application/json Specifies JSON payload format in request body.
Accept-Language
Optional
en, hi, ta, te... Returns localized astrology output. Default: en
X-Ayanamsha
Optional
lahiri, raman, krishnamurti... Ayanamsha system: lahiri, raman, fagan_bradley, usha_shashi, krishnamurti, djwhal_khul, yukteshwar, jn_bhasin, suryasiddhanta, aryabhata. Default: lahiri

Frequently Asked Questions

Comprehensive developer guidance for Planetary Positions.

What is the Planetary Positions API and what data does it provide?

The Planetary Positions API provides authentic Panchang calculations based on Vedic astrology algorithms. It returns structured JSON data containing detailed planetary positions, house calculations, and astrological parameters suitable for Kundli apps, astrology websites, and developer applications.

What input parameters are required to call Planetary Positions?

The Planetary Positions API requires standard Vedic birth details: day, month, year, hour, min, sec, latitude (lat), longitude (lon), and timezone (tzone). All parameters can be passed in the JSON request body.

How many credits does the Planetary Positions endpoint consume?

Each calculation request to Planetary Positions consumes 1 API credit. The endpoint delivers high performance with an average response time of ~69ms.

How do I authenticate with the Planetary Positions API?

Authenticate using HTTP Basic Authentication by including your Base64 encoded client_id:client_secret credentials in the Authorization header (Authorization: Basic BASE64(client_id:client_secret)).

Can I get Planetary Positions responses in regional Indian languages?

Yes! The API supports multiple languages including English, Hindi, Marathi. Pass your desired language code (e.g. 'hi' for Hindi, 'ta' for Tamil, 'en' for English) in the Accept-Language request header.

Which Ayanamsha systems can be calculated with Planetary Positions?

Supported Ayanamshas include NC Lahiri (Default), BV Raman, Krishnamurti (KP), Fagan Bradley, Usha Shashi, Djwhal Khul, Sri Yukteshwar, JN Bhasin, Surya Siddhanta, and Aryabhata. Specify your choice using the X-Ayanamsha header.

What response format and HTTP codes does this API return?

The API returns clean JSON UTF-8 output. Successful requests return HTTP 200 OK with the computed data payload. Parameter validation errors return HTTP 422 with actionable error messages.

POST panchang/planets
Presets:
Live Output
Click Send above to execute calculation.
Sample Output

API Categories