/api/astro/western/planets/1 creditWestern planets (tropical)
Tropical positions of the ten planets, the north node and Chiron. TROPICAL, not sidereal. Every other chart endpoint here subtracts the ayanamsa — about 24 degrees at present — which moves nearly every planet into the previous sign. Someone born on 15 August is a Leo here and a Cancer on /api/astro/chart/. Both are correct for their own tradition; pick the one your product uses and do not mix them. Twelve bodies: the ten Western planets, the true north node and Chiron. Each returns its longitude, the sign and degrees within it, a formatted position, its daily motion and whether it is retrograde. Send a date, a time and a place. Nothing else — the zodiac is fixed by the route.
https://api.occultapi.com/api/astro/western/planets/Authentication
Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.
X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/jsonRequest fields
| Field | Type | Required | Notes |
|---|---|---|---|
| date_time | string (date-time) | required | The moment to calculate for, ISO 8601. ALWAYS include an offset or a trailing Z - a value with no zone is read as Asia/Kolkata (UTC+05:30), not UTC, and can return the previous day's result with a 200. '2026-09-01T06:00:00Z' and '2026-09-01 06:00:00' are different instants and give different answers. |
| latitude | number (double) | required | Latitude of the place, in decimal degrees. Positive is north, negative is south. Example: 26.9124 for Jaipur, 40.7128 for New York. Minutes and seconds are not accepted - convert first. min -89.9 · max 89.9 |
| longitude | number (double) | required | Longitude of the place, in decimal degrees. Positive is east, negative is west. Example: 75.7873 for Jaipur, -74.0060 for New York. Note the sign: a missing minus puts New York in China. min -180 · max 180 |
| timezone_as_float | number (double) | required | UTC offset of the place, in hours, as a decimal. Example: 5.5 for India (UTC+05:30), -5 for New York in winter, 5.75 for Nepal. This is NOT validated against date_time - if the two disagree you get a successful response for the wrong moment, so derive both from the same source. Use the offset in force on that date, not today's: a summer birth in a country with daylight saving needs the summer offset. min -12 · max 14 |
| ayanamsa | string | optional | TROPICAL (the default) or an ayanamsa name such as LAHIRI, KRISHNAMURTI, RAMAN or FAGAN_BRADLEY, case-insensitive. A sidereal ayanamsa subtracts its value at each moment from every returned longitude. |
| include_asteroid_lilith | boolean | optional | Add the asteroid (1181) Lilith, a different body from Black Moon Lilith, named "asteroid_lilith", after the other bodies. |
| include_lilith | boolean | optional | Add Black Moon Lilith (the mean lunar apogee) as a body named "lilith", after the other bodies. |
| keys | array | optional | Which calculations to return, as a list of names. See the key table for this endpoint; an unrecognised name rejects the whole request. One call costs one credit however many keys you ask for, so request everything you need at once rather than making several calls. |
Example request
curl -X POST https://api.occultapi.com/api/astro/western/planets/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date_time":"1990-08-15T10:30:00+05:30","timezone_as_float":5.5,"latitude":26.9124,"longitude":75.7873}'Response
{
"data": {
"zodiac": "tropical",
"planets": [
{
"name": "sun",
"longitude": 142.125,
"sign": "Leo",
"sign_index": 5,
"degree_in_sign": 22.125,
"formatted": "22°07' Leo",
"speed": 0.960934,
"retrograde": false
},
{
"name": "moon",
"longitude": 72.66,
"sign": "Gemini",
"sign_index": 3,
"degree_in_sign": 12.66,
"formatted": "12°39' Gemini",
"speed": 14.262958,
"retrograde": false
},
{
"name": "mercury",
"longitude": 169.176,
"sign": "Virgo",
"sign_index": 6,
"degree_in_sign": 19.176,
"formatted": "19°10' Virgo",
"speed": 0.776615,
"retrograde": false
},
{
"name": "venus",
"longitude": 121.573,
"sign": "Leo",
"sign_index": 5,
"degree_in_sign": 1.573,
"formatted": "1°34' Leo",
"speed": 1.22118,
"retrograde": false
},
{
"name": "mars",
"longitude": 51.217,
"sign": "Taurus",
"sign_index": 2,
"degree_in_sign": 21.217,
"formatted": "21°13' Taurus",
"speed": 0.576982,
"retrograde": false
},
{
"name": "jupiter",
"longitude": 119.337,
"sign": "Cancer",
"sign_index": 4,
"degree_in_sign": 29.337,
"formatted": "29°20' Cancer",
"speed": 0.214649,
"retrograde": false
},
{
"name": "saturn",
"longitude": 289.878,
"sign": "Capricorn",
"sign_index": 10,
"degree_in_sign": 19.878,
"formatted": "19°52' Capricorn",
"speed": -0.056381,
"retrograde": true
},
{
"name": "uranus",
"longitude": 275.978,
"sign": "Capricorn",
"sign_index": 10,
"degree_in_sign": 5.978,
"formatted": "5°58' Capricorn",
"speed": -0.023775,
"retrograde": true
},
{
"name": "neptune",
"longitude": 282.199,
"sign": "Capricorn",
"sign_index": 10,
"degree_in_sign": 12.199,
"formatted": "12°11' Capricorn",
"speed": -0.019063,
"retrograde": true
},
{
"name": "pluto",
"longitude": 225.084,
"sign": "Scorpio",
"sign_index": 8,
"degree_in_sign": 15.084,
"formatted": "15°05' Scorpio",
"speed": 0.011469,
"retrograde": false
},
{
"name": "north_node",
"longitude": 307.233,
"sign": "Aquarius",
"sign_index": 11,
"degree_in_sign": 7.233,
"formatted": "7°13' Aquarius",
"speed": 0.014476,
"retrograde": false
},
{
"name": "chiron",
"longitude": 112.438,
"sign": "Cancer",
"sign_index": 4,
"degree_in_sign": 22.438,
"formatted": "22°26' Cancer",
"speed": 0.099053,
"retrograde": false
}
]
},
"status": 200,
"is_error": false,
"message": "successful"
}Captured from a real call using the exact request above. Results sit under data.
Errors
Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.