Real-time Air Quality

Real-time Air Quality API for Chinese cities and 1,700 monitoring stations, including AQI, air quality levels, primary pollutants, PM10, PM2.5, ozone, and nitrogen dioxide , sulfur dioxide, carbon monoxide values.

Request URL #

  • Prohttps://api.qweather.com/v7/air/now?[params]
  • Devhttps://devapi.qweather.com/v7/air/now?[params]

Request Parameters #

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

key

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

For example: key=12334567890ABC

location

The location to be queried, support LocationID or comma-separated longitude and latitude, LocationID can be obtained by GeoAPI.

For example: location=101010100 or location=116.41,39.92

lang

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

gzip

Enable Gzip can greatly reduce the latency of API access, save network traffic.

  • y enable gzip, default
  • n disable gzip

Response #

// Beijing real-time air quality 
// Business API: https://api.qweather.com/v7/air/now?location=101010100&lang=en&key=YOUR_KEY
// Dev API: https://devapi.qweather.com/v7/air/now?location=101010100&lang=en&key=YOUR_KEY

{
  "code": "200",
  "updateTime": "2021-02-06T16:33+08:00",
  "fxLink": "http://hfx.link/2ax4",
  "now": {
    "pubTime": "2021-02-06T16:00+08:00",
    "aqi": "83",
    "level": "2",
    "category": "Good",
    "primary": "PM10",
    "pm10": "115",
    "pm2p5": "28",
    "no2": "9",
    "so2": "3",
    "co": "0.2",
    "o3": "88"
  },
  "station": [
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "密云镇",
      "id": "CNA3697",
      "aqi": "63",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "75",
      "pm2p5": "18",
      "no2": "8",
      "so2": "3",
      "co": "0.2",
      "o3": "84"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "丰台小屯",
      "id": "CNA3696",
      "aqi": "97",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "143",
      "pm2p5": "33",
      "no2": "12",
      "so2": "2",
      "co": "0.2",
      "o3": "90"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "怀柔新城",
      "id": "CNA3695",
      "aqi": "73",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "95",
      "pm2p5": "24",
      "no2": "2",
      "so2": "2",
      "co": "0.3",
      "o3": "92"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "延庆石河营",
      "id": "CNA3694",
      "aqi": "91",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "131",
      "pm2p5": "34",
      "no2": "6",
      "so2": "7",
      "co": "0.4",
      "o3": "94"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "大兴旧宫",
      "id": "CNA3675",
      "aqi": "96",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "142",
      "pm2p5": "28",
      "no2": "7",
      "so2": "1",
      "co": "0.3",
      "o3": "88"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "房山燕山",
      "id": "CNA3674",
      "aqi": "96",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "141",
      "pm2p5": "29",
      "no2": "11",
      "so2": "2",
      "co": "0.1",
      "o3": "92"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "通州东关",
      "id": "CNA3673",
      "aqi": "81",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "112",
      "pm2p5": "20",
      "no2": "15",
      "so2": "2",
      "co": "0.1",
      "o3": "77"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "丰台云岗",
      "id": "CNA3672",
      "aqi": "97",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "144",
      "pm2p5": "33",
      "no2": "7",
      "so2": "2",
      "co": "0.3",
      "o3": "98"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "门头沟三家店",
      "id": "CNA3671",
      "aqi": "94",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "138",
      "pm2p5": "32",
      "no2": "12",
      "so2": "2",
      "co": "0.3",
      "o3": "89"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "密云新城",
      "id": "CNA3418",
      "aqi": "64",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "78",
      "pm2p5": "15",
      "no2": "11",
      "so2": "3",
      "co": "0.2",
      "o3": "82"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "平谷新城",
      "id": "CNA3417",
      "aqi": "54",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "58",
      "pm2p5": "16",
      "no2": "8",
      "so2": "2",
      "co": "0.1",
      "o3": "91"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "延庆夏都",
      "id": "CNA3281",
      "aqi": "95",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "140",
      "pm2p5": "34",
      "no2": "6",
      "so2": "7",
      "co": "0.4",
      "o3": "93"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "古城",
      "id": "CNA1012",
      "aqi": "90",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "129",
      "pm2p5": "33",
      "no2": "8",
      "so2": "1",
      "co": "0.3",
      "o3": "85"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "奥体中心",
      "id": "CNA1011",
      "aqi": "76",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "102",
      "pm2p5": "33",
      "no2": "14",
      "so2": "1",
      "co": "0.0",
      "o3": "88"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "昌平镇",
      "id": "CNA1010",
      "aqi": "95",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "139",
      "pm2p5": "38",
      "no2": "9",
      "so2": "7",
      "co": "0.3",
      "o3": "85"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "怀柔镇",
      "id": "CNA1009",
      "aqi": "71",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "92",
      "pm2p5": "25",
      "no2": "6",
      "so2": "2",
      "co": "0.3",
      "o3": "92"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "顺义新城",
      "id": "CNA1008",
      "aqi": "82",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "114",
      "pm2p5": "37",
      "no2": "8",
      "so2": "3",
      "co": "0.1",
      "o3": "85"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "海淀区万柳",
      "id": "CNA1007",
      "aqi": "80",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "110",
      "pm2p5": "32",
      "no2": "19",
      "so2": "2",
      "co": "0.3",
      "o3": "81"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "官园",
      "id": "CNA1006",
      "aqi": "84",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "117",
      "pm2p5": "27",
      "no2": "10",
      "so2": "1",
      "co": "0.2",
      "o3": "89"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "农展馆",
      "id": "CNA1005",
      "aqi": "83",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "115",
      "pm2p5": "24",
      "no2": "8",
      "so2": "4",
      "co": "0.3",
      "o3": "95"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "天坛",
      "id": "CNA1004",
      "aqi": "78",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "106",
      "pm2p5": "28",
      "no2": "10",
      "so2": "2",
      "co": "0.3",
      "o3": "91"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "东四",
      "id": "CNA1003",
      "aqi": "82",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "114",
      "pm2p5": "29",
      "no2": "11",
      "so2": "3",
      "co": "0.2",
      "o3": "83"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "定陵",
      "id": "CNA1002",
      "aqi": "92",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "133",
      "pm2p5": "41",
      "no2": "1",
      "so2": "4",
      "co": "0.3",
      "o3": "89"
    },
    {
      "pubTime": "2021-02-06T16:00+08:00",
      "name": "万寿西宫",
      "id": "CNA1001",
      "aqi": "81",
      "level": "2",
      "category": "Good",
      "primary": "PM10",
      "pm10": "112",
      "pm2p5": "27",
      "no2": "10",
      "so2": "2",
      "co": "0.3",
      "o3": "84"
    }
  ],
  "refer": {
    "sources": [
      "cnemc"
    ],
    "license": [
      "commercial license"
    ]
  }
}
Parameters Description
code

