Kundli API demo

One real call to POST /v1/kundli (2 credits): the request body holds a date, a time and a place as latitude and longitude, and the response holds the lagna and the nine grahas. Edit the JSON body below and press Send. Use made-up birth details: nothing you send is stored.

Try it

Leave empty to use the shared demo key (limited). Test keys only: never charged. Kept in this browser tab and sent through this site to the API. Create one

What comes back

  • lagna: the rising sign, its degree, nakshatra and pada.
  • planets: one entry for each graha, Sun to Ketu, with its sidereal longitude, sign, degree in the sign, nakshatra, pada, nakshatra lord, house and whether it is retrograde.

Signs and nakshatras come as ids (leo, magha) with labels beside them, so you can translate or style them in your own app. The default ayanamsa is Lahiri; the conventions page lists every choice the engine makes.

To see the same chart drawn, with the planets in a table and the dasha alongside, use the playground. For the chart as an image, try the chart image demo.

The same call in code

curl -X POST 'https://api.astrologics.in/v1/kundli' \
  -H 'Authorization: Bearer al_test_YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"birth":{"date":"1990-08-13","time":"06:30","place":{"latitude":28.6139,"longitude":77.209}}}'
import json
import urllib.error
import urllib.request

body = {
    "birth": {
        "date": "1990-08-13",
        "time": "06:30",
        "place": {
            "latitude": 28.6139,
            "longitude": 77.209,
        },
    },
}

req = urllib.request.Request(
    "https://api.astrologics.in/v1/kundli",
    method="POST",
    headers={"Authorization": "Bearer al_test_YOUR_KEY", "Content-Type": "application/json"},
    data=json.dumps(body).encode(),
)
try:
    with urllib.request.urlopen(req) as res:
        print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
    print(err.code, err.read().decode())
<?php
$ch = curl_init('https://api.astrologics.in/v1/kundli');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"birth":{"date":"1990-08-13","time":"06:30","place":{"latitude":28.6139,"longitude":77.209}}}',
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Questions

What if the birth time is unknown?

Mark the time as unknown, as birth input shows. The fields that depend on the lagna or the houses are left out and listed in warnings, never filled with a noon default.

Which time zone does the time use?

The local time at the birth place. The API looks up the zone and the offset in force on that date, including old offsets and daylight saving. The place and timezone lookup shows what it finds.

Can I get divisional charts?

Yes: D9, D10 and the other vargas come from the kundli reference.

Want your own kundli rather than an API? Make one free on astrologics.in.

All developer tools