Astrology Transits API for Developers

The Transits API provides real-time and predictive planetary motion relative to a natal chart. Transits describe how current planetary positions activate, challenge, or support the structures of a birth chart. Developers use transit data for horoscope engines, timing notifications, predictive astrology, and spiritual cycle tracking.

Transits API Endpoint

POST https://api.astroapi.io/v1/transits

How Astrology Transits Work

A transit occurs when a moving planet forms an aspect to a natal planet. Common examples include:

  • Saturn square Sun (challenge, maturity)
  • Jupiter trine Moon (growth, opportunity)
  • Mars conjunct Mercury (action, communication)

The API returns all activating transits for a given date. You may also send a date range to compute long-term transit forecasts.

Transits API Request Body

Field Type Required Description
natal_chart object Yes The birth chart used as the reference for all transits.
date string Yes Date for transit calculation (YYYY-MM-DD).
end_date string No Optional end date for forecasting long-term transits.
orb number No Maximum orb allowed for transit aspects (default: 2°).

Example Transits API Response

{
  "date": "2025-01-10",
  "transits": [
    {
      "transit_body": "Saturn",
      "natal_body": "Sun",
      "aspect": "square",
      "orb": 1.4,
      "exact_degree": 89.2
    },
    {
      "transit_body": "Jupiter",
      "natal_body": "Venus",
      "aspect": "trine",
      "orb": 0.6,
      "exact_degree": 119.7
    }
  ]
}

Common Uses for Transit Data

  • Personalized daily, weekly, and monthly horoscopes
  • Push notifications for major planetary transits
  • Spiritual timing and manifestation cycles
  • Life-event forecasting models
  • Transit-based dashboards and analytics
  • “Today’s energy” insight engines

AstroAPI provides precise, astronomy-backed transit calculations. You control interpretation, weighting, and presentation logic.

// JavaScript — Transits API Example
fetch("https://api.astroapi.io/v1/transits", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
  },
  body: JSON.stringify({
    natal_chart: {
      date: "1995-11-08",
      time: "14:22",
      lat: 34.05,
      lon: -118.24,
      tz: "America/Los_Angeles"
    },
    date: "2025-01-10",
    orb: 2
  })
})
  .then(res => res.json())
  .then(data => console.log("Transits:", data.transits));
# Python — Transits API Example
import requests

url = "https://api.astroapi.io/v1/transits"

payload = {
    "natal_chart": {
        "date": "1995-11-08",
        "time": "14:22",
        "lat": 34.05,
        "lon": -118.24,
        "tz": "America/Los_Angeles"
    },
    "date": "2025-01-10",
    "orb": 2
}

response = requests.post(url, json=payload)
data = response.json()

print("Transits:", data["transits"])