The Kundli API (kundali API) returns a Vedic birth chart as JSON for any birth date, time and place. It covers basic astro details, planetary positions, D1 and divisional charts up to D60 (SVG and base64), Vimshottari and other dashas, doshas and yogas, in 8 Indian languages.
Verified live against the DivineAPI API on 2 October 2026.
"Kundli" and "kundali" are two spellings of the same thing: the Vedic (sidereal) birth chart. This repo is the developer quickstart for DivineAPI's kundli endpoints, which are part of the Vedic API (140+ endpoints). DivineAPI as a whole has 300+ endpoints across 8 domains.
1. Get your keys. Start the 14-day free trial (credit card required to activate the trial), then copy your API key and auth token from the dashboard.
Every request is a POST with multipart/form-data, and needs both:
- header
Authorization: Bearer YOUR_AUTH_TOKEN - form field
api_key=YOUR_API_KEY
Runnable files: examples/ (curl, Python, Node.js, PHP).
2. curl
curl -s -X POST "https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-F "api_key=YOUR_API_KEY" \
-F "full_name=Rahul Kumar" \
-F "day=24" -F "month=05" -F "year=2023" \
-F "hour=14" -F "min=40" -F "sec=43" \
-F "gender=male" -F "place=new delhi" \
-F "lat=28.7041" -F "lon=77.1025" -F "tzone=5.5" \
-F "lan=en"3. Python (requests)
import requests
URL = "https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details"
AUTH_TOKEN = "YOUR_AUTH_TOKEN"
API_KEY = "YOUR_API_KEY"
birth = {
"full_name": "Rahul Kumar",
"day": "24", "month": "05", "year": "2023",
"hour": "14", "min": "40", "sec": "43",
"gender": "male", "place": "new delhi",
"lat": "28.7041", "lon": "77.1025", "tzone": "5.5",
"lan": "en",
}
# multipart/form-data: every field is sent as a form part
fields = {"api_key": API_KEY, **birth}
resp = requests.post(
URL,
headers={"Authorization": f"Bearer {AUTH_TOKEN}"},
files={k: (None, v) for k, v in fields.items()},
timeout=60,
)
body = resp.json()
if body.get("success") != 1: # legacy hosts return HTTP 200 even on errors
raise SystemExit(f"API error: {body.get('msg')}")
d = body["data"]
print(d["moonsign"], d["nakshatra"], d["tithi"], d["gana"])
# Cancer Punarvasu Panchmi DevNode.js (18+, built-in fetch)
const URL = "https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details";
const AUTH_TOKEN = "YOUR_AUTH_TOKEN";
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
const fields = {
api_key: API_KEY,
full_name: "Rahul Kumar",
day: "24", month: "05", year: "2023",
hour: "14", min: "40", sec: "43",
gender: "male", place: "new delhi",
lat: "28.7041", lon: "77.1025", tzone: "5.5",
lan: "en",
};
for (const [k, v] of Object.entries(fields)) form.append(k, v);
const res = await fetch(URL, {
method: "POST",
headers: { Authorization: `Bearer ${AUTH_TOKEN}` },
body: form,
});
const body = await res.json();
if (body.success !== 1) throw new Error(`API error: ${JSON.stringify(body.msg)}`);
const { moonsign, nakshatra, tithi, gana } = body.data;
console.log(moonsign, nakshatra, tithi, gana);
// Cancer Punarvasu Panchmi DevSave it as kundli.mjs and run node kundli.mjs (top-level await needs an ES module).
4. PHP (cURL)
<?php
$ch = curl_init("https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_AUTH_TOKEN"],
// An array (not a query string) makes cURL send multipart/form-data
CURLOPT_POSTFIELDS => [
"api_key" => "YOUR_API_KEY",
"full_name" => "Rahul Kumar",
"day" => "24", "month" => "05", "year" => "2023",
"hour" => "14", "min" => "40", "sec" => "43",
"gender" => "male", "place" => "new delhi",
"lat" => "28.7041", "lon" => "77.1025", "tzone" => "5.5",
"lan" => "en",
],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($body["success"] ?? 0) !== 1) {
exit("API error: " . json_encode($body["msg"] ?? $body));
}
echo $body["data"]["moonsign"] . " " . $body["data"]["nakshatra"] . PHP_EOL;POST /indian-api/v3/basic-astro-details (real response, trimmed):
{
"success": 1,
"data": {
"full_name": "Rahul Kumar",
"place": "new delhi",
"timezone": "5.5",
"sunrise": "2023-05-24 05:26:11",
"sunset": "2023-05-24 19:10:31",
"tithi": "Panchmi",
"paksha": "Shukla",
"paya": { "type": "Silver", "result": "Best" },
"sunsign": "Taurus",
"moonsign": "Cancer",
"chandramasa": "Jyeshtha",
"nakshatra": "Punarvasu",
"vaar": "Wednesday",
"varna": "Brahmin",
"vashya": "Jalchar",
"yoni": "Marjar",
"gana": "Dev",
"nadi": "Adi",
"yoga": "Ganda",
"karana": "Balav",
...
}
}sunsign here is sidereal (Vedic), so it is usually one sign earlier than the Western sun sign for the same birth moment.
Planetary positions POST /indian-api/v2/planetary-positions returns 13 entries (Ascendant plus the planets and nodes). One entry, real values:
{
"name": "Sun",
"full_degree": "38.7863050",
"speed": "0.9614368",
"is_retro": "false",
"is_combusted": "false",
"longitude": "8:47:10",
"sign": "Taurus",
"rashi_lord": "Venus",
"nakshatra": "Krittika",
"nakshatra_pada": 4,
"nakshatra_lord": "Sun",
"house": 9,
"lord_of": "Twelfth House",
...
}Divisional chart POST /indian-api/v1/horoscope-chart/D9 (navamsa) returns svg, base64_image (a data:image/svg+xml;base64,... string) and the chart as data, keyed by house:
{
"success": 1,
"data": {
"svg": "<svg height=\"360\" width=\"360\" ...>",
"base64_image": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MCIgd2lkdGg9Ij...",
"data": {
"1": { "sign_no": 1, "planet": [{ "name": "Ascendant", "symbol": "As" }] },
"2": { "sign_no": 2, "planet": [{ "name": "Venus", "symbol": "Ve" }] },
"3": { "sign_no": 3, "planet": [{ "name": "Jupiter", "symbol": "Ju" }, { "name": "Rahu", "symbol": "Ra" }] },
...
}
}
}Vimshottari dasha POST /indian-api/v1/vimshottari-dasha with dasha_type=maha-dasha:
{
"success": 1,
"data": {
"date": "2023-05-24",
"time": "14:40:43",
"maha_dasha": {
"Jupiter": { "start_date": "2007-08-31", "end_date": "2023-08-23" },
"Saturn": { "start_date": "2023-08-23", "end_date": "2042-08-23" },
"Mercury": { "start_date": "2042-08-23", "end_date": "2059-08-23" },
...
}
}
}- A kundli app or website page: birth form in, North or South Indian chart (SVG) plus planet table out.
- A dasha timeline that shows the current and coming Vimshottari periods for a user.
- A dosha check (Manglik, Kaal Sarp, Sade Sati, Pitra) for a matrimony or consultation app.
- Astrologer tools: divisional charts (D1 to D60), shadbala, ashtakvarga and yogas in one dashboard.
- Regional-language kundli pages in Hindi, Bengali, Marathi, Tamil, Telugu, Malayalam or Kannada.
All kundli endpoints are on host https://astroapi-3.divineapi.com and take the 13 standard birth fields (see Parameters) plus lan. Each row links to its docs page.
| Endpoint | Path | Docs |
|---|---|---|
| Basic astro details | /indian-api/v3/basic-astro-details |
docs |
| Planetary positions | /indian-api/v2/planetary-positions |
docs |
| Horoscope chart (D1 and divisional) | /indian-api/v1/horoscope-chart/{chart_id} |
docs |
| Bhava kundli (houses 1 to 12) | /indian-api/v1/bhava-kundli/{1-12} |
docs |
| Ascendant report | /indian-api/v2/ascendant-report |
docs |
| Sub planet positions | /indian-api/v2/sub-planet-positions |
docs |
| Vargottama planets | /indian-api/v1/vargottama-planets |
docs |
| Sudarshana chakra | /indian-api/v1/sudarshana-chakra |
docs |
chart_id values for horoscope-chart: D1, D2, D3, D4, D5, D7, D9, D10, D12, D16, D20, D24, D27, D30, D40, D45, D60, plus chalit, SUN, MOON and cuspal. D6, D8, D11 and plain numbers are not supported. The chart endpoints also need show_planet_degree, show_planet_retro, show_modern_planets, planet_color, sign_color, line_color, chart_color and chart_type (north or south).
| Endpoint | Path | Docs |
|---|---|---|
| Vimshottari dasha | /indian-api/v1/vimshottari-dasha |
docs |
| Maha dasha analysis | /indian-api/v1/maha-dasha-analysis |
docs |
| Antar dasha analysis | /indian-api/v1/antar-dasha-analysis |
docs |
| Pratyantar dasha analysis | /indian-api/v1/pratyantar-dasha-analysis |
docs |
| Yogini dasha | /indian-api/v2/yogini-dasha |
docs |
| Kaal chakra dasha | /indian-api/v1/kaal-chakra-dasha |
docs |
vimshottari-dasha needs dasha_type: maha-dasha (maha dasha only), antar-dasha (adds antar dasha), pratyantar-dasha (adds pratyantar dasha) or sookshma-dasha (adds sookshma dasha).
| Endpoint | Path | Docs |
|---|---|---|
| Manglik dosha | /indian-api/v2/manglik-dosha |
docs |
| Kaal sarpa dosha | /indian-api/v1/kaal-sarpa-yoga |
docs |
| Sadhe sati | /indian-api/v3/sadhe-sati |
docs |
| Pitra dosha | /indian-api/v1/pitra-dosha |
docs |
| Shani ashtam shani | /indian-api/v1/shani-ashtam-shani |
docs |
| Endpoint | Path | Docs |
|---|---|---|
| Yogas | /indian-api/v2/yogas |
docs |
| Planet analysis | /indian-api/v2/planet-analysis |
docs |
| Shadbala | /indian-api/v2/shadbala |
docs |
| Bhav bala (house strength) | /indian-api/v1/bhav-bala |
docs |
| Bhinnashtakvarga | /indian-api/v1/bhinnashtakvarga/ashtakvarga |
docs |
| Bhava analysis | /indian-api/v1/bhava-analysis |
docs |
| Composite friendship | /indian-api/v1/composite-friendship |
docs |
| Ghata chakra | /indian-api/v1/ghata-chakra |
docs |
| Endpoint | Path | Docs |
|---|---|---|
| Gemstone suggestion | /indian-api/v2/gemstone-suggestion |
docs |
| Rudraksha suggestion | /indian-api/v1/rudraksha-suggestion |
docs |
| Planet remedies | /indian-api/v1/planet-remedies |
docs |
Matching endpoints take the birth fields twice, with p1_ and p2_ prefixes (api_key once). The main ones are Ashtakoot milan (36 gunas, /indian-api/v2/ashtakoot-milan, docs) and Dashakoot milan (/indian-api/v2/dashakoot-milan, docs), plus matching versions of basic details, planets, dasha, Manglik and charts.
The full matching guide, with samples and a real response, is in kundli-matching-api.
| Endpoint | Path | Docs |
|---|---|---|
| Varsha pravesh | /indian-api/v1/varshphal/varsha-pravesh |
docs |
| Basic astro details | /indian-api/v1/varshphal/basic-astro-details |
docs |
| Planetary positions | /indian-api/v1/varshphal/planetary-positions |
docs |
| Horoscope chart | /indian-api/v1/varshphal/horoscope-chart/{chart_id} |
docs |
| Tajika aspect | /indian-api/v1/varshphal/tajika-aspect |
docs |
| Muntha | /indian-api/v1/varshphal/muntha |
docs |
| Panchadhikari | /indian-api/v1/varshphal/panchadhikari |
docs |
| Tri-pataki chakra | /indian-api/v1/varshphal/tri-pataki-chakra |
docs |
| Mudda dasha | /indian-api/v1/varshphal/mudda-dasha |
docs |
| Yogini dasha (annual) | /indian-api/v1/varshphal/yogini-dasha |
docs |
| Patyanini dasha | /indian-api/v1/varshphal/patyanini-dasha |
docs |
| Planetary strengths | /indian-api/v1/varshphal/planetary-strengths |
docs |
| Sahams | /indian-api/v1/varshphal/sahams |
docs |
| Yogas (annual) | /indian-api/v1/varshphal/yogas |
docs |
| Group | Docs |
|---|---|
| Lal Kitab (planets, chart, teva, debts, varshphal) | lal-kitab-api docs · repo: lal-kitab-api |
| Jaimini astrology (chara dasha, padas, karakamsha) | jaimini-astrology |
| Kundli transit (ascendant and moon sign) | kundali-transit |
| Kundali PDF reports (white-label) | pdf-report-api |
DivineAPI has 125+ white-label PDF report types; public samples are at reports.divineapi.com/reports.
The 13 standard birth fields:
| Field | Example | Notes |
|---|---|---|
api_key |
YOUR_API_KEY |
Form field, sent on every request (plus the Bearer header) |
full_name |
Rahul Kumar |
|
day, month, year |
24, 05, 2023 |
Separate fields, not one date string |
hour, min, sec |
14, 40, 43 |
24-hour clock. sec is required: send 0 if unknown |
gender |
male |
|
place |
new delhi |
Lowercase city string |
lat, lon |
28.7041, 77.1025 |
Decimal degrees |
tzone |
5.5 |
Decimal UTC offset (5.5 = IST). Never +5:30 or a zone name. Not DST-adjusted: send the real offset for the birth moment |
lan |
en |
Optional, default en. See Languages |
- Check
success, not the HTTP status.astroapi-3always returns HTTP 200.success: 1= OK,success: 2= validation error,success: 3= auth error; the reason is inmsg. Do not retry on 3; fix the key or token. - All values are strings in the multipart form.
- Sidereal, Lahiri ayanamsa (fixed). Every Vedic endpoint uses the Lahiri ayanamsa; there is no parameter to change it.
- Engine: astronomical positions come from Swiss Ephemeris, used under a commercial licence.
planetary-positionsacceptsnode_type=meannode(default) ortruenodefor Rahu and Ketu.
Set lan to one of DivineAPI's 8 Vedic language codes. DivineAPI uses its own codes, not ISO 639-1: the ISO codes mr, ta and te are rejected with success: 2 and "Please enter valid language".
| Language | lan |
|---|---|
| English | en |
| Hindi | hi |
| Bengali | bn |
| Marathi | ma |
| Tamil | tm |
| Telugu | tl |
| Malayalam | ml |
| Kannada | kn |
With lan=hi the same call returns (real response, trimmed):
{ "tithi": "पंचमी", "paksha": "शुक्ल", "sunsign": "वृषभ", "moonsign": "कर्क", "nakshatra": "पुनर्वसु", "vaar": "बुधवार", ... }| Install / URL | |
|---|---|
| Python SDK | pip install divineapi (divineapi-python) |
| Node SDK | npm install divineapi (divineapi-node) |
| PHP SDK | composer require divineapi/divineapi (divineapi-php) |
| Model Context Protocol (MCP) server (Indian / Vedic) | https://mcp.divineapi.com/indian/mcp (setup, mcp-indian-astrology) |
The MCP server lets Claude, Cursor and other MCP clients call the kundli, panchang, dasha, dosha, Lal Kitab and matching tools directly. The examples above use plain HTTP, so they work in any language without an SDK.
Kundli endpoints come with every Vedic plan (Vedic Sampoorna, Vedic Ananta, Vedic Prakash). The larger plans add more kundli endpoints, and kundli matching needs Vedic Prakash. The per-plan endpoint list is on divineapi.com/pricing.
Is it "kundli API" or "kundali API"?
Both. Kundli and kundali are two spellings of the same Vedic birth chart (janam kundli). The endpoints live under /indian-api/ and the docs section is kundli-api.
Which ayanamsa does the Kundli API use? Lahiri, fixed. The planet positions are sidereal; no request parameter changes the ayanamsa.
Can I get a North Indian or South Indian chart image?
Yes. horoscope-chart/{chart_id} takes chart_type (north or south) and colour fields, and returns an SVG string, a base64 data URI and the house-by-house planet list.
Which divisional charts are supported? D1, D2, D3, D4, D5, D7, D9, D10, D12, D16, D20, D24, D27, D30, D40, D45 and D60, plus chalit, Sun, Moon and cuspal charts.
Does it do kundli matching (gun milan)?
Yes: Ashtakoot milan, Dashakoot milan and matching Manglik, using p1_ and p2_ birth fields. See kundli-matching-api and the match-making docs.
Can I test the Kundli API before paying? Yes. Start the 14-day free trial (credit card required to activate the trial), copy the key and token, and run the basic-astro-details call above with your own birth data. Vedic plan prices are on divineapi.com/pricing.
| Repo | What it covers |
|---|---|
| kundli-matching-api | Kundli matching: Ashtakoot and Dashakoot milan, matching Manglik |
| lal-kitab-api | Lal Kitab planets, chart, teva, debts and varshphal |
| astrology-api | Overview of all DivineAPI products (300+ endpoints) |
| panchang-api | Daily panchang, choghadiya, auspicious timings, muhurat |
| hindu-festival-api | Hindu festival calendar by month, sankranti, Tamil and Malayalam festivals |
| birth-chart-api | Western (tropical) natal chart |
| horoscope-api | Daily to yearly horoscopes in 25 languages |
| numerology-api | Numerology core numbers and reports |
| tarot-api | Tarot readings |
| mcp-indian-astrology | Vedic MCP server |
- Docs: developers.divineapi.com/indian-api/kundli-api
- Postman collection: documenter.getpostman.com/view/26759678/2sBYAysU8Y
- API status: status.divineapi.com
- Help centre: support.divineapi.com
DivineAPI was founded in 2021 in New Delhi, India, and is used by 600+ businesses.
Code samples in this repository are released under the MIT License (see LICENSE). The DivineAPI name and logo are trademarks of DivineAPI.
