Solar and lunar eclipse API

Give a place and a date range (up to a year per call); get every solar and lunar eclipse with its local circumstances: whether and how it is seen from there, magnitude and obscuration, each contact time in local time with the Sun's altitude and azimuth, and the duration.

Get a free key Try it in the playground API reference

What you get

Example

curl -X POST https://astro-agent.dev/v1/astronomy/eclipse-local -H 'Content-Type: application/json' \
  -H "X-Credits-Token: $ASTRO_AGENTS_KEY" -d '{"start":"2027-08-01","end":"2027-08-31","latitude":25.6872,"longitude":32.6396}'

This route is not part of the free first call, so the command carries your key (-H "X-Credits-Token: $ASTRO_AGENTS_KEY"). The free key includes it in the Free plan's demo of 100 premium calls a month.

A real answer to this request (excerpt). The same request always returns the same result_sha256, which POST https://astro-agent.dev/v1/verify recomputes for free:

{
  "endpoint": "astronomy/eclipse-local",
  "result": {
    "counts": {
      "eclipses": 2,
      "visible": 1
    },
    "eclipses": [
      {
        "kind": "solar",
        "global_type": "total",
        "local_type": "total",
        "magnitude": 1.035,
        "obscuration": 1.0,
        "duration_minutes": 166.29,
        "contacts": [
          {
            "C1": "2027-08-02T11:40:17+03:00"
          },
          {
            "C2": "2027-08-02T13:02:08+03:00"
          },
          {
            "MAX": "2027-08-02T13:05:18+03:00"
          },
          {
            "C3": "2027-08-02T13:08:28+03:00"
          },
          {
            "C4": "2027-08-02T14:26:35+03:00"
          }
        ]
      }
    ]
  },
  "meta": {
    "result_sha256": "4025fd5c69649f1e02a7c1e7b8713abd756b04bfa278732c23a638b4e92f395e"
  }
}

Routes and prices

RouteNamePrice per callWhat it returns
POST /v1/astronomy/eclipse-localLocal circumstances of solar and lunar eclipses$0.10For a place: every solar and lunar eclipse between two dates with its local circumstances: whether and how it is seen, contact times, magnitude, obscuration, duration and the Sun's or Moon's altitude.
POST /v1/astronomy/eventsCelestial event calendar (eclipses, stations, lunations)$0.25Solar and lunar eclipses, planetary stations, lunations, separations, longitude crossings and declination events between two dates (1800-2200), to the minute.

The same routes are MCP tools on https://astro-agent.dev/mcp.

Limits

Alternatives

The US Naval Observatory API is free, but its local circumstances cover 2017 through 2024 only (its list of eclipses by year covers 1800-2050). Astro Agents computes local circumstances for any place from 1800 to 2200.

Checked on the providers' own pages on 2026-11-20. Their terms may have changed since.

When Astro Agents fits

Get a free key Try it in the playground API reference