v1

latestOpenAPI 3.1.02026-07-132718.1 KB

Sun 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.

get/v2

Query parameters

latnumber required

Latitude in decimal degrees.

lngnumber required

Longitude in decimal degrees.

datestring

YYYY-MM-DD, 'today' or 'tomorrow'. Default: today in the local timezone of the coordinates.

date_startstring date

Start of a date range (YYYY-MM-DD). Requires date_end. Max 366 days. Response becomes an array of days.

date_endstring date

End of a date range (YYYY-MM-DD). Requires date_start.

tzstring

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).

time_format'iso8601' | 'unix'

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.

OR

Example response

{
  "utc_offset": "+02:00"
}
All 2 operations