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
- Observing windows per body, with start, end and duration
- The best moment of each window: altitude, azimuth, magnitude
- Your own thresholds: minimum altitude and how dark the sky must be
- The day route lists tonight's planets with the rest of the day's data
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
| Route | Name | Price per call | What it returns |
|---|---|---|---|
POST /v1/astronomy/visibility | Observation windows for a night | $0.02 | When 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/day | Astronomical summary of the day for a place | $0.02 | One 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/altaz | Altitude and azimuth of every body from a place | $0.01 | Where 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
- Dates from 1800 to 2200; range routes take up to a year per call.
- Without a key: 1 free call on the $0.01-0.02 routes, then HTTP 402 with a pay-per-call offer (USDC, x402).
- Free key (an email, no card): 10,000 calls a month, 30 a minute, personal, research and evaluation use only. Paid plans from $19 a month by card, for commercial use: see pricing.
- Past the quota, calls answer 429 until the 1st of the month: nothing is charged beyond the plan.
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
- Stargazing, education and observatory apps
- Notifications such as "Saturn is well placed tonight"
- Planning observations from a given site