Wild APIs

Astronomy APIs

Astronomy APIs compute where the sun, moon and planets are for a given place and time. Sunrise Sunset and SunriseSunset.io are free and keyless for daylight, twilight and golden hour times, and the U.S. Naval Observatory's API adds eclipses, seasons and sidereal time. AstronomyAPI renders star charts and moon images with a free key, and CycleCalcs computes planet and eclipse data without one. Free Weather APIs →
8 listings of 90 in catalogue
APIPricingAuthFormatFree tierStatus
7Timer!GFS-based multi-day forecasts by coordinate, including sky seeing and transparency for stargazing.
Weather & Environment › Astronomy
FreeNoneJSONUnlimitedLive
AstronomyAPISun, Moon and planet positions and events for any place and date, plus rendered star charts and moon images.
Weather & Environment › Astronomy
FreeAPI keyJSONUnlimitedLive
CycleCalcsComputed sun, moon, planet, and eclipse data for any location and date, no key needed.
Weather & Environment › Astronomy
FreemiumNoneJSON1k–10k/dayLive
Moon APIMoon phase name, illumination, age, moonrise and moonset, lunar position and next full or new moon.
Weather & Environment › Astronomy
FreemiumAPI keyJSON100–1k/dayLive
MoonloraMoon phase, illumination, moon sign, and moonrise/moonset data for 1900–2100.
Weather & Environment › Astronomy
FreeNoneJSONUnlimitedLive
Sunrise SunsetSunrise, sunset, twilight, golden hour, sun position and moon phase for any coordinates, a year per call.
Weather & Environment › Astronomy
FreeNoneJSONUnlimitedLive
SunriseSunset.ioSunrise, sunset, twilight, golden and blue hour, moonrise and moon phase for any coordinates and date range.
Weather & Environment › Astronomy
FreeNoneJSONUnlimitedLive
USNO Astronomical Applications APIMoon phase dates, daily sun and moon rise/set, eclipses, seasons, Julian dates and sidereal time from USNO.
Weather & Environment › Astronomy
NoneJSONUnlimitedLive

Choosing an Astronomy API

Is there a free Astronomy API?

Yes. Sunrise Sunset, AstronomyAPI, 7Timer!, Moonlora and SunriseSunset.io are free to use, and CycleCalcs and Moon API have a free tier alongside paid plans. See all free Weather APIs.

Which Astronomy APIs work without an API key?

Sunrise Sunset, USNO Astronomical Applications API, 7Timer!, CycleCalcs, Moonlora and 1 other need no key or sign-up, so you can try them with a plain request.

Can I call an Astronomy API from front-end JavaScript?

Sunrise Sunset, USNO Astronomical Applications API, CycleCalcs, Moonlora and SunriseSunset.io allow cross-origin requests and need no key, so they work straight from the browser. For the others, call them from your server so your key stays private.

Can I use Astronomy APIs in a commercial project?

Sunrise Sunset, CycleCalcs, Moonlora and SunriseSunset.io permit commercial use. 7Timer! and Moon API restrict it, for example to non-commercial or attributed use, so read the terms first.

Which Astronomy APIs work with AI agents?

Moonlora has both an MCP server and an OpenAPI spec. CycleCalcs has an MCP server, so an AI agent can call it directly. Moon API and SunriseSunset.io publish an OpenAPI spec for generating clients and tools.

More specific: Sunrise & Sunset APIs · Moon Phase APIs

More in Weather & Environment: Weather Forecasts APIs · Air Quality APIs · Climate & Carbon APIs · Natural Disasters APIs · Energy APIs

Related: NASA & Space APIs