Compatibility
Compatibility
/api/v2/vedic/compatibilityCalculate V2 Ashtakoota compatibility from structured manual Moon details, legacy flat Moon fields, or two full birth charts.
Authentication: send x-api-key.
Full URL
https://api.freeastroapi.com/api/v2/vedic/compatibilitySafe retries with Idempotency-Key
Authenticated, billable astrology POST requests accept the optional header Idempotency-Key: <client-generated unique operation key>. Reuse the same key only when retrying the exact same method, path, query string, and JSON body after a timeout or network failure.
A completed replay returns the first response with Idempotency-Replayed: true, does not rerun the calculation, and does not consume extra quota. Keys are retained for about 24 hours.
Reusing a key with a changed request returns 409 idempotency_key_reused. A duplicate while the first request is still running returns 409 request_in_progress with Retry-After.
What It Returns
A compatibility payload with resolved Moon details, Ashtakoota koota-by-koota scores and evidence, dosha checks, summary scoring, and input-mode metadata. Use /match when both complete birth details are available.
Example Request
curl -X POST "https://api.freeastroapi.com/api/v2/vedic/compatibility" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"person1_moon": {
"label": "Person 1",
"moon_nakshatra": 22,
"moon_sign": 10,
"moon_degree": 14.2,
"moon_pada": 2
},
"person2_moon": {
"label": "Person 2",
"moon_nakshatra": 13,
"moon_sign": 6,
"moon_degree": 8.5,
"moon_pada": 3
}
}'Request Parameters
Provide either city or both lat and lng. Coordinates are recommended for stable production results.
Response Shape
Real Request Example
This request was captured from the live production endpoint and is the same payload used in the code tabs.
{
"person1_moon": {
"label": "Person 1",
"moon_nakshatra": 22,
"moon_sign": 10,
"moon_degree": 14.2,
"moon_pada": 2
},
"person2_moon": {
"label": "Person 2",
"moon_nakshatra": 13,
"moon_sign": 6,
"moon_degree": 8.5,
"moon_pada": 3
}
}Real Response Example
This is a real production response for the example payload. Large arrays are intentionally shown as returned by the API.
{
"persons": [
{
"label": "Person 1",
"input_mode": "manual",
"moon_sign": {
"id": 10,
"name": "Capricorn",
"degree": 14.2
},
"moon_nakshatra": {
"id": 22,
"name": "Shravana",
"pada": 2,
"lord": "Moon"
}
},
{
"label": "Person 2",
"input_mode": "manual",
"moon_sign": {
"id": 6,
"name": "Virgo",
"degree": 8.5
},
"moon_nakshatra": {
"id": 13,
"name": "Hasta",
"pada": 3,
"lord": "Moon"
}
}
],
"ashtakoota": {
"score": 25,
"max_score": 36,
"percentage": 69.4,
"recommendation": "Good Match",
"kootas": [
{
"id": "varna",
"name": "Varna",
"score": 1,
"max_score": 1,
"status": "strong",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Person 1: Vaishya; Person 2: Vaishya."
}
]
},
{
"id": "vashya",
"name": "Vashya",
"score": 1,
"max_score": 2,
"status": "moderate",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Person 1: Quadruped; Person 2: Human."
}
]
},
{
"id": "tara",
"name": "Tara",
"score": 3,
"max_score": 3,
"status": "strong",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Directional Tara scores are 1.5 and 1.5."
}
]
},
{
"id": "yoni",
"name": "Yoni",
"score": 2,
"max_score": 4,
"status": "moderate",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Person 1: Monkey; Person 2: Buffalo."
}
]
},
{
"id": "graha_maitri",
"name": "Graha Maitri",
"score": 4,
"max_score": 5,
"status": "strong",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Moon sign lords are Saturn and Mercury; relations are friend/neutral."
}
]
},
{
"id": "gana",
"name": "Gana",
"score": 6,
"max_score": 6,
"status": "strong",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Person 1: Deva; Person 2: Deva."
}
]
},
{
"id": "bhakoot",
"name": "Bhakoot",
"score": 0,
"max_score": 7,
"status": "dosha",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Moon signs are in 9/5 relation."
}
]
},
{
"id": "nadi",
"name": "Nadi",
"score": 8,
"max_score": 8,
"status": "strong",
"evidence": [
{
"kind": "rule_evaluation",
"message": "Person 1: Antya; Person 2: Adi."
}
]
}
]
},
"doshas": {
"manglik": {
"person1": {
"available": false,
"active": null,
"severity": null,
"severity_score": null,
"reference_frames": [],
"cancellations": [],
"message": "Manglik evaluation requires birth-chart input."
},
"person2": {
"available": false,
"active": null,
"severity": null,
"severity_score": null,
"reference_frames": [],
"cancellations": [],
"message": "Manglik evaluation requires birth-chart input."
},
"compatibility": {
"available": false,
"status": "unknown",
"message": "Manglik compatibility requires birth-chart input for both people."
}
},
"nadi": {
"active": false,
"score": 8,
"max_score": 8,
"message": "Nadi score is 8 out of 8."
},
"bhakoot": {
"active": true,
"score": 0,
"max_score": 7,
"message": "Bhakoot score is 0 out of 7."
}
},
"summary": {
"total_score": 25,
"max_score": 36,
"minimum_traditional_threshold": 18,
"passes_minimum_threshold": true,
"risk_flags": [
"bhakoot_dosha"
]
},
"metadata": {
"endpoint_version": "v2",
"ruleset_version": "astrosage_ashtakoota_v1",
"calculation_basis": "moon_nakshatra_moon_rashi_ashtakoota",
"person1_input_mode": "manual",
"person2_input_mode": "manual"
}
}