Astronomy API

Every common astronomy calculation behind one HTTPS POST: the times of the day, where the Sun, Moon and planets are, what happens in the sky and when. Computed from the NASA/JPL DE440 ephemeris for any date from 1800 to 2200; no language model, and every result carries a SHA-256 you can recompute.

Get a free key Try it in the playground API reference

What you get

Example

curl -X POST https://astro-agent.dev/v1/astronomy/day -H 'Content-Type: application/json' \
  -H "X-Credits-Token: $ASTRO_AGENTS_KEY" -d '{"date":"2026-06-21","latitude":48.8566,"longitude":2.3522}'

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/day",
  "result": {
    "sun": {
      "sunrise": "2026-06-21T05:46:57+02:00",
      "sunset": "2026-06-21T21:57:52+02:00",
      "day_length_minutes": 970.9
    },
    "moon": {
      "name": "first quarter",
      "illuminated_fraction": 0.44962,
      "age_days": 6.2957
    },
    "next_eclipse": {
      "kind": "solar",
      "eclipse_type": "total",
      "utc": "2026-08-12T17:46:00Z",
      "local": "2026-08-12T19:46:00+02:00",
      "timestamp": 1786556760,
      "note": "greatest eclipse, global; whether and how it is seen from this place: astronomy/eclipse-local"
    }
  },
  "meta": {
    "result_sha256": "6f694b02cc506cafaa56f1cf76209f40a82839612346292d674afb0c9ec8f191"
  }
}

Routes and prices

RouteNamePrice per callWhat it returns
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.
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/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.
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/positionsPlanetary positions for any date (ephemeris)$0.01Ecliptic longitude and latitude, daily speed, retrograde flag and distance of the Sun, the Moon, Mercury..Pluto and the lunar nodes, for any moment 1800-2200.
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.
POST /v1/astronomy/phenomenaPlanetary phenomena: oppositions, conjunctions, elongations$0.10Every conjunction with the Sun (inferior / superior for Mercury and Venus), opposition, greatest elongation, conjunction between two planets, perihelion and aphelion between two dates, to the second.
POST /v1/astronomy/seasonsEquinoxes, solstices, perihelion and day length over a year$0.01The year's equinoxes and solstices and Earth's perihelion and aphelion to the second; optionally the Sun day by day: sunrise, sunset, day length, solar noon, declination and equation of time.
POST /v1/astronomy/timeJulian day, sidereal time, Delta T and time scales$0.01One moment in every astronomical time scale: UTC, unix time, Julian day (UTC, UT1, TT, TDB), MJD, Julian centuries, Delta T, TAI-UTC, UT1-UTC, Greenwich and local mean and apparent sidereal time.
POST /v1/astronomy/convertCoordinate conversion between sky frames$0.01Convert one direction on the sky between equatorial (J2000 and of date), ecliptic (J2000 and of date), galactic and, with a moment and a place, horizontal coordinates.

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

Limits

Alternatives

Free services cover single needs well: sunrise-sunset.org for the times of the day, the US Naval Observatory API for phases, seasons and rise/set (1700-2100), NASA/JPL Horizons for ephemerides. Astro Agents puts all of these behind one key and one response format, for 1800-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