Time Conversion
Solar Events (Sunrise/Sunset/Transit)
Compute exact times for sunrise, sunset, and solar transit for a given day and location.
get/time/solar-event
Request
- Base URL: https://api.openephemeris.com
- URL: https://api.openephemeris.com/time/solar-event
- Auth: one of:
- HTTP bearer
- API key in header X-OpenEphemeris-API-Key
- API key in header X-API-Key
- API key in header X-Service-Key
Query parameters
datestring required
Date (YYYY-MM-DD)
Example:2026-03-20
latitudenumber required
Observer latitude
longitudenumber required
Observer longitude
elevnumber
Observer elevation in metres above sea level. Lowers the visible horizon (dip ~ 1.76 arcmin * sqrt(metres)), which moves sunrise/sunset and moonrise/moonset earlier and later respectively - about 6 minutes per event at 1600 m. Default 0 reproduces the sea-level result exactly.
Headers
authorizationstring nullable
X-API-Keystring nullable
X-OpenEphemeris-API-Keystring nullable
apikeystring nullable
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.