Astrology Synastry API

AstroAPI uses Western (tropical), geocentric astrology by default. Sidereal or Vedic-style calculations are not applied unless explicitly enabled and documented.

The Synastry API compares two complete natal charts and calculates planetary aspects between them. It is designed for passive, server-to-server usage using API key authentication.

Endpoint

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

Include Authorization: Bearer <API_KEY>.

Required Request Fields

  • personA.date — ISO date (YYYY-MM-DD)
  • personA.time — 24-hour time (HH:MM)
  • personA.lat — latitude (decimal)
  • personA.lon — longitude (decimal)
  • personB.date — ISO date (YYYY-MM-DD)
  • personB.time — 24-hour time (HH:MM)
  • personB.lat — latitude (decimal)
  • personB.lon — longitude (decimal)

Each person's optional timezone must be an IANA name such as America/New_York. Omitted timezones default to UTC. Both dates must be between 1900-01-01 and 2050-12-31.

How Synastry Works

Two full birth charts are generated independently and then compared. Planetary aspects are calculated between charts. The API returns raw chart and aspect data rather than a compatibility score.

Returns

  • Complete birth chart for personA
  • Complete birth chart for personB
  • Cross-chart planetary aspects
  • House systems, lunar nodes, and metadata

All calculation results are returned as raw chart and aspect data. Interpretation and scoring must be handled client-side.

Example Request

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

Example Response

This verified response is abbreviated. The current cross-aspect engine names person B as transit and person A as natal; those labels describe operand direction only and do not change the submitted relationship roles.

{
  "type": "synastry",
  "input": {
    "zodiac": "tropical",
    "ayanamsa": "lahiri"
  },
  "charts": {
    "personA": { "status": "ok", "zodiac": "tropical" },
    "personB": { "status": "ok", "zodiac": "tropical" }
  },
  "aspects": [
    {
      "transit": "Sun",
      "natal": "Pluto",
      "type": "biquintile",
      "exact_angle": 144,
      "distance": 141.9333,
      "orb": 2.0667
    }
  ]
}

Quick Test / curl

Use this curl command to quickly test the Synastry API endpoint with your API key:

curl -i https://api.astroapi.io/api/astro/synastry \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${ASTROAPI_KEY}" \
  -d '{
    "personA": {
      "date": "2000-01-01",
      "time": "12:00",
      "timezone": "America/New_York",
      "lat": 33.7488,
      "lon": -84.3877
    },
    "personB": {
      "date": "2001-06-15",
      "time": "18:30",
      "timezone": "America/Los_Angeles",
      "lat": 34.0522,
      "lon": -118.2437
    }
  }'

Common Uses

  • Relationship analysis tools
  • Compatibility dashboards
  • Synastry chart visualization
  • Advanced chart comparison engines
// Node.js 22+ — server-side only
fetch("https://api.astroapi.io/api/astro/synastry", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.ASTROAPI_KEY}`
  },
  body: JSON.stringify({
    personA: {
      date: "1990-01-01",
      time: "12:00",
      timezone: "America/New_York",
      lat: 40.7128,
      lon: -74.0060
    },
    personB: {
      date: "1992-06-15",
      time: "18:30",
      timezone: "America/Los_Angeles",
      lat: 34.0522,
      lon: -118.2437
    }
  })
})
  .then(res => res.json())
  .then(data => console.log(data));
# Python — Synastry API
import os
import requests

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

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

headers = {
  "Content-Type": "application/json",
  "Authorization": f"Bearer {os.environ['ASTROAPI_KEY']}"
}

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