Air Quality Daily Forecast

Platform: API iOS Android

Air Quality Daily Forecast API for Chinese cities, including AQI, air quality levels, primary pollutants.

Note: Air Quality API v1 (new) is now available, please try to use and upgrade.

Request URL

https://api.qweather.com/v7/air/5d

For Free subscription, change the API Host to devapi.qweather.com. See data available for Free subscription.

Request Parameters

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

  • location(required)The location to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI. Example: location=101010100 or location=116.41,39.92
  • langMulti-language setting, please see Language to find out how our multi-language works and how to set up.

Request Example

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://api.qweather.com/v7/air/5d?location=101010100'

Replace your_token with your JWT or learn more about Authentication

Response

The response is in JSON format and is Gzip compressed.

{
  "code": "200",
  "updateTime": "2021-02-16T10:42+08:00",
  "fxLink": "http://hfx.link/2ax4",
  "daily": [
    {
      "fxDate": "2021-02-16",
      "aqi": "46",
      "level": "1",
      "category": "优",
      "primary": "NA"
    },
    {
      "fxDate": "2021-02-17",
      "aqi": "47",
      "level": "1",
      "category": "优",
      "primary": "NA"
    },
    {
      "fxDate": "2021-02-18",
      "aqi": "67",
      "level": "2",
      "category": "良",
      "primary": "PM2.5"
    },
    {
      "fxDate": "2021-02-19",
      "aqi": "101",
      "level": "3",
      "category": "轻度污染",
      "primary": "PM2.5"
    },
    {
      "fxDate": "2021-02-20",
      "aqi": "120",
      "level": "3",
      "category": "轻度污染",
      "primary": "PM2.5"
    }
  ],
  "refer": {
    "sources": [
      "cnemc"
    ],
    "license": [
      "QWeather Developers License"
    ]
  }
}
  • code See Status Code
  • updateTime API last update time
  • fxLink Responsive web page of this data, for embedded in website or APP
  • daily.fxDate Forecast date
  • daily.aqi Air Quality Index
  • daily.level AQI level
  • daily.category AQI category
  • daily.primary The main pollutant. If level=1, return NA
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null

Air Quality Index Level

See Air Quality Info.