API status code, please refer to Status Code

updateTime

API last update time

fxLink

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

now.pubTime

The data release time from the data source

now.aqi

Air Quality Index

now.level

AQI level

now.category

AQI category

now.primary

The main pollutant. If level=1, return NA

now.pm10

PM10

now.pm2p5

PM2.5

now.no2

Nitrogen dioxide

now.so2

Sulfur dioxide

now.co

Carbon monoxide

now.o3

Ozone

station.name

The name of the monitoring station

station.id

ID of the monitoring station

station.pubTime

The data release time from the data source

station.aqi

Air Quality Index

station.level

AQI level

station.category

AQI category

station.primary

The main pollutant. If level=1, return NA

station.pm10

PM10

station.pm2p5

PM2.5

station.no2

Nitrogen dioxide

station.so2

Sulfur dioxide

station.co

Carbon monoxide

station.o3

Ozone

refer.sources

Data source and other statements, may be null

refer.license

Data license, may be null

station is returned only in prefecture-level cities where air quality monitoring stations exist

Air Quality Index Level #

AQI Level Category Category Color
0-50 Level 1 Excellent Green
51-100 Level 2 Good Yellow
101-150 Level 3 Lightly Pollution Orange
151-200 Level 4 Moderate pollution Red
201-300 Level 5 Heavy pollution Purple
>300 Level 6 Serious pollution Maroon