Data
Next solar & lunar eclipses for a location API
Given an observer lat/lon (and an optional from-date) returns the next solar and lunar eclipses with date, type (total/annular/partial/penumbral) and a rough local-visibility verdict, computed from a bundled table of real eclipse elements (NASA five-millennium catalog, 2024-2030). The value-add: an astronomy lookup plus a central-path visibility heuristic an LLM cannot reliably recall. Answers 'when is the next solar eclipse here', 'next lunar eclipse', 'will I see the eclipse from my location', 'upcoming eclipses near me'.
Price$0.01per request
MethodPOST
Route/v1/data/eclipse
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
dataeclipsesolar-eclipselunar-eclipseastronomyephemerisoccultationvisibility
API URL
Integration docshttps://x402.hexl.dev/v1/data/eclipseExample request
{
"latitude": 25.3,
"longitude": -104.1,
"from": "2024-01-01T00:00:00Z"
}Example response
{
"latitude": 25.3,
"longitude": -104.1,
"from": "2024-01-01T00:00:00.000Z",
"nextSolar": {
"date": "2024-04-08T18:18:00Z",
"type": "total",
"kind": "solar",
"greatestEclipseLat": 25.3,
"greatestEclipseLon": -104.1,
"localVisibility": "central path (greatest eclipse)"
},
"nextLunar": {
"date": "2024-03-25T07:13:00Z",
"type": "penumbral",
"kind": "lunar",
"localVisibility": "visible if Moon is above horizon at peak"
},
"upcoming": [
{
"date": "2024-03-25T07:13:00Z",
"type": "penumbral",
"kind": "lunar",
"localVisibility": "visible if Moon is above horizon at peak"
}
]
}Input schema
{
"type": "object",
"required": [
"latitude",
"longitude"
],
"properties": {
"latitude": {
"type": "number",
"examples": [
25.3
]
},
"longitude": {
"type": "number",
"examples": [
-104.1
]
},
"from": {
"type": "string",
"examples": [
"2024-01-01T00:00:00Z"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}