curl -X POST https://yogataraapi.prahlad.app/api/astro/eclipse/visibility-path/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date_time":"2026-01-01T00:00:00+00:00","timezone_as_float":0,"eclipse_type":"total","direction":"after","samples":24}'Where a solar eclipse is total, as a line of coordinates you can draw on a map. Finds the next solar eclipse from the moment you give, then samples the point where the Moon's shadow axis meets the Earth and returns ordered latitude/longitude pairs. For the 2026-08-12 total that track runs out of the Siberian Arctic, over the pole, down across Iceland and out into the Atlantic off Iberia — the path that decides whether a place sees a total eclipse or a partial one. The window sampled is totality (or annularity), not the whole eclipse. Outside it the shadow axis misses the Earth altogether and there is no central line, so a purely partial eclipse returns an empty path with path_traced_over set to "none" rather than a line that does not exist. Points where the axis misses are dropped, so sample_count can be lower than the samples you asked for. Also returns the point of greatest eclipse with its magnitude, obscuration and Saros series and member number — the identifier eclipse catalogues are indexed by. Path times are UTC and suffixed Z. A track crosses the globe, so the offset the rest of the eclipse endpoints use would be misleading on a point halfway round the world from you. Umbra and penumbra edge limits are not returned: swisseph populates only the central line for this calculation, and reporting the empty slots would mean publishing 0N 0E as a boundary.
| 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. |
| centrality | string | optional | Central means the Moon's shadow axis actually touches the Earth. Only meaningful when eclipse_type is not 'any'. anycentralnon-central |
| direction | string | optional | Search forward from date_time, or backward. afterbefore |
| eclipse_type | string | optional | Restrict the search to one kind of solar eclipse. anytotalannularpartialhybrid |
| elevation | number (double) | optional | |
| 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. |
| 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. |
| samples | integer | optional | How many points to trace along the path. More is smoother; at most 120. min 2 · max 120 |
| 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 |