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
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
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"}'{
"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"
}
]
}# John Doe, born Aug 15, 1990
curl -X POST "https://apiforastrology.com/api/numerology/v1/profile" \
-H "Authorization: Bearer $ASTROLOGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","birth_date":"1990-08-15"}'{
"mulank": {
"number": 6,
"planet": "Venus"
},
"bhagyank": {
"number": 6,
"total": 33,
"master": true
},
"name_number": {
"chaldean": {
"number": 7,
"total": 34
}
}
}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.
{
"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…"
}
}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
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.
Supported
2 languagesWorks today
- EnglishDefault
- हिन्दीHindilang=hi
Coming soon
2 languagesNext on the list
- 中文Chinese
- EspañolSpanish
Planned
9 languagesNot 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 languageCommon questions
All questionsWhich 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 ayanamsasDo 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 timeHow 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 conventionsCan 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 reportWhat 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 keysWhat 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 limitsFrom the blog

· 9 min read
Jaimini Astrology: Atmakaraka and the Chara Karakas
How the atmakaraka is ranked by degree, why Rahu splits the schools, and how often birth time swaps it…
Read
· 10 min read
Transit Alerts: Tell Each User When a Planet Changes Sign
Gochar alerts for apps.
Read
· 9 min read
Astrology GPT: Give Your AI Chatbot Real Chart Data
Wire an astrology GPT to a chart API.
Read
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
- RisingVirgoHast
- SunCancerAshlesha
- MoonTaurusMrigashira
- MarsAriesKrittika
Real API output. A free test key gets the same answer.
01
Test key: 1,000 test calls a month to build with
02
Free plan: 2,000 live calls a month, no card needed
03
Open rules: every rule is published, so you can check any answer








