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)
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",
"lat": 40.7128,
"lon": -74.0060
},
"personB": {
"date": "1992-06-15",
"time": "18:30",
"lat": 34.0522,
"lon": -118.2437
}
}
Example Response
{
"type": "synastry",
"charts": {
"personA": { "...full chart data..." },
"personB": { "...full chart data..." }
},
"aspects": [
{ "p1": "Sun", "p2": "Moon", "type": "conjunction", "orb": 1.47 }
]
}
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 YOUR_API_KEY_HERE" \
-d '{
"personA": {
"date": "2000-01-01",
"time": "12:00",
"lat": 33.7488,
"lon": -84.3877
},
"personB": {
"date": "2001-06-15",
"time": "18:30",
"lat": 34.0522,
"lon": -118.2437
}
}'
Common Uses
- Relationship analysis tools
- Compatibility dashboards
- Synastry chart visualization
- 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 = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())