Moon phase API

Give a moment; get the Moon's phase name and angle, illuminated fraction, age in days, lunation number, distance and angular diameter, the next principal phases and the next perigee and apogee. Add a place to the day route to also get moonrise and moonset in local time.

Get a free key Try it in the playground API reference

What you get

Example

curl -X POST https://astro-agent.dev/v1/astronomy/moon -H 'Content-Type: application/json' \
  -H "X-Credits-Token: $ASTRO_AGENTS_KEY" -d '{"datetime":"2026-12-24T20:00:00Z"}'

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/moon",
  "result": {
    "phase": {
      "name": "full moon",
      "phase_angle": 191.0345,
      "illuminated_fraction": 0.99009,
      "waxing": false,
      "age_days": 15.7973,
      "lunation": 1286
    },
    "distance": {
      "km": 356875.0,
      "earth_radii": 55.9529,
      "angular_diameter_arcmin": 33.473
    },
    "next_perigee": "2027-01-21T21:54:35Z"
  },
  "meta": {
    "result_sha256": "4b78be831030c902599a54299cd6a5a9a6416687baf005a9583ebc878bb9cfd9"
  }
}

Routes and prices

RouteNamePrice per callWhat it returns
POST /v1/astronomy/moonMoon phase, illumination, distance and next phases$0.01The Moon at a moment: phase name and angle, illuminated fraction, age, lunation number, distance and apparent size, the next new, first quarter, full and last quarter Moons, and the next perigee and apogee.
POST /v1/astronomy/dayAstronomical summary of the day for a place$0.02One call for a day at a place: sunrise, sunset, twilight, day length, golden and blue hour; the Moon's phase, illumination, rise and set; the planets observable that night; the next lunations, planetary stations and eclipse.
POST /v1/astronomy/rise-setRise, set and twilight times for a place$0.01Rise, transit and set of the Sun, Moon and planets for a place and local day, with civil, nautical and astronomical twilight, day length, golden hour and blue hour.

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

Limits

Alternatives

The US Naval Observatory API gives the dates of the phases free and without a key, for 1700-2100. If the phase dates are all you need, use it.

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