---
title: "Hourly weather (including forecasts)"
method: GET
path: "/weather"
---

# Hourly weather (including forecasts)

`GET /weather`

Returns a list of hourly weather records (and/or forecasts) for the time
range given by `date` and `last_date`.

To set the location for which to retrieve records (and/or forecasts), you
must supply both `lat` and `lon` _or_ one of `dwd_station_id`,
`wmo_station_id`, or `source_id`.

## Query parameters

- `date` string, date-time, required — Timestamp of first weather record (or forecast) to retrieve, in ISO 8601 format. May contain time and/or UTC offset.
- `last_date` string, date-time — Timestamp of last weather record (or forecast) to retrieve, in ISO 8601 format. Will default to `date + 1 day`.
- `lat` number — Latitude in decimal degrees.
- `lon` number — Longitude in decimal degrees.
- `max_dist` integer — Maximum distance of record location from the location given by `lat` and `lon`, in meters. Only has an effect when using `lat` and `lon`.
- `dwd_station_id` string[] — DWD station ID, typically five alphanumeric characters. You can supply multiple station IDs separated by commas, ordered from highest to lowest priority.
- `wmo_station_id` string[] — WMO station ID, typically five alphanumeric characters. You can supply multiple station IDs separated by commas, ordered from highest to lowest priority.
- `source_id` integer[] — Bright Sky source ID, as retrieved from the [`/sources` endpoint](/operations/getSources). You can supply multiple source IDs separated by commas, ordered from highest to lowest priority.
- `tz` string — Timezone in which record timestamps will be presented, as <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">tz database name</a>. Will also be used as timezone when parsing `date` and `last_date`, unless these have explicit UTC offsets. If omitted but `date` has an explicit UTC offset, that offset will be used as timezone. Otherwise will default to UTC.
- `units` 'dwd' | 'si' — Physical units in which meteorological parameters will be returned. Set to `si` to use <a href="https://en.wikipedia.org/wiki/International_System_of_Units">SI units</a> (except for precipitation, which is always measured in millimeters). The default `dwd` option uses a set of units that is more common in meteorological applications and civil use: <table> <tr><td></td><td>DWD</td><td>SI</td></tr> <tr><td>Cloud cover</td><td>%</td><td>%</td></tr> <tr><td>Dew point</td><td>°C</td><td>K</td></tr> <tr><td>Precipitation</td><td>mm</td><td><s>kg / m²</s> <strong>mm</strong></td></tr> <tr><td>Precipitation probability</td><td>%</td><td>%</td></tr> <tr><td>Pressure</td><td>hPa</td><td>Pa</td></tr> <tr><td>Relative humidity</td><td>%</td><td>%</td></tr> <tr><td>Solar irradiation</td><td>kWh / m²</td><td>J / m²</td></tr> <tr><td>Sunshine</td><td>min</td><td>s</td></tr> <tr><td>Temperature</td><td>°C</td><td>K</td></tr> <tr><td>Visibility</td><td>m</td><td>m</td></tr> <tr><td>Wind (gust) direction</td><td>°</td><td>°</td></tr> <tr><td>Wind (gust) speed</td><td>km / h</td><td>m / s</td></tr> </table>

## Response `200`

Successful Response

- WeatherResponse
  - `weather` WeatherRecord[]
    - `timestamp` string, date-time — ISO 8601-formatted timestamp of this weather record
    - `source_id` integer — Bright Sky source ID for this record
    - `cloud_cover` number, nullable — Total cloud cover at timestamp
    - `condition` 'dry' | 'fog' | 'rain' | 'sleet' | 'snow' | 'hail' | 'thunderstorm', nullable — Current weather conditions. Unlike the numerical parameters, this field is not taken as-is from the raw data (because it does not exist), but is calculated from different fields in the raw data as a best effort. Not all values are available for all source types.
    - `dew_point` number, nullable — Dew point at timestamp, 2 m above ground
    - `icon` 'clear-day' | 'clear-night' | 'partly-cloudy-day' | 'partly-cloudy-night' | 'cloudy' | 'fog' | 'wind' | 'rain' | 'sleet' | 'snow' | 'hail' | 'thunderstorm', nullable — Icon alias suitable for the current weather conditions. Unlike the numerical parameters, this field is not taken as-is from the raw data (because it does not exist), but is calculated from different fields in the raw data as a best effort. Not all values are available for all source types.
    - `pressure_msl` number, nullable — Atmospheric pressure at timestamp, reduced to mean sea level
    - `relative_humidity` integer, nullable — Relative humidity at timestamp
    - `temperature` number, nullable — Air temperature at timestamp, 2 m above the ground
    - `visibility` integer, nullable — Visibility at timestamp
    - `fallback_source_ids` object — Object mapping meteorological parameters to the source IDs of alternative sources that were used to fill up missing values in the main source
    - `precipitation` number, nullable — Total precipitation during previous 60 minutes
    - `solar` number, nullable — Solar irradiation during previous 60 minutes
    - `sunshine` integer, nullable — Sunshine duration during previous 60 minutes
    - `wind_direction` integer, nullable — Mean wind direction during previous hour, 10 m above the ground
    - `wind_speed` number, nullable — Mean wind speed during previous hour, 10 m above the ground
    - `wind_gust_direction` integer, nullable — Direction of maximum wind gust during previous hour, 10 m above the ground
    - `wind_gust_speed` number, nullable — Speed of maximum wind gust during previous hour, 10 m above the ground
    - `precipitation_probability` integer, nullable — Probability of more than 0.1 mm of precipitation in the previous hour (only available in forecasts)
    - `precipitation_probability_6h` integer, nullable — Probability of more than 0.2 mm of precipitation in the previous 6 hours (only available in forecasts at 0:00, 6:00, 12:00, and 18:00 UTC)
  - `sources` Source[]
    - `id` integer — Bright Sky source ID
    - `dwd_station_id` string, nullable — DWD weather station ID
    - `wmo_station_id` string, nullable — WMO weather station ID
    - `station_name` string, nullable — DWD weather station name
    - `observation_type` 'historical' | 'current' | 'synop' | 'forecast' — Source type
    - `first_record` string, date-time — Timestamp of first available record for this source
    - `last_record` string, date-time — Timestamp of latest available record for this source
    - `lat` number — Station latitude, in decimal degrees
    - `lon` number — Station longitude, in decimal degrees
    - `height` number — Station height, in meters
    - `distance` integer — Distance of weather station to the requested `lat` and `lon` (if given), in meters

## Other responses

- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.dev/brightsky/apis/bright-sky.md) · [All operations](https://skmtc.dev/brightsky/apis/bright-sky/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brightsky/bright-sky/revisions/d9d6acc7794a/schema)
