Skip to content
GET/api/astro/ayanamsa_value/1 credit

Ayanamsa value

The ayanamsa is the gap between the tropical zodiac, which is tied to the equinox, and the sidereal zodiac used in Vedic astrology, which is tied to the stars. It grows by roughly fifty arc-seconds a year, so every sidereal calculation depends on which ayanamsa you adopt and for which date. This endpoint returns that single number. It is a GET with query parameters: `ayanamsa`, a name such as LAHIRI, RAMAN, KRISHNAMURTI or TRUE_CITRA (47 Swiss Ephemeris definitions are accepted, case-insensitively), and `date`, an ISO date defaulting to today. Use it to label a chart with the ayanamsa it was cast on, or to see how far two definitions diverge for a given birth date. The response gives the value both ways: `value_degrees` as a decimal to six places, and `degrees`, `minutes` and `seconds` plus a ready-made `formatted` string. The name and the resolved date are echoed back. An unknown name, and the pseudo-ayanamsa 'USER', return 400.

https://yogataraapi.prahlad.app/api/astro/ayanamsa_value/
Test Request

Authentication

Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.

X-API-Key: yt_live_a1b2c3d4_…

Query parameters (2)

Passed in the URL. All optional unless marked, and they combine — filter, then page, then sort.

ParameterTypeExampleWhat it does
ayanamsastringAyanamsa name (e.g. LAHIRI). Defaults to LAHIRI.

GET query parameter. Case-insensitive .strip.upper at. Defaults to 'LAHIRI'. 'USER' is explicitly rejected by this endpoint even though it exists in the underlying swisseph dict. Unknown values return 400 {"error": "Unknown ayanamsa..."}.

one of: FAGAN_BRADLEY, LAHIRI, DELUCE, RAMAN, USHASHASHI, KRISHNAMURTI, DJWHAL_KHUL, YUKTESHWAR, JN_BHASIN, BABYL_KUGLER1, BABYL_KUGLER2, BABYL_KUGLER3, BABYL_HUBER, BABYL_ETPSC, ALDEBARAN_15TAU, HIPPARCHOS, SASSANIAN, GALCENT_0SAG, J2000, J1900, B1950, SURYASIDDHANTA, SURYASIDDHANTA_MSUN, ARYABHATA, ARYABHATA_MSUN, SS_REVATI, SS_CITRA, TRUE_CITRA, TRUE_REVATI, TRUE_PUSHYA, GALCENT_COCHRANE, GALCENT_RGILBRAND, GALCENT_MULA_WILHELM, ARYABHATA_522, BABYL_BRITTON, TRUE_MULA, GALALIGN_MARDYKS, TRUE_SHEORAN, GALEQU_TRUE, GALEQU_MULA, GALEQU_IAU1958, GALEQU_FIORENZA, VALENS_MOON, LAHIRI_1940, LAHIRI_VP285, KRISHNAMURTI_VP291, LAHIRI_ICRC
datestringISO date string (e.g. 1990-05-14). Defaults to today.

FORMAT constraint, not an enum. Anything Python's datetime.fromisoformat accepts: 'YYYY-MM-DD' or a full ISO 8601 datetime, e.g. '1990-05-14' / '1990-05-14T12:30:00'. Any timezone offset in the string is DISCARDED and replaced with UTC. Defaults to today (UTC). Invalid format returns 400.

Example request

curl "https://yogataraapi.prahlad.app/api/astro/ayanamsa_value/" \
  -H "X-API-Key: $OCCULT_API_KEY"

Response

{
  "ayanamsa": "LAHIRI",
  "date": "2026-09-05",
  "value_degrees": 24.229763,
  "degrees": 24,
  "minutes": 13,
  "seconds": 47,
  "formatted": "24°13'47\""
}

Captured from a real call using the exact request above. Results sit under data.

Errors

Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.