Solar and lunar eclipses
astro_eclipsesSolar and lunar eclipses: the next or previous from a date, or all in a range, with type, magnitude, obscuration, Saros series and global geometry. A solar eclipse also carries a computed hybrid flag and, when central, the duration, path width and Sun altitude at greatest eclipse. With a location it adds local circumstances, contact times, and an explicit visible-from-here answer; set visible_only to true to keep only eclipses visible there. include adds the precomputed central path or the circumstances at greatest local eclipse. NOTE: count applies per type, so count=3 with type "both" can return six events.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | IANA timezone like "Europe/Lisbon" to render event times in local time. Optional; a resolved place supplies its own timezone. | |
| end | No | Last day of an explicit window. ISO 8601 UTC date or datetime, e.g. "2026-08-06" or "2026-08-06T21:00:00Z". Or jd: followed by a Julian Day on the UT scale, e.g. "jd:2461000.5". On astro_positions, date may list up to 24 datetimes separated by commas, answered in the order sent. Omit for the current moment. Years 1700 to 2200 only; outside that range the API refuses with DATE_OUT_OF_RANGE because the ephemeris is not reliable there. | |
| lat | No | Latitude in decimal degrees, north positive. Send lat and lon together. | |
| lon | No | Longitude in decimal degrees, east positive (Lisbon is about -9.14). Send lat and lon together. | |
| date | No | Anchor date to search from. ISO 8601 UTC date or datetime, e.g. "2026-08-06" or "2026-08-06T21:00:00Z". Or jd: followed by a Julian Day on the UT scale, e.g. "jd:2461000.5". On astro_positions, date may list up to 24 datetimes separated by commas, answered in the order sent. Omit for the current moment. Years 1700 to 2200 only; outside that range the API refuses with DATE_OUT_OF_RANGE because the ephemeris is not reliable there. | |
| type | No | Which kind of eclipse to report. Default "both". | |
| count | No | How many eclipses PER TYPE to return. | |
| place | No | Place name instead of lat/lon, as "City" or "City,CC" with an ISO country code, e.g. "Lisbon,PT". Resolved server-side; the response then carries a required GeoNames CC BY 4.0 credit in its attribution field, which must be preserved when shown. | |
| start | No | First day of an explicit window (use with end). ISO 8601 UTC date or datetime, e.g. "2026-08-06" or "2026-08-06T21:00:00Z". Or jd: followed by a Julian Day on the UT scale, e.g. "jd:2461000.5". On astro_positions, date may list up to 24 datetimes separated by commas, answered in the order sent. Omit for the current moment. Years 1700 to 2200 only; outside that range the API refuses with DATE_OUT_OF_RANGE because the ephemeris is not reliable there. | |
| cursor | No | Opaque pagination cursor from a previous result's next_cursor. Send it with the same start/end arguments as the first page. | |
| include | No | Optional extras, added to the default blocks rather than replacing them. "path": the precomputed central path of a solar eclipse as inline GeoJSON (central line, northern and southern limits, and per-minute duration, width, phase and Sun altitude), for the central eclipses that have one; every other eclipse says why it has none. Large: about 65 to 90 KB of JSON per eclipse, returned as both text and structured content, so ask for one eclipse at a time (type "solar", a date just before it, count 1). "greatest": the circumstances at greatest eclipse from the supplied location, inside each solar eclipse's local block (requires a location). | |
| direction | No | Search direction from the anchor date. Default "next". | |
| visible_only | No | true keeps only eclipses visible from the supplied location (requires a location). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Solar and lunar eclipses in a date range, optionally filtered to one location. | |
| rights | No | Either unrestricted, or attribution_required when third-party place data was used. When attribution_required, the attribution line must be shown. | |
| warnings | No | Machine-readable notices about this answer. Present only when non-empty. Never changes whether the call succeeded. | |
| attribution | No | The credit line to display verbatim when rights is attribution_required. | |
| next_cursor | No | Present only when more rows exist. Send it back with the SAME start/end arguments as the first call to get the next page. | |
| not_computed | No | Data this API deliberately does not serve, and why. Present only when the question touched such a field. An absence named here is information: treat it as "withheld", never as "none exists". |