Visible planets tonight API

Give a place and a date; get, for the Moon and each planet, the windows of the night when it is above a minimum altitude while the Sun is below a given depression, with the best moment, its altitude, azimuth and magnitude, and the dark-sky window itself.

Get a free key Try it in the playground API reference

What you get

Example

curl -X POST https://astro-agent.dev/v1/astronomy/visibility -H 'Content-Type: application/json' \
  -H "X-Credits-Token: $ASTRO_AGENTS_KEY" -d '{"date":"2026-11-20","latitude":51.5074,"longitude":-0.1278,"bodies":["moon","venus","mars","jupiter","saturn"]}'

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/visibility",
  "result": {
    "settings": {
      "min_altitude_deg": 10.0,
      "sun_altitude_max_deg": -6.0
    },
    "bodies": [
      {
        "body": "moon",
        "visible": true,
        "max_altitude": 44.19,
        "best": "2026-11-20T20:30:00+00:00"
      },
      {
        "body": "venus",
        "visible": true,
        "max_altitude": 20.3,
        "best": "2026-11-21T06:50:00+00:00"
      },
      {
        "body": "mars",
        "visible": true,
        "max_altitude": 52.57,
        "best": "2026-11-21T06:04:00+00:00"
      },
      {
        "body": "jupiter",
        "visible": true,
        "max_altitude": 51.97,
        "best": "2026-11-21T05:54:00+00:00"
      },
      {
        "body": "saturn",
        "visible": true,
        "max_altitude": 39.37,
        "best": "2026-11-20T20:36:00+00:00"
      }
    ]
  },
  "meta": {
    "result_sha256": "f38f5b55de45c1b853ae4a8c992d252e19fc769df72b11be638522e253bf0db3"
  }
}

Routes and prices

RouteNamePrice per callWhat it returns
POST /v1/astronomy/visibilityObservation windows for a night$0.02When each planet and the Moon can be observed from a place during a night: windows above a minimum altitude while the sky is dark, with the best time, altitude, azimuth and magnitude.
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/altazAltitude and azimuth of every body from a place$0.01Where the Sun, Moon and planets are in the sky from a place at a moment: altitude, azimuth, compass point, topocentric right ascension and declination, distance, elongation, illumination and magnitude.

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

Limits

Alternatives

We found no maintained hosted API for this; most "planets tonight" tools are web pages. If you know one, the comparison is easy to make with a free key.

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