Historical Weather

Get the last 10 days of weather history data.

Let’s say, today is December 30, you can get historical data from Dec. 20 to Dec. 29.

We also provide historical weather data for China from 2010 to present, please contact us.

Request URL #

https://datasetapi.qweather.com/v7/historical/weather?[params]

Request parameters #

All parameters are separated by &. If no optional parameters are set, the default value will be used.

location

The location to be queried, only support LocationID and LocationID can be obtained by GeoAPI.

For example: location=101010100

date

Set the date, up to the most recent 10 days. The date format is yyyyMMdd.

For example: date=20200531

key

API authentication key, please refer to How To Get Your Key. Support Signature Authentication.

For example: key=12334567890ABC

lang

Multi-language setting, if data does not match the language you set, it will return results in English or its native language.

unit

Select weather data unit, for unit parameters of all data, please refer Unit

  • m metric unit, default
  • i imperial unit

Response #

// Historical weather data for Beijing
// Business API:  https://api.qweather.com/v7/historical/weather?location=101010100&date=20210204&lang=en&key=YOUR_KEY
// Replace "date=20200725" with the last 10 days

{
  "code": "200",
  "fxLink": "http://hfx.link/2ax6",
  "weatherDaily": {
    "date": "2021-02-04",
    "sunrise": "07:18",
    "sunset": "17:38",
    "moonrise": "00:00",
    "moonset": "11:03",
    "moonPhase": "Waning gibbous",
    "tempMax": "8",
    "tempMin": "-4",
    "humidity": "23",
    "precip": "0.0",
    "pressure": "1029"
  },
  "weatherHourly": [
    {
      "time": "2021-02-04T00:00+08:00",
      "temp": "-1",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "135",
      "windDir": "SE",
      "windScale": "1",
      "windSpeed": "5",
      "humidity": "27",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T01:00+08:00",
      "temp": "-1",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "3",
      "windSpeed": "14",
      "humidity": "27",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T02:00+08:00",
      "temp": "-2",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "12",
      "humidity": "27",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T03:00+08:00",
      "temp": "-2",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "8",
      "humidity": "28",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T04:00+08:00",
      "temp": "-1",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "7",
      "humidity": "26",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T05:00+08:00",
      "temp": "-2",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "9",
      "humidity": "28",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T06:00+08:00",
      "temp": "-2",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "9",
      "humidity": "30",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T07:00+08:00",
      "temp": "-4",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "10",
      "humidity": "33",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T08:00+08:00",
      "temp": "-2",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "7",
      "humidity": "32",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T09:00+08:00",
      "temp": "1",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "14",
      "humidity": "27",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T10:00+08:00",
      "temp": "3",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "10",
      "humidity": "23",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T11:00+08:00",
      "temp": "3",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "270",
      "windDir": "W",
      "windScale": "2",
      "windSpeed": "10",
      "humidity": "22",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T12:00+08:00",
      "temp": "4",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "16",
      "humidity": "20",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T13:00+08:00",
      "temp": "7",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "16",
      "humidity": "16",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T14:00+08:00",
      "temp": "8",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "16",
      "humidity": "15",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T15:00+08:00",
      "temp": "8",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "15",
      "humidity": "13",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T16:00+08:00",
      "temp": "8",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "19",
      "humidity": "13",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T17:00+08:00",
      "temp": "8",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "3",
      "windSpeed": "18",
      "humidity": "14",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T18:00+08:00",
      "temp": "7",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "7",
      "humidity": "16",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T19:00+08:00",
      "temp": "5",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "10",
      "humidity": "18",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T20:00+08:00",
      "temp": "4",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "8",
      "humidity": "20",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T21:00+08:00",
      "temp": "3",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "225",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "9",
      "humidity": "21",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T22:00+08:00",
      "temp": "1",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "45",
      "windDir": "NE",
      "windScale": "1",
      "windSpeed": "3",
      "humidity": "27",
      "pressure": "1029"
    },
    {
      "time": "2021-02-04T23:00+08:00",
      "temp": "-1",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "270",
      "windDir": "W",
      "windScale": "1",
      "windSpeed": "3",
      "humidity": "33",
      "pressure": "1029"
    }
  ],
  "refer": {
    "sources": [
      "qweather.com"
    ],
    "license": [
      "commercial license"
    ]
  }
}
Parameters Description
code

API status code, please refer to Status Code

fxLink

Responsive web page of this data, for embedded in website or APP

weatherDaily.date

Date

weatherDaily.sunrise

Sunrise time

weatherDaily.sunset

Sunset time

weatherDaily.moonrise

Moonrise time

weatherDaily.moonset

Moonset time

weatherDaily.moonPhase

Moon phase name

weatherDaily.tempMax

The highest temperature of the day

weatherDaily.tempMin

The lowest temperature of the day

weatherDaily.precip

Estimated total precipitation for the day

weatherHourly.time

Time of the day

weatherHourly.temp

Hourly temperature

weatherHourly.icon

Icon code of weather conditions, free to download weather icons

weatherHourly.text

Hourly weather condition

weatherHourly.wind360

Hourly wind direction in azimuth degree

weatherHourly.windDir

Hourly wind direction

weatherHourly.windScale

Hourly wind scale

weatherHourly.windSpeed

Hourly wind speed, KM/H

weatherHourly.humidity

Hourly relative humidity in percent

weatherHourly.precip

Hourly accumulated precipitation

weatherHourly.pressure

Atmospheric pressure, hPa

refer.sources

Data source and other statements, may be null

refer.license

Data license, may be null