# Synastry

The `POST /v1/synastry` endpoint compares two natal charts: it calculates cross-aspects between planets of both people and returns a compatibility score. Cost: **50 credits** (Tier 3).

## Request parameters

Two nested objects `chart1` and `chart2`, each with the same parameters as `/v1/chart`:

| Parameter | Type | Required | Description |
|---|---|---|---|
| `chart1` | object | Yes | First person's data |
| `chart2` | object | Yes | Second person's data |

Each object: `date`, `time`, `timezoneOffset`, `latitude`, `longitude`, `houseSystem`, `name`, `city`.

## Example request

<Tabs>
  <TabItem label="cURL">
    ```bash frame="terminal"
    curl -X POST https://api.astroway.info/v1/synastry \
      -H "X-Api-Key: aw_live_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "chart1": {
          "date": "1990-07-14",
          "time": "14:30:00",
          "timezoneOffset": 3,
          "latitude": 50.4501,
          "longitude": 30.5234,
          "name": "Person A"
        },
        "chart2": {
          "date": "1992-03-22",
          "time": "09:15:00",
          "timezoneOffset": 2,
          "latitude": 48.8566,
          "longitude": 2.3522,
          "name": "Person B"
        }
      }'
    ```
  </TabItem>
  <TabItem label="Node.js">
    ```ts
    const body = {
      chart1: { date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.4501, longitude: 30.5234, name: 'Person A' },
      chart2: { date: '1992-03-22', time: '09:15:00', timezoneOffset: 2, latitude: 48.8566, longitude: 2.3522, name: 'Person B' },
    };
    const res = await fetch('https://api.astroway.info/v1/synastry', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-Api-Key': process.env.ASTROWAY_API_KEY!,
      },
      body: JSON.stringify(body),
    });
    const result = await res.json();
    console.log(result.compatibility);
    console.log(result.crossAspects.length);
    ```
  </TabItem>
  <TabItem label="Python">
    ```python

    body = {
        'chart1': {'date': '1990-07-14', 'time': '14:30:00', 'timezoneOffset': 3, 'latitude': 50.4501, 'longitude': 30.5234, 'name': 'Person A'},
        'chart2': {'date': '1992-03-22', 'time': '09:15:00', 'timezoneOffset': 2, 'latitude': 48.8566, 'longitude': 2.3522, 'name': 'Person B'},
    }
    r = requests.post(
        'https://api.astroway.info/v1/synastry',
        headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'},
        json=body,
    )
    result = r.json()
    print(result['compatibility'])
    ```
  </TabItem>
  <TabItem label="PHP">
    ```php
    <?php
    use GuzzleHttp\Client;

    $aw = new Client(['base_uri' => 'https://api.astroway.info/v1/']);
    $r = $aw->post('synastry', [
        'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')],
        'json' => [
            'chart1' => ['date' => '1990-07-14', 'time' => '14:30:00', 'timezoneOffset' => 3, 'latitude' => 50.4501, 'longitude' => 30.5234, 'name' => 'Person A'],
            'chart2' => ['date' => '1992-03-22', 'time' => '09:15:00', 'timezoneOffset' => 2, 'latitude' => 48.8566, 'longitude' => 2.3522, 'name' => 'Person B'],
        ],
    ]);
    $result = json_decode($r->getBody(), true);
    print_r($result['compatibility']);
    ```
  </TabItem>
</Tabs>

## Example response

```json
{
  "chart1": {
    "input": { "date": "1990-07-14", "name": "Person A" },
    "planets": [ ... ],
    "houses": { ... },
    "aspects": [ ... ]
  },
  "chart2": {
    "input": { "date": "1992-03-22", "name": "Person B" },
    "planets": [ ... ],
    "houses": { ... },
    "aspects": [ ... ]
  },
  "crossAspects": [
    {
      "planet1": "Sun",
      "planet2": "Venus",
      "chart1Planet": "Sun",
      "chart2Planet": "Venus",
      "type": "trine",
      "orb": 2.14,
      "applying": false
    },
    {
      "planet1": "Moon",
      "planet2": "Mars",
      "chart1Planet": "Moon",
      "chart2Planet": "Mars",
      "type": "square",
      "orb": 0.87,
      "applying": true
    }
  ],
  "compatibility": {
    "score": 72,
    "label": "harmonious",
    "harmony": 18.5,
    "tension": 7.2
  }
}
```

<Aside type="note">
`chart1` and `chart2` are full natal charts (same fields as `/v1/chart`). `crossAspects` are aspects between planets of the two charts. `compatibility.score` is 0 to 100.
</Aside>

## compatibility field

| Field | Type | Description |
|---|---|---|
| `score` | number | Overall 0–100 score |
| `label` | string | `harmonious`, `balanced`, `mixed`, `challenging` |
| `harmony` | number | Weighted sum of harmonious aspects (trine, sextile) |
| `tension` | number | Weighted sum of tense aspects (square, opposition) |

## Related endpoints

| Endpoint | Credits | What it adds |
|---|---|---|
| `/v1/composite` | 50 | Composite chart (midpoints) |
| `/v1/davison` | 50 | Davison chart (mean date) |
| `/v1/coalescent` | 50 | Coalescent chart |
| `/v1/group-synastry` | 100 | Compatibility matrix for 2–10 people |
| `/v1/human-design/compatibility` | 100 | HD compatibility |

## Next

- [Natal chart](/en/examples/natal/) — basic request
- [Transits](/en/examples/transits/) — transit overlay
- [Human Design](/en/examples/human-design/) — full HD chart
- [API reference](/docs/api/) — all {siteMeta.endpoints} endpoints
