New Numerology API
Docs menu
Download

Astrology API documentation

Updated

The Astrology API docs from API for Astrology (apiforastrology.com) cover all 65 endpoints for Vedic astrology. You send a birth date, time and place as JSON over HTTPS. You get birth charts (kundli), dashas, the panchang, match scores and written readings back as JSON. Start with the quickstart, then look up each endpoint in the reference.

Vedic astrology is the traditional astrology of India. Dashas are planet periods, and the panchang is the Hindu calendar for a day. Every request goes to https://apiforastrology.com/api/astrology with your API key in a header. The full URL of an endpoint is this base URL plus its path, such as /v1/planets.

Keys, rate limits and errors work the same way for every API. The docs home covers them and lists the quickstart for each API.

Defaults: sidereal zodiac, Lahiri ayanamsa and whole-sign houses. KP uses Placidus cusps. Send the time zone as a name, such as America/New_York. The conventions explain each one.

# John Doe, born Aug 15, 1990, 10:30 AM, New York
curl -X POST "https://apiforastrology.com/api/astrology/v1/planets" \
  -H "Authorization: Bearer $ASTROLOGY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":1990,"month":8,"day":15,"hour":10,"minute":30,"second":0,"latitude":40.7128,"longitude":-74.006,"timezone":"America/New_York"}'
© API for Astrology (apiforastrology.com). "Birth details in, JSON out". All rights reserved. Not to be copied or reused.Birth details in, JSON outBIRTH DETAILSJohn DoeAug 15, 199010:30 AMNew YorkPOST/v1/planets200 OK, JSON"ascendant": "Virgo""sun": "Cancer""moon": "Taurus""dasha": "Mercury"One request. One JSON answer.

Before you build

These inputs change what the API returns.

  • Send the time zone as a name, such as America/New_York, so daylight saving time is applied for that date. A local time that happens twice or never, when clocks change, gets a 422 error, not a guess. For a repeated time, add timezone_fold: 0 or 1. Times and time zones
  • The ayanamsa (the zodiac offset) is Lahiri unless you send ayanamsa as kp or raman or yukteshwar or fagan_bradley or jn_bhasin or ushashashi or true_chitra. A different one can move a planet near the edge of a sign into the next sign. Matching needs the same one for both people. Zodiac and houses
  • Rahu and Ketu (the Moon’s nodes) use the true node, the actual position, by default. Send "node": "mean" for the averaged position. Each response names its choice in meta.node. True and mean nodes
  • Positions are sidereal (Vedic) only. For a Western (tropical) longitude, add meta.ayanamsa_value, then subtract 360 if the sum passes 360. Vedic vs Western
  • hour and minute default to 0, so a missing birth time becomes midnight and the rising sign may be wrong. With no birth time, use routes that need only the birth star (nakshatra), such as GET /v1/tara and POST /v1/matching/nakshatra.
  • Above the polar circles, a day can have no sunrise. Routes that count from sunrise, such as the daily panchang, then return 422 with no_sunrise. POST /v1/kp refuses places beyond 66 degrees north or south. Birth charts still work there. Errors
  • Dates run from 1850 to 2149, the range of the NASA JPL planet data. A date outside it gets a 422 error. Supported dates

API reference by group

See results before you sign upThe Astrology API page has a live demo that needs no key.

Try the live demo

From the blog