Historical Air Quality

Get the last 10 days of air quality history data.

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

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

Request URL #

https://datasetapi.qweather.com/v7/historical/air?[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.

Response #

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

{
  "code": "200",
  "fxLink": "http://hfx.link/2ax6",
  "airHourly": [
    {
      "pubTime": "2021-02-04T00:00+08:00",
      "aqi": "21",
      "level": "1",
      "category": "Excellent",
      "primary": "NA",
      "pm10": "21",
      "pm2p5": "7",
      "no2": "19",
      "so2": "3",
      "co": "0.3",
      "o3": "52"
    },
    {
      "pubTime": "2021-02-04T01:00+08:00",
      "aqi": "23",
      "level": "1",
      "category": "Excellent",
      "primary": "NA",
      "pm10": "23",
      "pm2p5": "8",
      "no2": "21",
      "so2": "3",
      "co": "0.4",
      "o3": "46"
    },
    {
      "pubTime": "2021-02-04T02:00+08:00",
      "aqi": "36",
      "level": "1",
      "category": "Excellent",
      "primary": "NA",
      "pm10": "36",
      "pm2p5": "16",
      "no2": "27",
      "so2": "3",
      "co": "0.5",
      "o3": "35"
    },
    {
      "pubTime": "2021-02-04T03:00+08:00",
      "aqi": "47",
      "level": "1",
      "category": "Excellent",
      "primary": "NA",
      "pm10": "47",
      "pm2p5": "21",
      "no2": "29",
      "so2": "3",
      "co": "0.4",
      "o3": "31"
    },
    {
      "pubTime": "2021-02-04T04:00+08:00",
      "aqi": "51",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "51",
      "pm2p5": "24",
      "no2": "32",
      "so2": "4",
      "co": "0.5",
      "o3": "26"
    },
    {
      "pubTime": "2021-02-04T05:00+08:00",
      "aqi": "51",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "52",
      "pm2p5": "26",
      "no2": "33",
      "so2": "4",
      "co": "0.5",
      "o3": "25"
    },
    {
      "pubTime": "2021-02-04T06:00+08:00",
      "aqi": "52",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "53",
      "pm2p5": "27",
      "no2": "34",
      "so2": "3",
      "co": "0.6",
      "o3": "22"
    },
    {
      "pubTime": "2021-02-04T07:00+08:00",
      "aqi": "53",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "56",
      "pm2p5": "29",
      "no2": "38",
      "so2": "3",
      "co": "0.6",
      "o3": "18"
    },
    {
      "pubTime": "2021-02-04T08:00+08:00",
      "aqi": "55",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "59",
      "pm2p5": "29",
      "no2": "40",
      "so2": "3",
      "co": "0.7",
      "o3": "15"
    },
    {
      "pubTime": "2021-02-04T09:00+08:00",
      "aqi": "57",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "64",
      "pm2p5": "32",
      "no2": "36",
      "so2": "4",
      "co": "0.8",
      "o3": "22"
    },
    {
      "pubTime": "2021-02-04T10:00+08:00",
      "aqi": "59",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "68",
      "pm2p5": "35",
      "no2": "33",
      "so2": "4",
      "co": "0.7",
      "o3": "30"
    },
    {
      "pubTime": "2021-02-04T11:00+08:00",
      "aqi": "64",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "78",
      "pm2p5": "41",
      "no2": "32",
      "so2": "6",
      "co": "0.7",
      "o3": "41"
    },
    {
      "pubTime": "2021-02-04T12:00+08:00",
      "aqi": "59",
      "level": "2",
      "category": "Good",
      "primary": "PM2.5",
      "pm10": "66",
      "pm2p5": "42",
      "no2": "29",
      "so2": "7",
      "co": "0.7",
      "o3": "48"
    },
    {
      "pubTime": "2021-02-04T13:00+08:00",
      "aqi": "59",
      "level": "2",
      "category": "Good",
      "primary": "PM2.5",
      "pm10": "65",
      "pm2p5": "42",
      "no2": "29",
      "so2": "7",
      "co": "0.6",
      "o3": "55"
    },
    {
      "pubTime": "2021-02-04T14:00+08:00",
      "aqi": "56",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "61",
      "pm2p5": "39",
      "no2": "26",
      "so2": "6",
      "co": "0.6",
      "o3": "62"
    },
    {
      "pubTime": "2021-02-04T15:00+08:00",
      "aqi": "52",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "54",
      "pm2p5": "32",
      "no2": "24",
      "so2": "5",
      "co": "0.5",
      "o3": "63"
    },
    {
      "pubTime": "2021-02-04T16:00+08:00",
      "aqi": "49",
      "level": "1",
      "category": "Excellent",
      "primary": "NA",
      "pm10": "45",
      "pm2p5": "34",
      "no2": "25",
      "so2": "5",
      "co": "0.5",
      "o3": "65"
    },
    {
      "pubTime": "2021-02-04T17:00+08:00",
      "aqi": "57",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "63",
      "pm2p5": "39",
      "no2": "27",
      "so2": "6",
      "co": "0.6",
      "o3": "64"
    },
    {
      "pubTime": "2021-02-04T18:00+08:00",
      "aqi": "64",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "77",
      "pm2p5": "44",
      "no2": "38",
      "so2": "6",
      "co": "0.7",
      "o3": "49"
    },
    {
      "pubTime": "2021-02-04T19:00+08:00",
      "aqi": "67",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "84",
      "pm2p5": "47",
      "no2": "46",
      "so2": "7",
      "co": "0.8",
      "o3": "36"
    },
    {
      "pubTime": "2021-02-04T20:00+08:00",
      "aqi": "68",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "85",
      "pm2p5": "48",
      "no2": "50",
      "so2": "6",
      "co": "0.8",
      "o3": "28"
    },
    {
      "pubTime": "2021-02-04T21:00+08:00",
      "aqi": "66",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "81",
      "pm2p5": "47",
      "no2": "49",
      "so2": "6",
      "co": "0.8",
      "o3": "23"
    },
    {
      "pubTime": "2021-02-04T22:00+08:00",
      "aqi": "68",
      "level": "2",
      "category": "Good",
      "primary": "PM2.5",
      "pm10": "80",
      "pm2p5": "49",
      "no2": "50",
      "so2": "6",
      "co": "0.8",
      "o3": "19"
    },
    {
      "pubTime": "2021-02-04T23:00+08:00",
      "aqi": "68",
      "level": "2",
      "category": "Good",
      "primary": "PM2.5",
      "pm10": "78",
      "pm2p5": "49",
      "no2": "51",
      "so2": "5",
      "co": "0.8",
      "o3": "16"
    }
  ],
  "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

airHourly.pubTime

The data release time from the data source

airHourly.aqi

Air Quality Index

airHourly.level

AQI level

airHourly.category

AQI category

airHourly.primary

The main pollutant. If level=1, return NA

airHourly.pm10

PM10

airHourly.pm2p5

PM2.5

airHourly.no2

Nitrogen dioxide

airHourly.so2

Sulfur dioxide

airHourly.co

Carbon monoxide

airHourly.o3

Ozone

refer.sources

Data source and other statements, may be null

refer.license

Data license, may be null