Back to Docs

Compatibility

Compatibility

POST/api/v2/vedic/compatibility

Calculate 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/compatibility
Safe 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
  },
  "language": "en"
}'

Request Parameters

Provide either city or both lat and lng. Coordinates are recommended for stable production results.

Field
language
Type
string
Required
No
Description
Response language: "en" (English, default) or "hi" (Hindi). Codes are case-insensitive. Scores, IDs, status codes, risk flags, input modes, and metadata stay unchanged. Unsupported values return 422.
Field
lang
Type
string
Required
No
Description
Alias for language. If both aliases are supplied, they must agree after trimming and case normalization; conflicts return 422.
Field
person1
Type
object
Required
No
Description
Optional Person 1 birth details. Use with person2 for birth-chart mode.
Field
person2
Type
object
Required
No
Description
Optional Person 2 birth details. Use with person1 for birth-chart mode.
Field
person1_moon
Type
object
Required
No
Description
Structured manual Moon details for Person 1.
Field
person2_moon
Type
object
Required
No
Description
Structured manual Moon details for Person 2.
Field
person1_moon.moon_nakshatra
Type
integer
Required
No
Description
Moon Nakshatra ID, 1-27.
Field
person1_moon.moon_sign
Type
integer
Required
No
Description
Moon sign ID, 1-12.
Field
person1_moon.moon_degree
Type
float
Required
No
Description
Moon degree inside sign, 0 <= degree < 30.
Field
person1_moon.moon_pada
Type
integer
Required
No
Description
Nakshatra pada, 1-4.
Field
person2_moon.moon_nakshatra
Type
integer
Required
No
Description
Moon Nakshatra ID, 1-27.
Field
person2_moon.moon_sign
Type
integer
Required
No
Description
Moon sign ID, 1-12.
Field
person2_moon.moon_degree
Type
float
Required
No
Description
Moon degree inside sign, 0 <= degree < 30.
Field
person2_moon.moon_pada
Type
integer
Required
No
Description
Nakshatra pada, 1-4.
Field
person1_moon_nakshatra / person2_moon_nakshatra
Type
integer
Required
No
Description
Legacy flat manual Moon fields remain accepted for compatibility.
Field
person1_moon_sign / person2_moon_sign
Type
integer
Required
No
Description
Legacy flat Moon sign fields remain accepted for compatibility.

Response Shape

Field
persons
Type
array
Required
n/a
Description
Resolved person Moon sign and Nakshatra details. In Hindi, sign, Nakshatra and lord names are translated; input labels remain unchanged.
Field
persons[].label_display
Type
string
Required
n/a
Description
Hindi display value for generated labels such as Person 1. A client-supplied label is preserved verbatim.
Field
persons[].input_mode_label
Type
string
Required
n/a
Description
Hindi display label for input_mode. The manual or birth_chart code stays unchanged.
Field
ashtakoota
Type
object
Required
n/a
Description
Eight-koota score, percentage, stable recommendation value, and per-koota evidence.
Field
ashtakoota.recommendation_label
Type
string
Required
n/a
Description
Hindi display label for recommendation when language="hi". The English recommendation value remains stable.
Field
ashtakoota.kootas[].status_label
Type
string
Required
n/a
Description
Hindi display label for each stable status code. Koota names and rule-evidence messages are also translated.
Field
ashtakoota.kootas[].evidence[].kind_label
Type
string
Required
n/a
Description
Hindi display label for the stable evidence kind.
Field
doshas
Type
object
Required
n/a
Description
Manglik, Nadi, and Bhakoot dosha details. Human-readable messages are translated in Hindi.
Field
doshas.manglik.*.severity_label
Type
string
Required
n/a
Description
Hindi display label for Mangal Dosha severity. severity, severity_score and active remain stable.
Field
doshas.manglik.*.reference_frames[].frame_label
Type
string
Required
n/a
Description
Hindi display name for each stable Lagna or Moon reference-frame value.
Field
doshas.manglik.*.cancellations[].kind_label
Type
string
Required
n/a
Description
Hindi display label for each cancellation rule. Cancellation messages are translated too.
Field
doshas.manglik.compatibility.status_label
Type
string
Required
n/a
Description
Hindi display label for the stable Manglik compatibility status.
Field
summary
Type
object
Required
n/a
Description
Total score, traditional threshold, pass flag, and stable risk-flag codes.
Field
summary.risk_flag_labels
Type
array[string]
Required
n/a
Description
Hindi display labels aligned with risk_flags.
Field
summary.threshold_label
Type
string
Required
n/a
Description
Hindi explanation of whether the traditional minimum threshold was met.
Field
metadata
Type
object
Required
n/a
Description
Endpoint version, ruleset, calculation basis, and input modes.

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
  },
  "language": "en"
}

Real Response Example

V2

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"
  }
}

Related Docs

FAQ

Can this endpoint return Hindi compatibility results?

Yes. Send "lang": "hi" or "language": "hi". The response translates Moon sign, Nakshatra, planet and koota names; evidence, recommendations and dosha messages; and adds Hindi display labels for stable codes. Scores, IDs, status codes, risk flags, input modes and metadata do not change. This applies to /compatibility; /match remains English-only.

Does Hindi change the compatibility calculation?

No. Hindi is applied after the calibrated Ashtakoota and Manglik calculations. English and Hindi requests with the same birth or Moon inputs return the same scores, percentages, dosha booleans, severity scores and machine codes.

Should the recommendation be treated as a marriage decision?

No. The recommendation summarizes the endpoint’s traditional Ashtakoota score bands. Review the individual kootas, Nadi, Bhakoot and Manglik context. The result does not assess communication, consent, personal circumstances or relationship behavior.