Astronomy APIs
| API | Pricing | Auth | Format | Free tier | Status |
|---|---|---|---|---|---|
7Timer!GFS-based multi-day forecasts by coordinate, including sky seeing and transparency for stargazing. Weather & Environment › Astronomy | Free | None | JSON | Unlimited | Live |
AstronomyAPISun, Moon and planet positions and events for any place and date, plus rendered star charts and moon images. Weather & Environment › Astronomy | Free | API key | JSON | Unlimited | Live |
CycleCalcsComputed sun, moon, planet, and eclipse data for any location and date, no key needed. Weather & Environment › Astronomy | Freemium | None | JSON | 1k–10k/day | Live |
Moon APIMoon phase name, illumination, age, moonrise and moonset, lunar position and next full or new moon. Weather & Environment › Astronomy | Freemium | API key | JSON | 100–1k/day | Live |
MoonloraMoon phase, illumination, moon sign, and moonrise/moonset data for 1900–2100. Weather & Environment › Astronomy | Free | None | JSON | Unlimited | Live |
Sunrise SunsetSunrise, sunset, twilight, golden hour, sun position and moon phase for any coordinates, a year per call. Weather & Environment › Astronomy | Free | None | JSON | Unlimited | Live |
SunriseSunset.ioSunrise, sunset, twilight, golden and blue hour, moonrise and moon phase for any coordinates and date range. Weather & Environment › Astronomy | Free | None | JSON | Unlimited | Live |
USNO Astronomical Applications APIMoon phase dates, daily sun and moon rise/set, eclipses, seasons, Julian dates and sidereal time from USNO. Weather & Environment › Astronomy | None | JSON | Unlimited | Live |
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