Astrology Synastry API

The Synastry API compares two complete natal charts and analyzes planetary relationships between them. It returns full chart data for both individuals along with calculated aspect information.

Endpoint

POST https://api.astroapi.io/api/astro/synastry

Requests require Authorization: Bearer <API_KEY>. JWTs are for dashboard access only.

How Synastry Works

Synastry is calculated by generating two complete birth charts and analyzing planetary aspects between them. The API returns raw chart and aspect data rather than a simplified compatibility score.

Example Request

{
  "personA": {
    "date": "1990-01-01",
    "time": "12:00",
    "lat": 40.7128,
    "lon": -74.0060
  },
  "personB": {
    "date": "1992-06-15",
    "time": "18:30",
    "lat": 34.0522,
    "lon": -118.2437
  }
}

Example Response

{
  "type": "synastry",
  "input": {
    "personA": {
      "date": "1990-01-01",
      "time": "12:00",
      "lat": 40.7128,
      "lon": -74.006
    },
    "personB": {
      "date": "1992-06-15",
      "time": "18:30",
      "lat": 34.0522,
      "lon": -118.2437
    }
  },
  "charts": {
    "personA": { "...full birth chart data..." },
    "personB": { "...full birth chart data..." }
  },
  "aspects": [
    {
      "p1": "Sun",
      "p2": "Moon",
      "type": "conjunction",
      "orb": 2.1
    }
  ]
}

Common Uses

  • Relationship analysis tools
  • Compatibility dashboards
  • Synastry visualization systems
  • Advanced chart comparison engines
// JavaScript — Synastry API
fetch("https://api.astroapi.io/api/astro/synastry", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
  },
  body: JSON.stringify({
    personA: {
      date: "1990-01-01",
      time: "12:00",
      lat: 40.7128,
      lon: -74.0060
    },
    personB: {
      date: "1992-06-15",
      time: "18:30",
      lat: 34.0522,
      lon: -118.2437
    }
  })
})
  .then(res => res.json())
  .then(data => console.log(data));
# Python — Synastry API
import requests

url = "https://api.astroapi.io/api/astro/synastry"

payload = {
  "personA": {
    "date": "1990-01-01",
    "time": "12:00",
    "lat": 40.7128,
    "lon": -74.0060
  },
  "personB": {
    "date": "1992-06-15",
    "time": "18:30",
    "lat": 34.0522,
    "lon": -118.2437
  }
}

headers = {
  "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())