---
title: "Returns weather data for a single location and given day in the past"
method: GET
path: "/time_machine"
tags: ["Time machine - historical weather"]
---

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

`GET /time_machine`

## 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.*

## Query parameters

- `place_id` string — 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).
- `lat` string — Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4
- `lon` string — Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4
- `date` string, date, required — The day of the data in the past. Specify in `YYYY-MM-DD` format, e.g. `2021-08-24`.
- `timezone` string — 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](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
- `units` 'auto' | 'metric' | 'us' | 'uk' | 'ca'
- `language` 'cs' | 'en' | 'de' | 'es' | 'fr' | 'pl' | 'pt'
- `key` string — Your unique API key. You can either specify it in this parameter, or set it in `X-API-Key` header.

## Response `200`

Successful Response

- TimeMachineTimeMachine
  - `lat` string, required — Latitude of the point, always in the format <float><N/S>, for example ``23.5S``
  - `lon` string, required — Longitude of the point, always in the format <float><E/W>, for example ``23.5W``
  - `elevation` integer, required — Elevation above sea level in metres (for units 'metric', 'uk', 'ca') or feet (for units 'us')
  - `timezone` string — Name of the timezone in format like 'Europe/London'. Available only when the place is specified through place ID.
  - `units` string, required — Unit system (metric, uk, ca or us)
  - `data` TimeMachineTimeMachineHourlyData[], required
    - `date` string, date-time — Datetime in YYYY-MM-DDTHH:MM:SS format.
    - `weather` string — String identifier of the weather icon, e.g. `light_rain`.
    - `summary` string — Short text summary of the weather, e.g. `Light rain`.
    - `icon` integer — Numeric identifier of the weather icon. The following values can appear: * 1 - Not available * 2 - Sunny * 3 - Mostly sunny * 4 - Partly sunny * 5 - Mostly cloudy * 6 - Cloudy * 7 - Overcast * 8 - Overcast with low clouds * 9 - Fog * 10 - Light rain * 11 - Rain * 12 - Possible rain * 13 - Rain shower * 14 - Thunderstorm * 15 - Local thunderstorms * 16 - Light snow * 17 - Snow * 18 - Possible snow * 19 - Snow shower * 20 - Rain and snow * 21 - Possible rain and snow * 22 - Rain and snow * 23 - Freezing rain * 24 - Possible freezing rain * 25 - Hail * 26 - Clear (night) * 27 - Mostly clear (night) * 28 - Partly clear (night) * 29 - Mostly cloudy (night) * 30 - Cloudy (night) * 31 - Overcast with low clouds (night) * 32 - Rain shower (night) * 33 - Local thunderstorms (night) * 34 - Snow shower (night) * 35 - Rain and snow (night) * 36 - Possible freezing rain (night) Unit: N/A
    - `temperature` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `feels_like` number — Feels like temperature. Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind_chill` number — Windchill temperature. Units: metric = °C, us = °F, uk = °C, ca = °C
    - `soil_temperature` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `dew_point` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `surface_temperature` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind` TimeMachineTimeMachineWindData, required
      - `speed` integer — Wind speed 10 metres above the ground. Units: metric = m/s, us = mph, uk = mph, ca = km/h
      - `gusts` integer — Wind gust speed. Units: metric = m/s, us = mph, uk = mph, ca = km/h
      - `angle` integer — Wind direction in `N`, `NNE`, `NE`, ..., `NNW` format. Unit: deg
      - `dir` string, binary — Wind direction in `N`, `NNE`, `NE`, ..., `NNW` format. Unit: 16dir
    - `cloud_cover` TimeMachineTimeMachineCloudCoverData, required
      - `total` integer — Percentage of sky covered by clouds. Unit: %
      - `low` integer — Percentage of sky covered by low clouds. Unit: %
      - `middle` integer — Percentage of sky covered by middle clouds. Unit: %
      - `high` integer — Percentage of sky covered by high clouds. Unit: %
    - `pressure` number — Atmospheric pressure at mean sea level. Units: metric = hPa, us = Hg, uk = hPa, ca = kPa
    - `precipitation` TimeMachineTimeMachinePrecipitationData, required
      - `total` number — Total precipitation amount accumulated since last hour. Units: metric = mm/h, us = inches per hour, uk = mm/h, ca = mm/h
      - `type` string, binary — Precipitation type, may be one of: * `none`, it there is no precipitation * `rain` * `snow` * `rain_snow` * `ice pellets` * `frozen rain` Unit: precipitation type
    - `cape` integer — Convective available potential energy. Unit: J/kg
    - `evaporation` integer — Evaporation of liquid water into water vapor. Unit: mm/h
    - `irradiance` integer — Global downward short-wave radiation flux. Unit: W/m2
    - `ozone` integer — Total column of ozone. Unit: Dobson
    - `humidity` integer — Relative humidity. Unit: \%
  - `daily` TimeMachineModel6, required
    - `temperature` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `temperature_min` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `temperature_max` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `feels_like` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `feels_like_min` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `feels_like_max` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind_chill` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind_chill_min` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind_chill_max` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `soil_temperature` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `soil_temperature_min` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `soil_temperature_max` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `dew_point` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `dew_point_min` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `dew_point_max` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `surface_temperature` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `surface_temperature_min` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `surface_temperature_max` number — Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind` TimeMachineModel7, required
      - `speed` number — Units: metric = m/s, us = mph, uk = mph, ca = km/h
      - `gusts` number — Units: metric = m/s, us = mph, uk = mph, ca = km/h
      - `dir` string, binary — All day wind direction in `N`, `NNE`, `NE`, ..., `NNW` format. Unit: 16dir
      - `angle` number
    - `cloud_cover` TimeMachineModel8, required
      - `total` number — Unit: %
      - `low` number — Unit: %
      - `middle` number — Unit: %
      - `high` number — Unit: %
    - `pressure` number — Units: metric = hPa, us = Hg, uk = hPa, ca = kPa
    - `precipitation` TimeMachineModel9, required
      - `total` number — Units: metric = mm/h, us = inches per hour, uk = mm/h, ca = mm/h
      - `type` string, binary
    - `humidity` number — Unit: \%
  - `statistics` TimeMachinePointDailyStatsData, required
    - `temperature` TimeMachinePointDailyStatsTemperatureData, required
      - `avg` number — Long-term temperature average. Units: metric = °C, us = °F, uk = °C, ca = °C
      - `avg_min` number — Long-term daily minimum temperature average. Units: metric = °C, us = °F, uk = °C, ca = °C
      - `avg_max` number — Long-term daily maximum temperature average. Units: metric = °C, us = °F, uk = °C, ca = °C
      - `record_min` number — Historical daily minimum temperature. Units: metric = °C, us = °F, uk = °C, ca = °C
      - `record_max` number — Historical daily maximum. Units: metric = °C, us = °F, uk = °C, ca = °C
    - `wind` TimeMachinePointDailyStatsWindData, required
      - `avg_speed` number — Long-term average wind speed. Units: metric = m/s, us = mph, uk = mph, ca = km/h
      - `avg_angle` number — Long-term average wind angle. Unit: deg
      - `avg_dir` string, binary — Long-term average wind direction in 'N', 'NNE', 'NE', ... 'NNW' format. Unit: 16dir
      - `max_speed` number — Historical daily maximum wind speed. Units: metric = m/s, us = mph, uk = mph, ca = km/h
      - `max_gust` number — Historical daily maximum wind gust speed. Units: metric = m/s, us = mph, uk = mph, ca = km/h
    - `precipitation` TimeMachinePointDailyStatsPrecipitationData, required
      - `avg` number — Long-term average daily precipitation amount. Units: metric = mm/day, us = inches per day, uk = mm/day, ca = mm/day
      - `probability` integer — Long-term average precipitation probability. Unit: \%

## Other responses

- `400` — Error in passed parameter.
- `402` — Maximum requests per day limit exceeded.
- `403` — API key not not specified or invalid.
- `422` — Validation Error
- `429` — Maximum requests per minute limit exceeded.

---

[API](https://skmtc.dev/meteosource/apis/interactive-documentation-for-your-premium-plan.md) · [All operations](https://skmtc.dev/meteosource/apis/interactive-documentation-for-your-premium-plan/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/meteosource/interactive-documentation-for-your-premium-plan/revisions/639d912e4ae5/schema)
