FAQ
Vedic astrology API FAQ
Updated
About API for Astrology
What is API for Astrology?
API for Astrology (apiforastrology.com) is a web API for Vedic astrology and numerology. Your app sends birth details or a name as JSON. It gets back birth charts (kundli), dashas, the panchang, kundli matching, numerology numbers and written readings. One key calls both the Astrology API and the Numerology API, in English and other languages.
See our APIsHow many endpoints does API for Astrology have?
API for Astrology has 81 endpoints on one key. The Astrology API has 65 and the Numerology API has 16. The astrology endpoints cover charts, dashas, the panchang, matching, transits, yogas, doshas, remedies and readings. The numerology endpoints cover the core numbers, names, phone and vehicle numbers, compatibility and a printable report.
Open the API referenceHow do I start using API for Astrology?
Sign up with your email, confirm it and create a test key in your account. Test keys are free on every plan. They return full readings for the sample charts, John Doe and Jane Doe. For real charts, the Free plan gives 2,000 calls and 150 reading credits a month, with no card needed.
Read the quickstartAre API for Astrology readings written by rules or by AI?
By rules, not AI. Each reading comes from a fixed library of text written ahead of time. Stated rules pick the text from the chart. Every rule is in the public rulebook with its own ID, such as DO-01 for manglik dosha. The same birth details always get the same words, in every language.
Browse the rulebookWhich dates does API for Astrology cover?
Every astrology calculation covers dates from January 1, 1850, to December 31, 2149. That is the range of NASA JPL's DE440s planet data, which the API uses for planet positions. A birth date outside the range gets a 422 error with the code invalid_input. Numerology birth dates are not tied to this range.
NASA JPL planet data (DE440)How the API works
What can the API calculate?
Birth charts (kundli), dashas (planetary periods), the panchang (Hindu calendar), muhurat (good times) and festival dates. Kundli matching, transits (the planets' current positions), daily horoscopes, yogas (planet combinations) and doshas (chart flaws). Planetary strength, the Jaimini system, remedies, and written readings and reports. Every answer comes back as JSON.
See all featuresWhich 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 ayanamsasDoes the astrology API do Western astrology or KP?
It is Vedic only, with no Western (tropical) positions. For KP (Krishnamurti Paddhati), POST /v1/kp returns house borders by the Placidus method. It also returns sub lords (the finer rulers KP reads) and significators (the planets that give each house its results). Every other endpoint keeps whole-sign houses. You can also use the KP ayanamsa in any call with "ayanamsa": "kp".
How accurate are the astrology API's planet positions?
We check them against NASA JPL Horizons, NASA's planet position service. On 25,571 positions from 1850 to 2149, the Sun and planets agree within 0.001 arc seconds. The Moon agrees within 0.011. We also cast 2,000 random charts from a birth clock time and compare them with Swiss Ephemeris. There, the Sun and planets agree within 0.06 arc seconds. The Moon agrees within 0.41 arc seconds, and the rising sign within 0.004. The Lahiri ayanamsa (zodiac offset) agrees with Swiss Ephemeris within 0.001 arc seconds, checked on 8 dates from 1900 to 2100. Our tests fail if a result drifts past these figures. An arc second is 1/3,600 of a degree.
See how we testDoes the astrology API return readings in plain English, or only numbers?
Both. Every calculation returns the numbers as JSON. The reading endpoints, and checks such as doshas and yogas, also return short readings in plain words. Add lang, such as lang=hi, for another language. Each reading names the rule it applied, so your team can check it.
See the readingsDoes the astrology API work for any place in the world?
Yes. Send the latitude, longitude and time zone of any place. Inside the polar circles, some dates have no sunrise. Calls that need sunrise, such as the panchang, then answer 422 with the code no_sunrise instead of guessing.
Read about errorsDoes the astrology API return Hindi?
Yes. Send lang=hi. Names and reading text come in Hindi from the same computation: weekdays, colors, sign names and gemstone names. Other languages work the same way, and GET /v1/meta lists every lang code. Endpoint paths, codes and error messages stay in English.
How Hindi answers workUsing the API
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 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 conventionsDoes the astrology API return chart images?
Yes. POST /v1/chart/svg draws the birth chart, or any divisional chart, in North, South or East Indian style. It sends an SVG image, or a PNG picture with format=png. The other endpoints return the data, so you can also draw the chart yourself.
What the kundli API returnsCan I use the astrology API with an AI assistant or chatbot?
Yes. Offer a few endpoints to the model as tools. The model calls the API for the chart and quotes the result, so it does not invent positions or rules. The reading text comes from fixed rules, not an AI model. So the same question gets the same answer in your tests. The guide lists a good first set of tools and the fields to quote.
Read the AI assistants guideCan 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 reportDo you store the birth details I send?
No. The API uses them only to compute the answer, and request bodies are not stored. Send birth details in the body of a POST request, because web addresses (URLs) can appear in server logs.
Read the privacy policyWhich programming languages can I use?
Any common one. Your code only has to make an HTTPS call and parse the JSON that comes back. The docs show every call in curl, JavaScript, Python and PHP. There is no SDK to install. To try every call, download our Postman collection or OpenAPI file from the API reference.
Open the API referenceHow do I get help, and is there a status page?
Write to us from the contact page. We aim to reply within one business day. The status page shows whether the API is working right now.
See the status pageKeys and limits
Does one key work for every API you offer?
Yes. One account, one set of keys and one plan cover every service we offer, with one invoice.
See our APIsHow much does the astrology API cost?
The Free plan costs nothing and includes 2,000 calls and 150 reading credits a month. Starter is $29 a month, Growth $99 and Scale $399. These launch prices last until March 31, 2027. Then they are $39, $139 and $549. Paying for a year costs the same as 10 months. Test keys are free on every plan.
See all plansIs there a free plan?
Yes. Sign up, confirm your email and create a key in your account. The Free plan can call every endpoint. It gives 2,000 calls a month for calculations and 150 reading credits for written readings. Test keys on any plan get their own free allowance of 1,000 calls a month. They get full readings for the sample charts (John Doe and Jane Doe). A live product on the Free plan shows a "Powered by API for Astrology" link wherever it shows API output. The live demo on the home page shows one real call without a key.
Read the quickstartWhat 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 limitsFree tools
Try it without writing code
Ten free tools run on our APIs. Enter a birth date, time and place, or a name and a birth date, and see the answer in your browser.
Free kundli
Your Vedic birth chart: the rising sign and all nine planets, with sign, house and nakshatra.
Make my kundliKundli matching
The 36-point guna milan score, the manglik check and a plain verdict for two people.
Match two chartsToday's panchang
Tithi (lunar day), nakshatra, sunrise, rahu kaal and the choghadiya (good and bad parts of the day) for your own city.
See today's panchangManglik dosha check
Whether Mars makes a chart manglik, counted three ways, with any exceptions.
Check for manglik doshaSade sati check
Whether sade sati, Saturn's 7.5-year pass around your Moon sign, is running for you, which phase, and the dates.
Check my sade satiNakshatra finder
Your birth star: the Moon's nakshatra, its quarter (pada), its ruler and your Moon sign.
Find my nakshatraNumerology calculator
Your mulank, bhagyank and name number from a name and a birth date.
Find my numbersLife path number calculator
Your life path number with master numbers kept, plus your expression, soul urge and personality numbers.
Find my life pathName numerology calculator
A name's Chaldean and Pythagorean numbers, with other spellings compared against your birth date.
Check my nameLo Shu grid calculator
The Lo Shu grid from a birth date, with missing and repeated numbers and full and empty lines.
Draw my Lo Shu grid
Astrology API
Try it with a free test key
Create an account and a test key, then call any endpoint. Or try a request in the API reference first.
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