# Sunrise-Sunset

Category: [Location Information](https://free-web-services.com/web-services/geo/location-info/)  
Page: https://free-web-services.com/web-services/geo/location-info/sunrise-sunset.html  
Documentation: https://sunrise-sunset.org/api

The Sunrise-Sunset API gives the times of sunrise, sunset, solar noon and civil, nautical and astronomical twilight for any coordinates and date. Times are returned in UTC, or in a time zone you choose, as JSON. Useful for apps that switch to a dark theme at sunset or plan outdoor activities. Free, no key needed; the provider asks for a link back.

- API key: Not needed
- Pricing: Free, no key needed; the provider asks for a link back.
- From the browser: Yes (CORS)
- Formats: JSON
- Interface: REST, HTTP-GET
- Provider: sunrise-sunset.org
- Last checked: Working on November 16th, 2026

Example request:

```sh
curl 'https://api.sunrise-sunset.org/json?lat=51.5&lng=-0.12&date=today'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

