Kundli Matching API

Gun Milan API (Ashtakoot Matching)

POST/vedic-astrology/compatibility

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

GET
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

POST /vedic-astrology/compatibility
# feed latitude, longitude and timezone from step 1
POST https://roxyapi.com/api/v2/vedic-astrology/compatibility

Request

POST /api/v2/vedic-astrology/compatibility

Parameters

ParameterTypeDescription
langquerystring enumResponse language (ISO 639-1). Supported: en, tr, de, es, hi, pt, fr, ru. Defaults to en. Languages without translations yet return English. Default en.

Request body

FieldTypeDescription
person1*objectBirth 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*numberBirth 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*numberBirth location longitude in decimal degrees. Affects local time calculations and ayanamsha adjustments. Example: Delhi 77.2090, Mumbai 72.8777, Kathmandu 85.3240.
person1.timezonenumber or stringTimezone: IANA name (e.g. "America/New_York", "Europe/London") OR decimal hours from UTC (e.g. -5 for EST, 1 for CET). IANA strings are resolved to the DST-correct offset for the given date, so you can pass `cities[0].timezone` from /location/search directly. Defaults to 5.5.
person2*objectBirth 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*numberBirth 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*numberBirth location longitude in decimal degrees. Affects local time calculations and ayanamsha adjustments. Example: Delhi 77.2090, Mumbai 72.8777, Kathmandu 85.3240.
person2.timezonenumber or stringTimezone: IANA name (e.g. "America/New_York", "Europe/London") OR decimal hours from UTC (e.g. -5 for EST, 1 for CET). IANA strings are resolved to the DST-correct offset for the given date, so you can pass `cities[0].timezone` from /location/search directly. Defaults to 5.5.

Example request

POST /vedic-astrology/compatibility
{
  "person1": {
    "date": "1990-07-04",
    "time": "10:12:00",
    "latitude": 28.6139,
    "longitude": 77.209
  },
  "person2": {
    "date": "1990-07-04",
    "time": "10:12:00",
    "latitude": 28.6139,
    "longitude": 77.209
  }
}

Response

Structured JSON with documented fields, verified against NASA JPL Horizons across 828 gold-standard tests. Not hallucinated text.

200 OK
{
  "total": 24.5,
  "maxScore": 36,
  "percentage": 68.1,
  "isCompatible": true,
  "recommendation": "Union is recommended",
  "doshas": [],
  "doshaCancellations": [
    {
      "dosha": "Bhakoot Dosha",
      "reason": "Moon sign lords are the same planet (Venus)"
    }
  ],
  "breakdown": [
    {
      "category": "Varna",
      "score": 1,
      "maxScore": 1,
      "person1": "Vaishya",
      "person2": "Shudra",
      "description": "Spiritual compatibility and mutual respect"
    }
  ]
}

Response fields

FieldTypeDescription
total*numberTotal Ashtakoot Gun Milan score out of 36. Scores above 18 are considered compatible for marriage. Higher scores indicate stronger marital harmony.
maxScore*numberMaximum possible Guna Milan score (always 36). The 36 points are distributed across 8 kootas (matching categories).
percentage*numberCompatibility percentage derived from total/maxScore. Above 50% (18/36) is the traditional minimum threshold for marriage compatibility.
isCompatible*booleanTrue when percentage >= 50% (18/36 minimum). Based on the traditional Ashtakoot Gun Milan threshold used by Vedic astrologers for kundli matching.
recommendation*stringHuman-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 stringList 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 objectDoshas 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*stringName of the cancelled dosha (Nadi Dosha or Bhakoot Dosha).
doshaCancellations[].reason*stringClassical cancellation condition that neutralizes this dosha. Based on Muhurta Martanda for Nadi Dosha and BPHS for Bhakoot Dosha.
breakdown*array of objectDetailed 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*stringOne of 8 Ashtakoot matching categories: Varna, Vashya, Tara, Yoni, Graha Maitri, Gana, Bhakoot, Nadi.
breakdown[].score*numberPoints 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*numberMaximum possible points for this koota category.
breakdown[].person1*stringClassification of person 1 for this koota (e.g. Vaishya for Varna, Chatushpada for Vashya, Sheep for Yoni).
Show all fields
FieldTypeDescription
breakdown[].person2*stringClassification of person 2 for this koota.
breakdown[].description*stringHuman-readable explanation of what this koota category evaluates.

Supported options

lang

entrdeeshiptfrru

Call it in your language in seconds.

Every snippet is generated from the live OpenAPI spec, so method names, parameters, and fields always match production.

TypeScript
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 }, person2: { date: '1990-07-04', time: '10:12:00', latitude: 28.6139, longitude: 77.209 } } })
Install: npm install @roxyapi/sdk

Prefer to try before you write code? Run this Vedic Astrology endpoint live in the API playground and inspect a real production response.

Remote 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 Code / Cursor
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

Matrimonial matchmaking platforms - automate Gun Milan compatibility scoring, Manglik dosha checks, Navamsa spouse analysis, and generate match reports with remedies for Shaadi.com-style features

Daily horoscope and prediction apps - fetch planetary transits, current Dasha periods, Panchang data, and birth star forecasts to power personalized daily readings at consumer-app scale

Kundli generation and PDF report services - combine D1/D9 charts, planetary positions, Dasha timelines, yoga detection, and dosha analysis into automated birth chart reports

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

Spiritual wellness and calendar apps - integrate Panchang for Hindu festival dates, fasting calendars, temple muhurat selection, and Nakshatra-based meditation schedules

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

Drop-in UI components

Render Kundli Matching API responses without building charts yourself. These open source, framework-agnostic web components take the typed response and draw it, in React, Vue, Svelte, Angular, plain HTML, and WordPress.

<roxy-guna-milan>
See them live on Roxy UI

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 12 domains, so the Kundli Matching API is included at no extra cost.

What lang values does the Kundli Matching API accept?

The lang parameter accepts en, tr, de, es, hi, pt, fr, ru. Case-insensitive where it is a path value.

Start using Kundli Matching API today.

Launch your Jyotish or KP astrology product in days. Not months.

All 12 domains included with every plan. Every endpoint, MCP server, SDK, and starters.

Plans from $39/mo, starting at $2.70 per domain on annual billing. No credit card required for testing.

View Pricing & Get API Key