Kundli Matching API
Gun Milan API (Ashtakoot Matching)
Included with every plan (at no extra cost)
Calculate detailed Ashtakoot compatibility (Gun Milan) for kundli matching between two people. Returns accurate 36-point Guna Milan scale with breakdown across all 8 kootas (Varna, Vashya, Tara, Yoni, Graha Maitri, Gana, Bhakoot, Nadi), Nadi and Bhakoot dosha detection with classical cancellation analysis per Muhurta Martanda and BPHS rules, and marriage recommendation. Perfect for kundli matching for marriage, matrimonial platforms, horoscope compatibility, and Vedic matchmaking services.
Location first, chart second
The Kundli Matching API needs latitude, longitude, and timezone. Never ask users to type coordinates. Resolve a city with the Location endpoint first, then feed the result into the request. Timezone accepts a decimal offset or an IANA name.
1 Resolve the location
curl "https://roxyapi.com/api/v2/location/search?q=New York" \
-H "X-API-Key: YOUR_KEY"
# -> cities[0]: { latitude, longitude, timezone: "America/New_York" }2 Call the Kundli Matching endpoint
# feed latitude, longitude and timezone from step 1
POST https://roxyapi.com/api/v2/vedic-astrology/compatibilityRequest
POST /api/v2/vedic-astrology/compatibility
Parameters
| Parameter | Type | Description |
|---|---|---|
| langquery | string enum | Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English. Default en. |
Request body
| Field | Type | Description |
|---|---|---|
| person1* | object | Birth data of the first person (typically the boy/groom in traditional Ashtakoot matching). Date, time, and location determine Moon nakshatra for koota scoring. |
| person1.date* | string (date) | Birth date in YYYY-MM-DD format. Date determines planetary positions and nakshatra calculations for Vedic kundli (janam patri). Accurate birth date is essential for dashas, yoga calculations, and divisional charts (vargas). |
| person1.time* | string (time) | Birth time in 24-hour HH:MM:SS format. Time is CRITICAL for Lagna (Ascendant) calculation and house divisions. It changes every two hours roughly. Even minutes matter for accurate nakshatra pada and divisional chart (D9, D10) calculations. Without exact time, Lagna and house-based predictions will be incorrect. |
| person1.latitude* | number | Birth location latitude in decimal degrees. Location determines local sidereal time for Lagna calculation and affects bhava (house) cusps. Example: Delhi 28.6139, Mumbai 19.0760, Kathmandu 27.7172. |
| person1.longitude* | number | Birth location longitude in decimal degrees. Affects local time calculations and ayanamsha adjustments. Example: Delhi 77.2090, Mumbai 72.8777, Kathmandu 85.3240. |
| person1.timezone | number or string | Timezone: an IANA name (e.g. "America/New_York", "Europe/London", or `cities[0].timezone` from /location/search) or decimal hours from UTC (e.g. -5 for EST, 5.5 for IST). An IANA name is resolved to the offset in force at the given date and time. Defaults to 5.5. |
| person2* | object | Birth data of the second person (typically the girl/bride in traditional Ashtakoot matching). Moon nakshatra compared against person 1 across all 8 kootas. |
| person2.date* | string (date) | Birth date in YYYY-MM-DD format. Date determines planetary positions and nakshatra calculations for Vedic kundli (janam patri). Accurate birth date is essential for dashas, yoga calculations, and divisional charts (vargas). |
| person2.time* | string (time) | Birth time in 24-hour HH:MM:SS format. Time is CRITICAL for Lagna (Ascendant) calculation and house divisions. It changes every two hours roughly. Even minutes matter for accurate nakshatra pada and divisional chart (D9, D10) calculations. Without exact time, Lagna and house-based predictions will be incorrect. |
| person2.latitude* | number | Birth location latitude in decimal degrees. Location determines local sidereal time for Lagna calculation and affects bhava (house) cusps. Example: Delhi 28.6139, Mumbai 19.0760, Kathmandu 27.7172. |
| person2.longitude* | number | Birth location longitude in decimal degrees. Affects local time calculations and ayanamsha adjustments. Example: Delhi 77.2090, Mumbai 72.8777, Kathmandu 85.3240. |
| person2.timezone | number or string | Timezone: an IANA name (e.g. "America/New_York", "Europe/London", or `cities[0].timezone` from /location/search) or decimal hours from UTC (e.g. -5 for EST, 5.5 for IST). An IANA name is resolved to the offset in force at the given date and time. Defaults to 5.5. |
| ayanamsa | string enum | Sidereal frame (ayanamsa) the chart is cast in. "lahiri" is Lahiri/Chitrapaksha, the traditional Vedic standard used by most software, and is the default. "raman" is the B.V. Raman ayanamsa from Hindu Predictive Astrology, about 1.45 degrees below Lahiri. "kp-newcomb" and "kp-old" are the two Krishnamurti Paddhati frames. "custom" takes your own value in degrees via ayanamsaValue, for reconciling exactly against a specific reference program. The frame rotates the whole zodiac, so a graha sitting within 1.45 degrees of a boundary can change rashi or nakshatra when you switch: pick the one your reference software uses and keep it. |
| ayanamsaValue | number | Custom ayanamsa value in degrees. When provided, overrides the computed ayanamsa from the selected type. Use for testing with specific ayanamsa values or matching a particular reference source. |
Example request
{
"person1": {
"date": "1990-07-04",
"time": "10:12:00",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": 5.5
},
"person2": {
"date": "1990-07-04",
"time": "10:12:00",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": 5.5
},
"ayanamsa": "lahiri",
"ayanamsaValue": 24
}Response
Structured JSON with documented fields, covered by 13,405 automated tests per deploy, 3,620 of them gold-standard tests verified against NASA JPL Horizons. Not hallucinated text.
{
"frame": {
"ayanamsa": "lahiri",
"ayanamsaDegrees": 23.728208791839048
},
"total": 28,
"maxScore": 36,
"percentage": 77.77777777777779,
"isCompatible": true,
"recommendation": "Union is NOT recommended due to Nadi Dosha",
"doshas": [
"Nadi Dosha"
],
"doshaCancellations": [],
"breakdown": [
{
"category": "Varna",
"maxScore": 1,
"description": "Spiritual compatibility and mutual respect",
"score": 1,
"person1": "Brahmin",
"person2": "Brahmin"
},
{
"category": "Vashya",
"maxScore": 2,
"description": "Mutual control and dominance",
"score": 2,
"person1": "Keeta",
"person2": "Keeta"
},
{
"category": "Tara",
"maxScore": 3,
"description": "Birth star compatibility and luck",
"score": 3,
"person1": "Mitra",
"person2": "Mitra"
},
{
"category": "Yoni",
"maxScore": 4,
"description": "Sexual and physical compatibility",
"score": 4,
"person1": "Hare",
"person2": "Hare"
},
{
"category": "Graha Maitri",
"maxScore": 5,
"description": "Mental compatibility and affection",
"score": 5,
"person1": "Mars",
"person2": "Mars"
},
{
"category": "Gana",
"maxScore": 6,
"description": "Temperament and nature compatibility",
"score": 6,
"person1": "Deva",
"person2": "Deva"
},
{
"category": "Bhakoot",
"maxScore": 7,
"description": "Love, wealth, and family prosperity",
"score": 7,
"person1": "Scorpio",
"person2": "Scorpio"
},
{
"category": "Nadi",
"maxScore": 8,
"description": "Health, progeny, and genetic compatibility",
"score": 0,
"person1": "Madhya",
"person2": "Madhya"
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
| frame* | object | The sidereal frame this response was computed in, so a cached or forwarded payload is self describing. |
| frame.ayanamsa* | string | Sidereal frame this chart was cast in, echoing the ayanamsa request field. "lahiri" when the field was omitted. |
| frame.ayanamsaDegrees* | number | Degrees actually subtracted from every tropical longitude to produce this chart, read at the birth instant. Subtract it back to recover the tropical positions, or compare it against your reference software to confirm you are in the same frame before chasing a placement difference. |
| total* | number | Total Ashtakoot Gun Milan score out of 36. Scores above 18 are considered compatible for marriage. Higher scores indicate stronger marital harmony. |
| maxScore* | number | Maximum possible Guna Milan score (always 36). The 36 points are distributed across 8 kootas (matching categories). |
| percentage* | number | Compatibility percentage derived from total/maxScore. Above 50% (18/36) is the traditional minimum threshold for marriage compatibility. |
| isCompatible* | boolean | True when percentage >= 50% (18/36 minimum). Based on the traditional Ashtakoot Gun Milan threshold used by Vedic astrologers for kundli matching. |
| recommendation* | string | Human-readable marriage recommendation based on overall score and dosha analysis. Indicates whether the union is recommended, and if not, specifies the reason (e.g. Nadi Dosha, Bhakoot Dosha, low overall score). |
| doshas* | array of string | List of active (uncancelled) doshas in the matching. Doshas that meet classical cancellation conditions from Muhurta Martanda or BPHS are excluded from this array and appear in doshaCancellations instead. Common doshas: Nadi Dosha (same Nadi type, 0/8 points), Bhakoot Dosha (inauspicious Moon sign distance, 0/7 points). Empty array when no doshas are present or all detected doshas are cancelled. |
| doshaCancellations* | array of object | Doshas detected but cancelled by classical exception rules. Nadi Dosha cancels when partners share the same Moon sign with different nakshatras, same nakshatra with different padas, or same nakshatra spanning different signs. Bhakoot Dosha cancels when Moon sign lords are the same planet or mutual natural friends. Koota score remains 0 but the dosha is not counted against the recommendation. |
| doshaCancellations[].dosha* | string | Name of the cancelled dosha (Nadi Dosha or Bhakoot Dosha). |
| doshaCancellations[].reason* | string | Classical cancellation condition that neutralizes this dosha. Based on Muhurta Martanda for Nadi Dosha and BPHS for Bhakoot Dosha. |
| breakdown* | array of object | Detailed breakdown of compatibility scores across all 8 Ashtakoot kootas. Each category evaluates a different aspect of marital compatibility: temperament, physical, mental, financial, and health. |
| breakdown[].category* | string | One of 8 Ashtakoot matching categories: Varna, Vashya, Tara, Yoni, Graha Maitri, Gana, Bhakoot, Nadi. |
Show all fieldsShow fewer fields
| Field | Type | Description |
|---|---|---|
| breakdown[].score* | number | Points scored in this category. Maximum varies: Varna (1), Vashya (2), Tara (3), Yoni (4), Graha Maitri (5), Gana (6), Bhakoot (7), Nadi (8). |
| breakdown[].maxScore* | number | Maximum possible points for this koota category. |
| breakdown[].person1* | string | Classification of person 1 for this koota (e.g. Vaishya for Varna, Chatushpada for Vashya, Sheep for Yoni). |
| breakdown[].person2* | string | Classification of person 2 for this koota. |
| breakdown[].description* | string | Human-readable explanation of what this koota category evaluates. |
Supported options
lang
ayanamsa
Call it in your language.
Every snippet is generated from the live OpenAPI spec, so method names, parameters, and fields always match production.
import { createRoxy } from '@roxyapi/sdk'
const roxy = createRoxy(process.env.ROXY_API_KEY!)
const { data } = await roxy.vedicAstrology.calculateGunMilan({ body: { person1: { date: '1990-07-04', time: '10:12:00', latitude: 28.6139, longitude: 77.209, timezone: 5.5 }, person2: { date: '1990-07-04', time: '10:12:00', latitude: 28.6139, longitude: 77.209, timezone: 5.5 } } })Install: npm install @roxyapi/sdk
from roxy_sdk import create_roxy
roxy = create_roxy("YOUR_API_KEY")
result = roxy.vedic_astrology.calculate_gun_milan(person1={'date': '1990-07-04', 'time': '10:12:00', 'latitude': 28.6139, 'longitude': 77.209, 'timezone': 5.5}, person2={'date': '1990-07-04', 'time': '10:12:00', 'latitude': 28.6139, 'longitude': 77.209, 'timezone': 5.5})Install: pip install roxy-sdk
use function RoxyAPI\Sdk\createRoxy;
$roxy = createRoxy(getenv('ROXY_API_KEY'));
$result = $roxy->vedicAstrology->calculateGunMilan(person1: ['date' => '1990-07-04', 'time' => '10:12:00', 'latitude' => 28.6139, 'longitude' => 77.209, 'timezone' => 5.5], person2: ['date' => '1990-07-04', 'time' => '10:12:00', 'latitude' => 28.6139, 'longitude' => 77.209, 'timezone' => 5.5]);Install: composer require roxyapi/sdk
using RoxyApi;
var roxy = new RoxyClient(Environment.GetEnvironmentVariable("ROXY_API_KEY")!);
var result = await roxy.VedicAstrology.Compatibility.PostAsync(new() { /* request fields above */ });Install: dotnet add package RoxyApi.Sdk
import roxyapi "github.com/RoxyAPI/sdk-go"
roxy, _ := roxyapi.NewRoxy(os.Getenv("ROXY_API_KEY"))
resp, _ := roxy.VedicAstrology.CalculateGunMilan(ctx, nil, roxyapi.CalculateGunMilanJSONRequestBody{ /* request fields above */ })Install: go get github.com/RoxyAPI/sdk-go
curl -X POST "https://roxyapi.com/api/v2/vedic-astrology/compatibility" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"person1":{"date":"1990-07-04","time":"10:12:00","latitude":28.6139,"longitude":77.209,"timezone":5.5},"person2":{"date":"1990-07-04","time":"10:12:00","latitude":28.6139,"longitude":77.209,"timezone":5.5}}'Prefer to try before you write code? Run this Vedic Astrology endpoint live in the API playground and inspect a real production response.
More Kundli Matching endpoints
The Kundli Matching API bundles these related endpoints under one key.
Calculate ten porutham match - Dashakoot South Indian Kundli Matching API
Calculate the South Indian ten porutham marriage match (Dashakoot, also called Dasa Porutham) for two birth records. Returns a pass or fail on each of Dina, Gana, Mahendra, Stree Deergha, Yoni, Rasi, Rasyadhipati, Vasya, Rajju and Vedha, a total out of ten, and Rajju and Vedha as explicit hard vetoes that disqualify a match whatever the rest of the sheet reads. This is a different system from the 36 point Ashtakoot Gun Milan on POST /vedic-astrology/compatibility and the two are never reconciled, so a Tamil, Malayalam or Telugu matrimonial desk can read the sheet it actually uses. Direction matters: person1 is the groom and person2 is the bride, because five of the ten poruthams count from the bride birth star to the groom birth star.
Try it liveCompare malefic affliction - Papasamyam Kundli Matching API
Calculate Papasamyam, the balance of malefic (papa) points between two birth charts, for Vedic marriage matching. Counts Mars, Saturn, Sun and Rahu sitting in the afflicting bhavas 1, 2, 4, 7, 8 and 12 read from three reference points in each chart, the Lagna weighted 1, the Moon weighted 0.5 and Venus weighted 0.25, and returns both totals with the graha, the bhava and the weight behind every point. The verdict is a comparison and never a judgement on one person: the bride total must be equal to or below the groom total, so a heavily afflicted groom matched with a comparably afflicted bride reads as balanced while an unafflicted groom matched with an afflicted bride does not. Use it beside Gun Milan and the ten porutham sheet on a matrimonial platform, since a koota score says nothing about malefic balance.
Try it liveRemote MCP for AI agents
Every Vedic Astrology endpoint is a callable tool on the Remote MCP server over Streamable HTTP. No local setup, no Docker. Claude, ChatGPT, Cursor, and any MCP client auto-discover the tools and ground their answers in verified data.
claude mcp add --transport http \
roxy-vedic-astrology https://roxyapi.com/mcp/vedic-astrology \
--header "X-API-Key: YOUR_KEY"Tool name for POST /vedic-astrology/compatibility: post_vedic_astrology_compatibility. Full MCP setup guide
What you can build
Kundli generation and PDF report services - combine D1/D9 charts, planetary positions, Dasha timelines, yoga detection, and dosha analysis into automated birth chart reports
Matrimonial matchmaking platforms - automate Gun Milan compatibility scoring, the South Indian ten porutham sheet with its Rajju and Vedha vetoes, Papasamyam malefic balance, Manglik dosha checks, Navamsa spouse analysis, and generate match reports with remedies for Shaadi.com-style features
Daily horoscope and prediction apps - one call composes the gochara verdicts, the panchang limbs with their validity windows, the running Dasha chain and the per-native tarabala and chandrabala into a single dated reading with a reproducible strength score, so a consumer-app daily screen is one request rather than five stitched together
AI astrology chatbots and virtual consultants - power conversational AI with structured Vedic calculations, compatibility queries, Dasha predictions, and remedy suggestions via ChatGPT plugins or MCP integration
Spiritual wellness and calendar apps - integrate Panchang for Hindu festival dates, fasting calendars, temple muhurat selection, and Nakshatra-based meditation schedules
KP horary and event prediction apps - build stellar astrology software with significator analysis, cusp sub-lords, and 249-level precision for answering when/yes-no questions
Drop-in UI components and no-code widgets.
Render Kundli Matching API responses without building charts yourself. Install the npm package and drop these into Next.js, React, Vue, Svelte, Angular, or plain HTML, or embed the very same component on Squarespace, Wix, or WordPress by pasting one snippet, with no backend and no build step. They belong to one library that covers the entire spiritual stack rather than astrology alone, MIT licensed and included in every plan at no extra cost, never a separate product and never an upsell. The Kundli Matching API calculations, the interface that renders them, and the Remote MCP your agent calls, all behind one key, end to end.
Show all Kundli Matching UI componentsShow fewer Kundli Matching UI components
| Element | Renders |
|---|---|
| <roxy-guna-milan> | 36-point Ashtakoota with eight sub-scores |
Related capabilities
Kundli Matching API FAQ
What does the Kundli Matching API return?
Calculate detailed Ashtakoot compatibility (Gun Milan) for kundli matching between two people. Every response is structured JSON with documented fields, not free text, so you map it straight into your product.
How do I authenticate with the Kundli Matching API?
Pass your key in the X-API-Key header on every request. Keys are delivered instantly at checkout with no approval queue. Use a secret sk key server side, or mint a publishable pk key locked to your origins for browser and no-code use.
Does the Kundli Matching API support multiple languages?
Yes. Append the lang query parameter to any endpoint for responses in English, German, Spanish, French, Hindi, Portuguese, Russian and Turkish. The translated payload includes the full interpretation text, not just field labels.
Do I need coordinates to call the Kundli Matching API?
No. Call GET /location/search with a city name first, then pass latitude, longitude, and timezone from the first result into the request. Never ask users to type coordinates. Timezone accepts a decimal offset or an IANA name.
Is the Kundli Matching API available over Remote MCP for AI agents?
Yes. Every endpoint is exposed as a callable tool on the Remote MCP server at https://roxyapi.com/mcp/vedic-astrology over Streamable HTTP, so Claude, ChatGPT, Cursor, and any MCP client auto-discover it with no local setup or Docker.
How is the Kundli Matching API billed?
Flat pricing: 1 request equals 1 quota unit, REST and MCP identical, with no credit weighting or per-token markup. Every plan includes all 18 domains, so the Kundli Matching API is included at no extra cost.
What ayanamsa values does the Kundli Matching API accept?
The ayanamsa parameter accepts kp-newcomb, kp-old, lahiri, raman, custom. Case-insensitive where it is a path value.
Start using Kundli Matching API today.
Kundli, panchang and KP charts that state the ayanamsa they used and the classical rule behind each verdict.
All 18 domains included with every plan. Every endpoint, MCP server, SDK, and templates.
Plans from $39/mo, starting at $1.80 per domain on annual billing. No credit card required for testing.
View Pricing & Get API Key
