Compute sunrise, sunset, solar noon, and...
Compute sunrise, sunset, solar noon, and civil/nautical/astronomical twilight times for a coordinate + date. Query: lat (-90..90), lon (-180..180), date (YYYY-MM-DD). All times returned as ISO 8601 UTC. At high latitudes near solstices an event may not occur (polar day/night) — those fields return null and a note is included. dayLengthMinutes is the sunrise→sunset interval.
Request
- Base URL: https://2s.io
- URL: https://2s.io/api/sunrise/compute
- Auth: API key in header PAYMENT-SIGNATURE
Query parameters
Latitude in decimal degrees (WGS84).
Longitude in decimal degrees (WGS84).
Date in YYYY-MM-DD format.
Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.
Response
Changes
No recorded changes to this operation across all 1 revision of this API.