Logo

SEARCH ASTRO INSIGHT API DOCS

Home Vedic Astrology
POST Vedic API v1

Ayanamsha

The Ayanamsha API provides astro details related data and calculations using Vedic Astrology principles. This endpoint is designed for astrology applications, kundli generation, horoscope platforms, and developer integrations requiring accurate JSON-based responses and scalable REST API access.

https://json.astroinsightapi.com/api/v1/astro-details/ayanamsha
Credit Cost
1 Credit
Avg Latency
~77ms
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 Ayanamsha.

What This API Does

The Ayanamsha API calculates the Ayanamsha value for a given calendar date. Ayanamsha is a foundational concept in Vedic (sidereal) astrology — it represents the angular difference between the tropical zodiac (used in Western astrology) and the sidereal zodiac (used in Vedic astrology). This difference arises due to the precession of the equinoxes, a slow westward shift of the equinoctial points along the ecliptic over time.

By providing a specific date, this API returns the precise Ayanamsha value applicable to that moment, enabling accurate conversion of tropical planetary positions into sidereal ones.


What Data It Returns

The API returns the Ayanamsha value (in degrees) corresponding to the supplied date. The response is delivered as a 200 OK with a status of "OK", containing the computed angular offset between the tropical and sidereal zodiacs for the given day, month, and year.


Main Use Cases

  • Vedic Horoscope Calculation — Compute the correct sidereal positions of planets for a birth chart (Janma Kundali) by applying the Ayanamsha offset to tropical coordinates.
  • Tropical-to-Sidereal Conversion — Convert planetary longitudes obtained from astronomical ephemerides (which are tropical) into sidereal positions used in Vedic astrology.
  • Multi-System Ayanamsha Support — Serve astrologers from different schools of Vedic astrology by supporting multiple Ayanamsha systems (e.g., Lahiri, Raman, Krishnamurti) via the X-Ayanamsha header.
  • Astrology Application Development — Power backend calculations for astrology apps, platforms, and tools that require date-specific Ayanamsha values.

Key Functionality

  • Date-Based Calculation — Accepts a specific date (daymonthyear) to compute the historically accurate Ayanamsha value for that point in time.
  • Multiple Ayanamsha Systems — The X-Ayanamsha request header allows selection of the desired Ayanamsha system (e.g., LahiriRamanKrishnamurti), making the API flexible for practitioners across different Vedic astrology traditions.
  • Sidereal Zodiac Alignment — Bridges the gap between modern astronomical data (tropical) and traditional Vedic astrological frameworks (sidereal), ensuring planetary positions are correctly aligned with the fixed-star backdrop used in Jyotish.
  • Lightweight Input — Requires only three date fields (daymonthyear), making integration straightforward for any application performing astrological computations.

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 Ayanamsha.

What is the Ayanamsha API and what data does it provide?

The Ayanamsha API provides authentic Astro Details 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 Ayanamsha?

The Ayanamsha 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 Ayanamsha endpoint consume?

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

How do I authenticate with the Ayanamsha 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 Ayanamsha 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 Ayanamsha?

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 astro-details/ayanamsha
Presets:
Live Output
Click Send above to execute calculation.
Sample Output

API Categories