curl -X POST https://yogataraapi.prahlad.app/api/astro/eclipse/attributes/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date_time":"2026-08-12T17:46:00+00:00","timezone_as_float":0,"latitude":64.1466,"longitude":-21.9426,"kind":"solar"}'How deep an eclipse is at one instant, seen from one place. A snapshot rather than a search: at this second, from these coordinates, what fraction of the disc is covered, how high the body stands above the horizon, what the magnitude is, and which Saros series the eclipse belongs to. Obscuration changes minute by minute through an eclipse, so stepping this endpoint across the event gives you the coverage curve — what a live tracker needs and what a list of contact times cannot give. Distinct from /api/astro/eclipse/local/, which searches for the next eclipse visible from a place and returns its contact times. This one measures a moment you already have: pass it a maximum from /local/ or /upcoming/ for the depth at the peak. Set kind to "lunar" for umbral and penumbral magnitude instead. There is no obscuration for a lunar eclipse — that is a solar concept, and the field is absent rather than zero. If no eclipse is touching that place at that instant the response says so, rather than returning a page of zeros that reads like a real measurement.
| 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 |
| direction | string | optional | Search forward from date_time, or backward. afterbefore |
| 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. |
| kind | string | optional | Which body's eclipse to measure at this moment. solarlunar |
| 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 |