Wild APIs

Sunrise & Sunset APIs

Daylight-time APIs differ mainly in scope. Sunrise Sunset and SunriseSunset.io are both free and need no key: the first returns sunrise, sunset, twilight, golden hour and sun position for up to a year per call, and the second adds blue hour and accepts a date range. The USNO Astronomical Applications API, from the U.S. Naval Observatory, gives daily rise and set times alongside seasons, eclipses and Julian dates. Free Weather APIs →
3 listings
APIPricingAuthFormatFree tierStatus
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 a Sunrise & Sunset API

Is there a free Sunrise & Sunset API?

Yes. Sunrise Sunset and SunriseSunset.io are free to use. See all free Weather APIs.

Which Sunrise & Sunset APIs work without an API key?

Sunrise Sunset, SunriseSunset.io and USNO Astronomical Applications API need no key or sign-up, so you can try them with a plain request.

Can I call a Sunrise & Sunset API from front-end JavaScript?

Sunrise Sunset, SunriseSunset.io and USNO Astronomical Applications API 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 Sunrise & Sunset APIs in a commercial project?

Sunrise Sunset and SunriseSunset.io permit commercial use.

Which Sunrise & Sunset APIs work with AI agents?

SunriseSunset.io publishes an OpenAPI spec for generating clients and tools.

Broader: Astronomy APIs · Weather & Environment APIs

More in Astronomy: Moon Phase APIs