New Numerology API

Astrology API

Vedic astrology API for charts, dashas, panchang and matching

The astrology API from API for Astrology (apiforastrology.com) turns a birth date, time and place into Vedic astrology data. It returns the birth chart (kundli), planetary periods, the Hindu calendar and match scores as JSON. Readings come in plain English.

In one API
65 endpoints
Dates covered
1850 to 2149
Zodiac
Sidereal (Vedic)
Lahiri by default
8 ayanamsas

One request, many answers

John Doe, born Aug 15, 1990, 10:30 AM, New York

© API for Astrology (apiforastrology.com). "One request, many answers". All rights reserved. Not to be copied or reused.John Doe♈︎♉︎♊︎♋︎♌︎♍︎♎︎♏︎♐︎♑︎♒︎♓︎AscMaMoJuVeKeSuMeSaRaPOST /v1/planets678910111212345AscRising sign: Virgo19° into Virgo, Hast nakshatra

POST /v1/planets

{ "ascendant": { "sign": "Virgo", "nakshatra": "Hast" } }

Updated

What is an astrology API?

An astrology API is a web service that does the sky math for apps. The app sends a birth date, time and place. The service sends back planet positions, signs, houses and dashas (planet periods) as JSON. A Vedic astrology API uses the sidereal zodiac, which is fixed to the stars.

What do you send to the Astrology API, and what comes back?

You send a birth date, time and place. The place is a latitude, longitude and time zone name, such as America/New_York. The answer is JSON: the birth chart (kundli), dashas (planet periods), the panchang (Hindu calendar) and match scores. Yogas (planet combinations), doshas (chart flaws) and written readings in English or Hindi come back as well.

What can you build with the Astrology API?

The Astrology API is built for astrology apps, matrimony and dating sites, and horoscope pages for publishers. It also suits AI chat assistants, astrologer consultation platforms, baby name apps, and puja or gemstone stores. Each of these 9 use cases has its own page, with the endpoints that product needs.

Features

What the astrology API covers

65 endpoints: 63 in 14 features, plus 2 helper endpoints. Each feature has its own page with a real sample response.

Birth charts

Timing

Matching and doshas

Readings

Your first call

One request, one clear answer

It is a REST API that answers in JSON. Send a birth date, time and place, or a name and a birth date, with your API key. Here is John Doe, born on August 15, 1990 at 10:30 AM in New York. The response box shows what the API sends back, shortened.

# 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"}'
Response (shortened)200 OK
{
  "ascendant": {
    "name": "Ascendant",
    "sign": "Virgo",
    "degree_dms": "19 : 56 : 03",
    "house": 1,
    "nakshatra": "Hast"
  },
  "positions": [
    {
      "name": "Sun",
      "sign": "Cancer",
      "degree_dms": "28 : 46 : 31",
      "house": 11,
      "nakshatra": "Ashlesha"
    },
    {
      "name": "Moon",
      "sign": "Taurus",
      "degree_dms": "24 : 34 : 30",
      "house": 9,
      "nakshatra": "Mrigashira"
    }
  ]
}

Plain-English answers

Answers that name their rule

Checks such as doshas and yogas return a plain-English answer next to the exact rule they tested. The text comes from fixed rules, not an AI model. A practicing astrologer reviews the rules behind these answers.

  • The same birth details always get the same answer.
  • Exceptions are listed, not applied, so an astrologer can weigh them.
  • Every rule is written out in the public rulebook.
POST /v1/dosha/manglik200 OK
{
  "dosha": "manglik",
  "rule": "Mars occupying house 1, 2, 4, 7, 8 or 12, counted separately from the ascendant, from the Moon and from Venus",
  "present": true,
  "cancellations": [
    "Mars is in its own sign"
  ],
  "answer": {
    "status": "present",
    "headline": "Manglik dosha is present, counted from your ascendant and your Moon. The main checks count from your ascendant (the sign rising at your birth) and from your Moon. It is common: about three in four…"
  }
}
John Doe's manglik dosha check: the rule it tested, an exception it found but did not apply, and the answer in plain English. Real output for John Doe, born Aug 15, 1990, 10:30 AM, New York.

Sample report

A full kundli report from one call

