# Compatibility (Guna Milan) — Vedic match-making

Guna Milan is the traditional Vedic compatibility check between two natal charts before marriage. The most common form (Ashtakoot, 8 sections × 36 points) plus several regional variants. AstroWay covers **6 compatibility endpoints**.

<Aside type="note">
These endpoints return numerical scores and structured diagnostics — _not_ a "verdict on marriage". Score interpretation is culturally specific (in India 18+/36 is typically considered passing). Build UIs with context and respect.
</Aside>

## What we compute

- **Ashtakoot** (8-fold Guna Milan) — the most common North-Indian method, 36 points across 8 kutas (Varna, Vashya, Tara, Yoni, Graha Maitri, Gana, Bhakoot, Nadi).
- **Dashakoota** (10-fold) — South-Indian (Tamil/Malayalam) method, 10 kutas, different category weights.
- **Manglik check** — both partners scanned for Manglik dosha + cancellation rules (Manglik + Manglik can neutralize).
- **Mangal match** — detailed strength-of-Mars matching between charts (deeper than presence/absence).
- **Bhrigu match** — Bhrigu-Bindu technique (subtle compatibility via the midpoint between Moon and Rahu).
- **Full** — combined report: Ashtakoot + Manglik + Bhrigu + score breakdown.

## Endpoints

| Endpoint | Credits | Description |
|---|---|---|
| `/v1/vedic/compatibility/ashtakoot` | 50 | 8-fold Guna Milan with full breakdown |
| `/v1/vedic/compatibility/dashakoota` | 50 | 10-fold (South India) |
| `/v1/vedic/compatibility/manglik-check` | 20 | Manglik diagnostic for both partners + cancellation |
| `/v1/vedic/compatibility/mangal-match` | 20 | Strength-of-Mars match between charts |
| `/v1/vedic/compatibility/bhrigu-match` | 30 | Bhrigu-Bindu compatibility |
| `/v1/vedic/compatibility/full` | 100 | All methods + aggregate score |

## Example

<Tabs>
  <TabItem label="cURL">
    ```bash frame="terminal"
    curl -X POST https://api.astroway.info/v1/vedic/compatibility/ashtakoot \
      -H "X-Api-Key: aw_live_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "person1": {
          "date": "1990-07-14",
          "time": "14:30:00",
          "timezoneOffset": 3,
          "latitude": 50.4501,
          "longitude": 30.5234
        },
        "person2": {
          "date": "1992-03-22",
          "time": "08:15:00",
          "timezoneOffset": 3,
          "latitude": 49.8397,
          "longitude": 24.0297
        },
        "ayanamsa": "lahiri"
      }'
    ```
  </TabItem>
  <TabItem label="Node.js">
    ```ts
    const r = await fetch('https://api.astroway.info/v1/vedic/compatibility/full', {
      method: 'POST',
      headers: {
        'X-Api-Key': process.env.ASTROWAY_API_KEY!,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        person1: { date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.4501, longitude: 30.5234 },
        person2: { date: '1992-03-22', time: '08:15:00', timezoneOffset: 3, latitude: 49.8397, longitude: 24.0297 },
        ayanamsa: 'lahiri',
      }),
    });
    const { data } = await r.json();
    console.log(`Ashtakoot: ${data.ashtakoot.total}/36`);
    console.log(`Manglik p1: ${data.manglik.person1.present}, p2: ${data.manglik.person2.present}`);
    console.log(`Cancellation: ${data.manglik.cancelled}`);
    ```
  </TabItem>
  <TabItem label="Python">
    ```python

    r = requests.post(
        'https://api.astroway.info/v1/vedic/compatibility/full',
        headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY']},
        json={
            'person1': {'date': '1990-07-14', 'time': '14:30:00', 'timezoneOffset': 3, 'latitude': 50.4501, 'longitude': 30.5234},
            'person2': {'date': '1992-03-22', 'time': '08:15:00', 'timezoneOffset': 3, 'latitude': 49.8397, 'longitude': 24.0297},
            'ayanamsa': 'lahiri',
        },
    )
    data = r.json()['data']
    print(f"Ashtakoot: {data['ashtakoot']['total']}/36")
    print(f"Bhrigu match: {data['bhrigu']['score']}")
    ```
  </TabItem>
</Tabs>

Sample response (Ashtakoot, abbreviated):

```json
{
  "data": {
    "ashtakoot": {
      "total": 24,
      "max": 36,
      "passing_threshold": 18,
      "verdict": "passing",
      "breakdown": [
        { "kuta": "Varna",       "score": 1, "max": 1 },
        { "kuta": "Vashya",      "score": 2, "max": 2 },
        { "kuta": "Tara",        "score": 3, "max": 3 },
        { "kuta": "Yoni",        "score": 2, "max": 4 },
        { "kuta": "Graha Maitri","score": 4, "max": 5 },
        { "kuta": "Gana",        "score": 6, "max": 6 },
        { "kuta": "Bhakoot",     "score": 0, "max": 7, "doshic": true },
        { "kuta": "Nadi",        "score": 8, "max": 8 }
      ],
      "warnings": ["Bhakoot dosha — 6/8 axis"]
    },
    "ayanamsa": "lahiri"
  }
}
```

## Accuracy and sources

- **Ashtakoot** — algorithm follows the classical formulation (Northern Indian standard), referenced against *Muhurta Chintamani* (Ramadayalu Bhattacharya, 16th c.) and modern compendia (B.V. Raman, *Hindu Predictive Astrology*).
- **Dashakoota** — South-Indian variant, 10 kutas (adds Rasi-kuta, Stree-Deergha-kuta, etc.). Reference: *Jataka Tattva* (Mahadeva).
- **Bhrigu-Bindu** — Bhrigu Pratyantar technique (midpoint of Moon-Rahu axis), popularised by K.N. Rao and his school.
- **Manglik cancellation** — we use 12 classical cancellation rules (e.g. Mars in Scorpio in 4th cancels; Mars in Cancer in 1st cancels). Full rule list is in docs.
- **Sidereal zodiac**: Lahiri by default. Raman, Krishnamurti, Fagan-Bradley, Yukteshwar also supported.
- **Status**: Ashtakoot GREEN (cross-verified against JagannathaHora-3 and Maitreya implementations). Bhrigu-Bindu — YELLOW (school-specific, limited public reference). Full breakdown — `docs/AUDIT-TRAIL.md`.

## Related

<CardGrid>
  <LinkCard title="Doshas" href="/en/vedic/doshas/" description="19 affliction endpoints (including Manglik)" />
  <LinkCard title="Yogas" href="/en/vedic/yogas/" description="Raja, Dhana, Mahapurusha — combinations" />
  <LinkCard title="Muhurat" href="/en/vedic/muhurat/" description="Electional astrology, including wedding-date selection" />
  <LinkCard title="Credits" href="/en/credits/" description="Per-endpoint credit cost" />
  <LinkCard title="Accuracy" href="/en/accuracy/" description="How we verify calculations" />
  <LinkCard title="Authentication" href="/en/authentication/" description="X-Api-Key, sandbox keys" />
</CardGrid>
