v1
latestOpenAPI 3.1.02026-07-132718.1 KBSun times and solar data (v2, recommended)
All astronomical data for a location and date (or date range). Times in ISO 8601 with offset, in the local timezone of the coordinates unless tz is given. If you fetch the same location every day, request a full year once with date_start/date_end instead of one request per day.
Query parameters
Latitude in decimal degrees.
Longitude in decimal degrees.
YYYY-MM-DD, 'today' or 'tomorrow'. Default: today in the local timezone of the coordinates.
Start of a date range (YYYY-MM-DD). Requires date_end. Max 366 days. Response becomes an array of days.
End of a date range (YYYY-MM-DD). Requires date_start.
IANA timezone identifier (e.g. Europe/Madrid). Abbreviations like PST are rejected. Default: resolved automatically from the coordinates (oceanic coordinates resolve to nautical Etc/GMT+/-N zones -- POSIX sign convention: Etc/GMT+8 means UTC-8).
Output format for event times. 'unix' returns epoch seconds (UTC by definition; tzid/utc_offset are still included as context, and date/tz still select the local calendar day). Null events stay null.
Response
Single day (object) or range (object with days array). Explicit dates are served with Cache-Control: immutable -- same input always returns the same output.
Example response
{
"utc_offset": "+02:00"
}