History

Historical Weather

Returns historical weather data for a given date on or after 1 January 2010. Includes hourly breakdown. Enterprise plan unlocks solar irradiance, wind@100m, pollen history, and evapotranspiration.

get/history.json

Query parameters

keystring required
Example:YOUR_API_KEY

Your WeatherAPI.com API key.

qstring required
Example:London

Location query. Accepts: city name, lat/lon, US zip, UK postcode, Canada postal code, METAR code (metar:EGLL), IATA (iata:DXB), auto:ip, IPv4/IPv6, or location ID (id:2801268).

dtstring date required
Example:2023-01-01

Date on or after 2010-01-01 in yyyy-MM-dd format.

unixdtinteger
Example:1490227200

Unix timestamp equivalent of dt. Do not pass both.

end_dtstring date

End date for range (Pro+ and above). Max 30 days range. yyyy-MM-dd.

unixend_dtinteger

Unix timestamp equivalent of end_dt. Do not pass both.

hourinteger

Restrict output to a specific hour (0–23) in 24-hour format.

aqi'yes' | 'no'

Include Air Quality Index (AQI) data in response.

pollen'yes' | 'no'

Include pollen data. Available on Pro+ and above.

tp15

Interval for data. Use tp=15 for 15-minute intervals (Enterprise only).

langstring
Example:fr

Language code for condition text. E.g.: fr, de, es, zh, ar. See full list in docs.

solar'yes' | 'no'

Include solar irradiance data in History API. Enterprise only.

et0'yes' | 'no'

Include evapotranspiration data. Business and Enterprise only.

wind100mph'yes' | 'no'

Include wind speed at 100m height in mph. Enterprise only.

wind100kph'yes' | 'no'

Include wind speed at 100m height in kph. Enterprise only.

Response

Historical weather data

Changes

No recorded changes to this endpoint across all 1 revision of this API.