Developers / Kundli API
Developer API
Kundli API — Birth Chart Calculation API
Generate a Kundli / Kundali (birth chart) from date, time and place of birth: ascendant, nine planets, twelve houses, nakshatra, pada and divisional charts D1–D60 — calculated with the sidereal zodiac and Lahiri ayanamsha.
What the Kundli API returns
Ascendant & planets
Sign, exact degree, nakshatra, pada, dignity, retrograde and combust status for the ascendant and all nine grahas (Rahu/Ketu as mean node).
Twelve houses
Whole-sign or equal-house, with each house's sign, lord and occupying planets.
Divisional charts
Navamsa (D9) through D60, so you can build varga analysis without re-deriving each chart yourself.
Checked against JPL
Planet longitudes agree with NASA JPL's ephemeris to a few thousandths of a degree. Sidereal zodiac, Lahiri ayanamsa — stated in every response.
Request and response
Request
curl -X POST https://api.astronirnay.com/v1/chart \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"birth": {
"date": "1990-05-15",
"time": "10:30",
"latitude": 19.076,
"longitude": 72.8777,
"timezone": "Asia/Kolkata"
}
}'
The same call in Node.js
const res = await fetch("https://api.astronirnay.com/v1/chart", {
method: "POST",
headers: { "x-api-key": process.env.ASTRONIRNAY_KEY, "content-type": "application/json" },
body: JSON.stringify({ birth: { date: "1990-05-15", time: "10:30",
latitude: 19.076, longitude: 72.8777 } }),
});
const { data } = await res.json();
console.log(data.summary.moon_sign); // "Sagittarius"
Response (shortened)
{
"success": true,
"data": {
"ascendant": { "sign": "Cancer", "degree_in_sign": 2.42, "nakshatra": { "name": "Punarvasu" } },
"planets": [
{ "name": "Sun", "sign": "Taurus", "degree_in_sign": 0.39,
"nakshatra": { "name": "Krittika", "pada": 2 }, "house": 11, "retrograde": false },
{ "name": "Moon", "sign": "Sagittarius", "degree_in_sign": 29.84,
"nakshatra": { "name": "Uttara Ashadha", "pada": 1 }, "house": 6, "retrograde": false }
],
"houses": [ { "number": 1, "sign": "Cancer", "lord": "Moon", "occupants": [] } ],
"divisional_charts": { "D9": { "ascendant": { "sign": "Scorpio" } } },
"summary": { "moon_sign": "Sagittarius", "birth_nakshatra": { "name": "Uttara Ashadha" } }
},
"meta": { "request_id": "req_0123456789abcdef", "api_version": "v1" }
}
1 credit per successful call. Failed requests are never charged.
Kundli API: common questions
Is this a Kundli API or a Kundali API?
Same endpoint, both spellings. POST /v1/chart returns the full birth chart either way — this is also commonly called a birth chart API or horoscope calculation API.
Vedic or Western astrology?
Vedic (sidereal) by default, using the Lahiri ayanamsa. We don't silently fall back to tropical calculations; unsupported options are rejected with a clear error.
Which divisional charts (vargas) are supported?
D1 (Rasi) through D60, including Navamsa (D9), Dasamsa (D10) and Shashtiamsa (D60), returned alongside the main chart in one call.
How do I get planet positions or houses without the full chart?
Call POST /v1/planets or POST /v1/houses directly if you only need one part of the response.
What if I only have a city name, not coordinates?
Use GET /v1/places/search first to resolve a place name to latitude, longitude and time zone, then pass those into the chart request.