Skip to content

Sunrise and Sunset API

No authHTTPSScience & Math
Open documentation ↗

Overview

Sunset and sunrise times for a given latitude and longitude

Sunrise and Sunset is a science & math API. It needs no API key. It is served over HTTPS and does not allow direct browser requests (no CORS).

At a glance

Authentication
No auth
HTTPS
Yes
CORS
No

Questions

Does the Sunrise and Sunset API need an API key?

No. The Sunrise and Sunset API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.

Can I call the Sunrise and Sunset API from the browser?

Not directly. The Sunrise and Sunset API does not send CORS headers, so call it from your server or a proxy instead of browser JavaScript.

Does the Sunrise and Sunset API support HTTPS?

Yes, the Sunrise and Sunset API is served over HTTPS.

What are alternatives to the Sunrise and Sunset API?

Other Science & Math APIs include NASA, arXiv, NASA ADS, USGS Earthquake Hazards Program, CORE.

Compare alternatives →

Listed from public-apis (MIT), public-apis database (MIT), Free Public APIs.