The Kundli Matching API compares the Vedic birth charts of two people and returns the result as JSON. It covers Ashtakoot milan (36 gunas), Dashakoot milan, Nav Pancham yoga, Manglik dosha for both charts, matching planetary positions, Vimshottari dasha and divisional charts, in 8 Indian languages.
Verified live against the DivineAPI API on 2 October 2026.
Kundli matching (also called kundali matching, gun milan or horoscope matching) is the Vedic compatibility check done before a marriage. This repo is the developer quickstart for DivineAPI's match-making endpoints, which are part of the Vedic API (140+ endpoints). Samples and responses were verified live on 2 Oct 2026.
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
Every matching endpoint takes two sets of birth details: fields starting with p1_ for the first person and p2_ for the second.
2. curl: Ashtakoot milan (36 gunas)
curl -s -X POST "https://astroapi-3.divineapi.com/indian-api/v2/ashtakoot-milan" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-F "api_key=YOUR_API_KEY" \
-F "p1_full_name=Rahul Kumar" -F "p1_gender=male" \
-F "p1_day=24" -F "p1_month=05" -F "p1_year=1990" \
-F "p1_hour=14" -F "p1_min=40" -F "p1_sec=0" \
-F "p1_place=new delhi" -F "p1_lat=28.6139" -F "p1_lon=77.2090" -F "p1_tzone=5.5" \
-F "p2_full_name=Priya Sharma" -F "p2_gender=female" \
-F "p2_day=12" -F "p2_month=08" -F "p2_year=1992" \
-F "p2_hour=09" -F "p2_min=15" -F "p2_sec=0" \
-F "p2_place=mumbai" -F "p2_lat=19.0760" -F "p2_lon=72.8777" -F "p2_tzone=5.5" \
-F "lan=en"3. Python (requests)
import requests
URL = "https://astroapi-3.divineapi.com/indian-api/v2/ashtakoot-milan"
AUTH_TOKEN = "YOUR_AUTH_TOKEN"
API_KEY = "YOUR_API_KEY"
def person(prefix, name, gender, day, month, year, hour, minute, place, lat, lon, tzone="5.5"):
"""Birth details for one person, with the p1_ or p2_ prefix the matching endpoints expect."""
values = {"full_name": name, "gender": gender, "day": day, "month": month, "year": year,
"hour": hour, "min": minute, "sec": "0", "place": place, "lat": lat, "lon": lon, "tzone": tzone}
return {f"{prefix}_{k}": v for k, v in values.items()}
fields = {
"api_key": API_KEY,
**person("p1", "Rahul Kumar", "male", "24", "05", "1990", "14", "40", "new delhi", "28.6139", "77.2090"),
**person("p2", "Priya Sharma", "female", "12", "08", "1992", "09", "15", "mumbai", "19.0760", "72.8777"),
"lan": "en",
}
resp = requests.post(
URL,
headers={"Authorization": f"Bearer {AUTH_TOKEN}"},
files={k: (None, v) for k, v in fields.items()}, # multipart/form-data
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"]
for koota, row in d["ashtakoot_milan"].items():
print(f'{koota:<13} {row["points_obtained"]}/{row["max_ponits"]}') # "max_ponits" is the real field name
total = d["ashtakoot_milan_result"]
print(f'Total {total["points_obtained"]}/{total["max_ponits"]}, compatible: {total["is_compatible"]}')Output (real run):
varna 1/1
vashya 2/2
tara 3/3
yoni 0/4
graha_maitri 5/5
gana 1/6
bhakoota 0/7
nadi 0/8
Total 12/36, compatible: false
Node.js (18+, built-in fetch)
const URL = "https://astroapi-3.divineapi.com/indian-api/v2/ashtakoot-milan";
const AUTH_TOKEN = "YOUR_AUTH_TOKEN";
const API_KEY = "YOUR_API_KEY";
// Birth details for one person, with the p1_ or p2_ prefix the matching endpoints expect.
const person = (prefix, b) =>
Object.fromEntries(Object.entries(b).map(([k, v]) => [`${prefix}_${k}`, v]));
const fields = {
api_key: API_KEY,
...person("p1", {
full_name: "Rahul Kumar", gender: "male", day: "24", month: "05", year: "1990",
hour: "14", min: "40", sec: "0", place: "new delhi", lat: "28.6139", lon: "77.2090", tzone: "5.5",
}),
...person("p2", {
full_name: "Priya Sharma", gender: "female", day: "12", month: "08", year: "1992",
hour: "09", min: "15", sec: "0", place: "mumbai", lat: "19.0760", lon: "72.8777", tzone: "5.5",
}),
lan: "en",
};
const form = new FormData();
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 { ashtakoot_milan_result: total, manglik_dosha, nadi_dosha, bhakoot_dosha } = body.data;
console.log(`Total ${total.points_obtained}/${total.max_ponits}, compatible: ${total.is_compatible}`);
console.log("Manglik:", manglik_dosha, "Nadi dosha:", nadi_dosha, "Bhakoot dosha:", bhakoot_dosha);Save it as matching.mjs and run node matching.mjs (top-level await needs an ES module).
4. PHP (cURL)
<?php
$ch = curl_init("https://astroapi-3.divineapi.com/indian-api/v2/ashtakoot-milan");
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",
"p1_full_name" => "Rahul Kumar", "p1_gender" => "male",
"p1_day" => "24", "p1_month" => "05", "p1_year" => "1990",
"p1_hour" => "14", "p1_min" => "40", "p1_sec" => "0",
"p1_place" => "new delhi", "p1_lat" => "28.6139", "p1_lon" => "77.2090", "p1_tzone" => "5.5",
"p2_full_name" => "Priya Sharma", "p2_gender" => "female",
"p2_day" => "12", "p2_month" => "08", "p2_year" => "1992",
"p2_hour" => "09", "p2_min" => "15", "p2_sec" => "0",
"p2_place" => "mumbai", "p2_lat" => "19.0760", "p2_lon" => "72.8777", "p2_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));
}
$total = $body["data"]["ashtakoot_milan_result"];
echo "Total {$total['points_obtained']}/{$total['max_ponits']}, compatible: {$total['is_compatible']}" . PHP_EOL;Runnable copies that read your credentials from environment variables are in examples/ (curl, Python, Node.js and PHP, with a .env.example).
Prefer a client library? pip install divineapi, npm install divineapi or composer require divineapi/divineapi (see SDKs and MCP).
Ashtakoot milan, live response (2 Oct 2026, trimmed). Each of the 8 kootas has the value for each person, the points obtained and the maximum; the result block has the total out of 36.
{
"success": 1,
"data": {
"ashtakoot_milan": {
"varna": {
"p1": "Vaishya",
"p2": "Vaishya",
"points_obtained": 1,
"max_ponits": 1,
"area_of_life": "Karmic Classification",
"description": "There shall be a complementing relationship between the couple. Rahul Kumar shall be dedicated towards providing for the family..."
},
"vashya": { "p1": "quadruped", "p2": "quadruped", "points_obtained": 2, "max_ponits": 2, "area_of_life": "Evolutionary Character", "description": "..." },
"tara": { "p1": "Vipat", "p2": "Kshema", "points_obtained": 3, "max_ponits": 3, "area_of_life": "Luck", "description": "..." },
"yoni": { "p1": "Mesha", "p2": "Vanar", "points_obtained": 0, "max_ponits": 4, "area_of_life": "Sexual Compatibility", "description": "..." },
"graha_maitri": { "p1": "Venus", "p2": "Saturn", "points_obtained": 5, "max_ponits": 5, "area_of_life": "Love and Affection", "description": "..." },
"gana": { "p1": "Rakshasa", "p2": "Dev", "points_obtained": 1, "max_ponits": 6, "area_of_life": "Temperament", "description": "..." },
"bhakoota": { "p1": "Taurus", "p2": "Capricorn", "points_obtained": 0, "max_ponits": 7, "area_of_life": "Emotional Bonding", "description": "..." },
"nadi": { "p1": "Anta", "p2": "Anta", "points_obtained": 0, "max_ponits": 8, "area_of_life": "Health and Progeny", "description": "..." }
},
"ashtakoot_milan_result": {
"points_obtained": 12,
"max_ponits": 36,
"is_compatible": "false",
"content": "The compatibility score between the Rahul Kumar and Priya Sharma is only 12 out of 36, which is not very high..."
},
"manglik_dosha": {
"p1": "true",
"p2": "false"
},
"nadi_dosha": "true",
"bhakoot_dosha": "true"
}
}Dashakoot milan for the same two people (/indian-api/v2/dashakoot-milan, live response, trimmed) scores 10 factors, also out of 36, and adds rajju_dosha:
{
"success": 1,
"data": {
"dashakoot_milan": {
"dina": { "p1": "Krittika", "p2": "Shravan", "result": "Good", "points_obtained": 3, "max_ponits": 3, "area_of_life": "..." },
"rajju": { "p1": "Nabhi", "p2": "Kanta", "result": "Good", "points_obtained": 5, "max_ponits": 5, "area_of_life": "..." },
"...": "..."
},
"dashakoot_milan_result": { "points_obtained": 22, "max_ponits": 36, "is_compatible": "true", "content": "..." },
"manglik_dosha": { "p1": "true", "p2": "false" },
"rajju_dosha": "false"
}
}- A matrimony or matchmaking site that shows the guna score for every suggested profile.
- A kundli matching page: two birth forms in, a koota-by-koota table and the total out of 36 out.
- A Manglik check for both partners before a consultation is booked.
- A side-by-side view of both charts (D1, D9 navamsa and other divisional charts) as SVG.
- A white-label match-making PDF report for astrologers (see PDF reports).
All matching endpoints are on https://astroapi-3.divineapi.com and take the p1_ and p2_ birth fields.
| What it returns | Path | Docs |
|---|---|---|
| Ashtakoot milan (8 kootas, 36 gunas) with Manglik, Nadi and Bhakoot dosha flags | /indian-api/v2/ashtakoot-milan |
docs |
| Dashakoot milan (10 factors) with Rajju dosha | /indian-api/v2/dashakoot-milan |
docs |
| Nav Pancham yoga | /indian-api/v1/nav-pancham-yoga |
docs |
| Basic astro details for both people | /indian-api/v3/matching/basic-astro-details |
docs |
| Planetary positions for both people | /indian-api/v2/matching/planetary-positions |
docs |
| Vimshottari dasha for both people | /indian-api/v1/matching/vimshottari-dasha |
docs |
| Manglik dosha for both people (strength, percentage, remedies) | /indian-api/v2/matching/manglik-dosha |
docs |
| Divisional charts for both people (SVG, base64 and house data) | /indian-api/v1/matching/horoscope-chart/{chart_id} |
docs |
chart_id for the matching charts: D1, D2, D3, D4, D7, D9, D10, D12, D16, D20, D24, D27, D30, D40, D45, D60, plus chalit, SUN, MOON and cuspal (D5 returns success: 2, "Please enter valid chart id"). Each chart response has a p1 and a p2 object with svg, base64_image (a data:image/svg+xml;base64,... string) and data (planets by house).
DivineAPI also has a white-label match-making PDF report on https://pdf.divineapi.com (/indian-api/v2/match-making), which takes the same p1_ and p2_ fields plus your company details. See the match-making PDF docs. DivineAPI has 125+ white-label PDF report types; public samples are at reports.divineapi.com/reports.
Each person needs the 12 standard birth fields, with a p1_ or p2_ prefix:
| Field (after the prefix) | Example | Notes |
|---|---|---|
full_name |
Rahul Kumar |
Use letters and spaces: Rahul_Kumar returns "Please enter valid full name" |
gender |
male |
|
day, month, year |
24, 05, 1990 |
Separate fields, not one date string |
hour, min, sec |
14, 40, 0 |
24-hour clock. sec is required: send 0 if unknown |
place |
new delhi |
Lowercase city string |
lat, lon |
28.6139, 77.2090 |
Decimal degrees |
tzone |
5.5 |
Decimal UTC offset (5.5 = IST). Never +5:30 or a zone name. Send the real offset for each birth |
Plus api_key (form field, with the Bearer header) and optional lan (default en).
- 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. Validation errors are grouped per person, for example{"p1": ["Please enter valid full name"], "p2": [...]}. max_ponitsis the real field name (with that spelling) in the koota rows and the result block.- Booleans come back as strings:
is_compatible,manglik_dosha.p1,nadi_doshaand the other dosha flags are"true"or"false". - Sidereal, Lahiri ayanamsa (fixed). There is no parameter to change it.
- Engine: astronomical positions come from Swiss Ephemeris, used under a commercial licence.
Set lan to one of DivineAPI's 8 Vedic language codes. DivineAPI uses its own codes, not ISO 639-1.
| Language | lan |
|---|---|
| English | en |
| Hindi | hi |
| Bengali | bn |
| Marathi | ma |
| Tamil | tm |
| Telugu | tl |
| Malayalam | ml |
| Kannada | kn |
With lan=hi the Ashtakoot call returns (real response, trimmed):
{ "varna": { "p1": "वैश्य", "p2": "वैश्य", "points_obtained": 1, "max_ponits": 1, "area_of_life": "कर्म वर्गीकरण", ... } }| 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.
Part of the Vedic plans; kundli matching is in Vedic Prakash. Compare plans at divineapi.com/pricing.
What is the difference between Ashtakoot and Dashakoot matching? Ashtakoot scores 8 kootas (varna, vashya, tara, yoni, graha maitri, gana, bhakoota, nadi) for a total of 36 gunas. Dashakoot scores 10 factors (dina, gana, yoni, rashi, rajju, rasyadhipati, vedha, vashya, mahendra, streedargha), also out of 36. Each has its own endpoint; call both if your users expect both.
Does the response say whether the match is compatible?
Yes. ashtakoot_milan_result (and dashakoot_milan_result) has points_obtained, max_ponits (36), is_compatible ("true" or "false") and a short content text.
Is Manglik dosha checked for both people?
Yes. The Ashtakoot and Dashakoot responses include manglik_dosha with p1 and p2 flags, and /indian-api/v2/matching/manglik-dosha returns, for each person, manglik_dosha (Yes or No), strength, percentage and remedies, plus a combined content text.
Can I show both birth charts side by side?
Yes. /indian-api/v1/matching/horoscope-chart/{chart_id} returns an SVG, a base64 data URI and the planets by house for each person, for D1, D9 and the other supported charts.
Which ayanamsa is used? Lahiri, fixed. All Vedic endpoints, including matching, are sidereal; no request parameter changes the ayanamsa.
Is there a free trial, and what does it cost? There is a 14-day free trial (credit card required to activate the trial) at divineapi.com/start-trial. Plans and prices are at divineapi.com/pricing.
| Repo | What it covers |
|---|---|
| kundli-api | Vedic birth chart (kundli): planets, divisional charts, dashas, doshas, yogas |
| lal-kitab-api | Lal Kitab planets, chart, teva, debts and varshphal |
| panchang-api | Daily panchang, choghadiya, auspicious timings, muhurat |
| astrology-api | Overview of all DivineAPI products (300+ endpoints) |
| mcp-indian-astrology | Vedic MCP server, including the matching tools |
- Product page: divineapi.com/indian-astrology/kundali-matching-api
- Docs: developers.divineapi.com/indian-api/match-making-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 repo are released under the MIT License. The DivineAPI name and logo belong to DivineAPI. Terms of the API service: divineapi.com/terms-service.
