Back to Docs

Transits (Western)

POST/api/v1/transits/calculate

Calculate planetary transits for a specific date and compare them to a natal chart. Returns current planetary positions and aspects formed between transiting and natal planets.

Full URL

https://astro-api-1qnc.onrender.com/api/v1/transits/calculate

How Transit Calculations Work

Transits compare the current sky (or any specified date) with a person's natal chart.

  • (T) indicates a transiting planet (current position)
  • (N) indicates a natal planet (birth position)
  • Aspects between (T) and (N) planets reveal current life themes

Request Parameters

ParameterTypeRequiredDescription
natal.yearintegerYesNatal birth year
natal.monthintegerYesNatal birth month (1-12)
natal.dayintegerYesNatal birth day
natal.hourintegerYesNatal birth hour (0-23)
natal.minuteintegerYesNatal birth minute
natal.latfloatYesNatal birth latitude
natal.lngfloatYesNatal birth longitude
transit_datestringYesTransit date in ISO format (YYYY-MM-DDTHH:MM)
current_latfloatNoCurrent location latitude (for house cusps)
current_lngfloatNoCurrent location longitude
tz_strstringNoTimezone for transit location (default: AUTO)

📅 Transit Date Format

Use ISO 8601 format: YYYY-MM-DDTHH:MM

Examples:

2025-01-15T12:00 - January 15, 2025 at noon

2025-06-21T00:00 - June 21, 2025 at midnight

Sample Code

import requests
import json

url = "https://astro-api-1qnc.onrender.com/api/v1/transits/calculate"

payload = {
    "natal": {
        "year": 1990,
        "month": 5,
        "day": 15,
        "hour": 10,
        "minute": 30,
        "lat": 40.7128,
        "lng": -74.006,
        "tz_str": "AUTO"
    },
    "transit_date": "2025-01-15T12:00",
    "current_lat": 48.8566,
    "current_lng": 2.3522,
    "tz_str": "AUTO" # Transit timezone
}

headers = {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_API_KEY"
}

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

Response Data

{
  "transit_date": "2025-01-15",
  "transit_time": "12:00:00",
  
  "location": {
    "city": "Paris",
    "lat": 48.8566,
    "lng": 2.3522,
    "timezone": "Europe/Paris"
  },
  
  "natal_planets": [
    {
      "name": "Sun",
      "sign": "Tau",
      "pos": 24.72,
      "abs_pos": 54.72,
      "house": 9
    },
    {
      "name": "Moon",
      "sign": "Aqu",
      "pos": 14.23,
      "abs_pos": 314.23,
      "house": 5
    }
    // ... other natal planets
  ],
  
  "transit_planets": [
    {
      "name": "Sun",
      "sign": "Cap",
      "pos": 25.12,
      "abs_pos": 295.12,
      "house": 5,
      "retrograde": false
    },
    {
      "name": "Moon",
      "sign": "Lib",
      "pos": 8.45,
      "abs_pos": 188.45,
      "house": 2,
      "retrograde": false
    },
    {
      "name": "Mercury",
      "sign": "Cap",
      "pos": 12.34,
      "abs_pos": 282.34,
      "house": 5,
      "retrograde": true
    },
    {
      "name": "Venus",
      "sign": "Pis",
      "pos": 5.67,
      "abs_pos": 335.67,
      "house": 7,
      "retrograde": false
    },
    {
      "name": "Mars",
      "sign": "Can",
      "pos": 18.92,
      "abs_pos": 108.92,
      "house": 11,
      "retrograde": false
    }
    // ... other transiting planets
  ],
  
  "aspects": [
    {
      "p1": "Sun (T)",
      "p2": "Sun (N)",
      "type": "Trine",
      "orb": 0.4,
      "deg": 120.0,
      "is_major": true,
      "interpretation": "Transiting Sun harmonizes with natal Sun"
    },
    {
      "p1": "Saturn (T)",
      "p2": "Moon (N)",
      "type": "Square",
      "orb": 2.1,
      "deg": 90.0,
      "is_major": true,
      "interpretation": "Transiting Saturn challenges natal Moon"
    },
    {
      "p1": "Jupiter (T)",
      "p2": "Venus (N)",
      "type": "Conjunction",
      "orb": 3.5,
      "deg": 0.0,
      "is_major": true,
      "interpretation": "Transiting Jupiter conjoins natal Venus"
    }
    // ... more transit-to-natal aspects
  ],
  
  "aspects_summary": {
    "total": 18,
    "major": 12,
    "minor": 6,
    "by_type": {
      "Conjunction": 2,
      "Opposition": 1,
      "Trine": 4,
      "Square": 3,
      "Sextile": 2
    }
  }
}

Related Endpoints