v2

latestOpenAPI 3.1.02026-08-0176498.0 KB
Time machine - historical weather

Returns weather data for a single location and given day in the past

Actual weather data for a single location and day in the past

The output contains actual weather data for each day up to 20 years in the past, and long-term statistics of selected weather variables aggregated over 40 years.

Location specification

The location of the weather data must be specified. There are two ways to do this:

  1. Specify the GPS coordinates of the location using the parameters lat and lon.
  2. OR specify the name of the place using the parameter place_id. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

Note: For mountains, it is usually better to specify the place_id rather than the lat and lon. When you use place_id, you are guaranteed to receive data for the precise elevation of the peak. When you specify the coordinates, the elevation can be less precise.

get/time_machine

Query parameters

place_idstring

Identifier of a place. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

Identifier of a place. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

latstring

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

lonstring

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

datestring date required

The day of the data in the past. Specify in YYYY-MM-DD format, e.g. 2021-08-24.

The day of the data in the past. Specify in YYYY-MM-DD format, e.g. 2021-08-24.

timezonestring

Timezone to be used for the date fields. If not specified, local timezone of the location will be used. The format is according to the tzinfo database, so values like Europe/Prague or UTC can be used. Alternatively you may use the value auto in which case the local timezone of the location is used. The full list of valid timezone strings can be found here.

Timezone to be used for the date fields. If not specified, local timezone of the location will be used. The format is according to the tzinfo database, so values like Europe/Prague or UTC can be used. Alternatively you may use the value auto in which case the local timezone of the location is used. The full list of valid timezone strings can be found here.

units'auto' | 'metric' | 'us' | 'uk' | 'ca'

Unit system to be used. The available values are:

  • auto: Select the system automatically, based on the forecast location.
  • metric: Metric (SI) units (°C, mm/h, m/s, cm, km, hPa).
  • us: Imperial units (°F, in/h, mph, in, mi, Hg).
  • uk: Same as metric, except that visibility is in miles and wind speeds are in mph.
  • ca: Same as metric, except that wind speeds are in km/h and pressure is in kPa.
language'cs' | 'en' | 'de' | 'es' | 'fr' | 'pl' | 'pt'

The language of weather summaries (variable names are never translated). Available languages are:

  • en: English
  • es: Spanish
  • fr: French
  • de: German
  • pl: Polish
  • pt: Portuguese
  • cs: Czech
keystring

Your unique API key. You can either specify it in this parameter, or set it in X-API-Key header.

Your unique API key. You can either specify it in this parameter, or set it in X-API-Key header.

Response

Successful Response

latstring required

Latitude of the point, always in the format <float><N/S>, for example 23.5S

lonstring required

Longitude of the point, always in the format <float><E/W>, for example 23.5W

elevationinteger required

Elevation above sea level in metres (for units 'metric', 'uk', 'ca') or feet (for units 'us')

timezonestring

Name of the timezone in format like 'Europe/London'. Available only when the place is specified through place ID.

unitsstring required

Unit system (metric, uk, ca or us)

Example response

{
  "data": [
    {
      "date": "2022-03-30T18:00:00"
    }
  ]
}