One request returns a printable report with 11 chapters on the chart, the houses, the planetary periods and more. Read the one we made for John Doe before you build yours.

Accuracy

Checked against NASA JPL and Swiss Ephemeris

Planet positions come from NASA's JPL planet data (JPL DE440s). On 25,571 positions from 1850 to 2149, the Sun and planets match NASA JPL Horizons within 0.001″. The Moon matches within 0.011″. On 2,000 random birth charts, planets match Swiss Ephemeris within 0.06″. An arc second (″) is 1/3,600 of a degree.

Sources: NASA JPL planet data (DE440), Swiss Ephemeris, NASA JPL Horizons

0.001″

Planets, against NASA

0.011″

Moon, against NASA

0.004″

Rising sign, 2,000 charts

1850–2149

Years checked

Use cases

Pages for each use case

All use cases

Languages

Readings in your users’ language

The Astrology API and the Numerology API answer in English and Hindi today. Names and reading text change with the language. Endpoint paths, codes and error messages stay in English.

  1. Supported

    2 languages

    Works today

    • EnglishDefault
    • हिन्दीHindilang=hi
  2. Coming soon

    2 languages

    Next on the list

    • 中文Chinese
    • EspañolSpanish
  3. Planned

    9 languages

    Not scheduled yet

    • தமிழ்Tamil
    • తెలుగుTelugu
    • 日本語Japanese
    • ಕನ್ನಡKannada
    • FrançaisFrench
    • മലയാളംMalayalam
    • PortuguêsPortuguese
    • РусскийRussian
    • বাংলাBengali

Need a language sooner?Tell us which one. Requests help decide what comes next, and a language in progress gets a target quarter once its schedule is set.

Request a language

Common questions

All questions
Which zodiac, ayanamsa and house system does the astrology API use?

The sidereal (Vedic) zodiac and whole-sign houses (one sign per house). The ayanamsa (zodiac offset) is Lahiri by default. Send "ayanamsa": "kp" for KP (Krishnamurti Paddhati, a Vedic method) or "raman" for Raman. Or send another of the eight, such as "true_chitra". POST /v1/kp is the one exception to whole-sign houses: it uses Placidus house borders, as KP requires. Read planets by name, not by number, since apps number them differently.

Compare the ayanamsas
Do I need a birth time?

For a birth chart, yes: the rising sign and the houses depend on it. Matching can run on the two nakshatras (birth stars) alone. Tara bala (a daily rating) needs only a birth nakshatra. The panchang and festival calendars need only a date and a place.

Matching with no birth time
How are time zones and daylight saving time handled?

Send a time zone name such as America/New_York. The API applies the rules that were in force at the birth moment. It refuses a local time that happens twice when the clocks go back, instead of guessing.

Read the conventions
Can I get a PDF report?

The API returns a self-contained printable HTML page from /v1/report. Print it to PDF in any browser, or convert it on your side.

See a sample report
What is the difference between test and live keys?

Use a test key (afa_test_) while you build and a live key (afa_live_) in production. Both call the same API and get real results. Test calls are free and never count toward your plan. Written readings come back only for the sample charts, John Doe and Jane Doe.

About test keys
What is the rate limit, and what happens at 429?

Each live key has its own per-minute limit, so one busy key does not slow the others. Free keys get 90 calls a minute, Starter 250, Growth 500 and Scale 1,000. Every call counts as 1, a full report too. Test keys get 10 a minute each. Over a limit, the API answers 429. The Retry-After header says how many seconds to wait, and the error code says which limit you hit. If you often get 429s, move to a larger plan.

Keys and rate limits

From the blog

Astrology API

Get a free API key and make your first call

Create an account, confirm your email and create a test key. The quickstart shows you how to make your first request.

Your first answer

John Doe, New York

POST /v1/planets200 OK
  • RisingVirgoHast
  • SunCancerAshlesha
  • MoonTaurusMrigashira
  • MarsAriesKrittika

Real API output. A free test key gets the same answer.

  1. 01

    Test key: 1,000 test calls a month to build with

  2. 02

    Free plan: 2,000 live calls a month, no card needed

  3. 03

    Open rules: every rule is published, so you can check any answer