/api/astro/planet-equatorial/1 creditPlanet equatorial coordinates
Right ascension and declination — the coordinates star catalogues use. Ecliptic longitude is what astrology reads; equatorial coordinates are what every telescope, planetarium and astronomy database speaks. Both the sexagesimal form and a decimal form are returned, because you cannot subtract two {hours, minutes, seconds} objects, along with how fast each coordinate is changing. Distance is passed through in astronomical units exactly as the engine reports it. It is rounded to three decimal places, which is fine for a planet and far too coarse for the Moon — 0.002 AU spans about 85,000 km of the lunar orbit — so it is deliberately not converted to kilometres.
https://yogataraapi.prahlad.app/api/astro/planet-equatorial/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. |
| altitude | number (double) | optional | OBSERVER elevation in metres, not a body's altitude. |
| 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. |
| latitude | number (double) | optional | 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) | optional | 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 |
| planet_names | array | optional | Bodies to report, e.g. ["SUN", "MOON", "MARS"]. |
| time_zone | number (double) | optional | UTC offset. Either this or timezone_as_float; they mirror. min -12 · max 14 |
| timezone_as_float | number (double) | optional | 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 |
Example request
curl -X POST https://yogataraapi.prahlad.app/api/astro/planet-equatorial/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date_time":"2026-09-09T12:00:00+00:00","latitude":26.9124,"longitude":75.7873,"timezone_as_float":0,"planet_names":["SUN","MARS"]}'Response
{
"data": {
"bodies": {
"SUN": {
"right_ascension": {
"hours": 11,
"minutes": 11,
"seconds": 32.82
},
"right_ascension_hours": 11.19245,
"declination": {
"degrees": 5,
"minutes": 11,
"seconds": 52.8
},
"declination_degrees": 5.198,
"speeds": {
"right_ascension_speed": 0.898951,
"declination_speed": -0.377955,
"distance_speed": -0.000253
},
"distance_au": 1.007
},
"MARS": {
"right_ascension": {
"hours": 7,
"minutes": 21,
"seconds": 31.98
},
"right_ascension_hours": 7.358883,
"declination": {
"degrees": 22,
"minutes": 47,
"seconds": 13.2
},
"declination_degrees": 22.787,
"speeds": {
"right_ascension_speed": 0.669754,
"declination_speed": -0.070679,
"distance_speed": -0.005852
},
"distance_au": 1.802
}
},
"notes": {
"distance_au": "Rounded to three decimal places by the engine. Too coarse to convert to kilometres for the Moon."
}
},
"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.