Real-time Air Quality (beta)

Platform: API

Global air quality real-time data, we provide AQI and pollutant concentration based on the local standard of each country or region, you can check the current hourly real-time data of the city or monitoring station.

Note: New Air Quality v1 is currently in beta and there is no charge for standard subscriptions at this time. Data may vary when the official release.

Hint: It is recommended to read the Air Quality Info for details on index types, pollutants, supported countries, etc.

Request URL

https://api.qweather.com/airquality/v1/now/{LocationID}?{QueryParams}

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

Path Parameters

  • LocationID(required)LocationID of the desired city, LocationID can be obtained by GeoAPI. For example 101010100

Query Parameters

Request Example

Real-time air quality for Shanghai

curl -L -X GET --compressed 'https://api.qweather.com/airquality/v1/now/101020100?key=YOUR_KEY'

Response

The response is in JSON format and is Gzip compressed.

{
  "code": "200",
  "updateTime": "2023-07-14T21:20+08:00",
  "fxLink": "https://www.qweather.com/air/shanghai-101020100.html",
  "aqi": [
    {
      "code": "cn-mee-1h",
      "name": "AQI-1h (CN)",
      "value": "53",
      "level": "2",
      "category": "良",
      "color": "255,255,0",
      "primaryPollutant": {
        "code": "pm2p5",
        "name": "PM 2.5",
        "fullName": "颗粒物(粒径小于等于2.5µm)"
      }
    },
    {
      "code": "cn-mee",
      "name": "AQI (CN)",
      "value": "79",
      "level": "2",
      "category": "良",
      "color": "255,255,0",
      "primaryPollutant": {
        "code": "pm2p5",
        "name": "PM 2.5",
        "fullName": "颗粒物(粒径小于等于2.5µm)"
      }
    }
  ],
  "pollutant": [
    {
      "code": "pm2p5",
      "name": "PM 2.5",
      "fullName": "颗粒物(粒径小于等于2.5µm)",
      "concentration": {
        "value": "37",
        "unit": "μg/m3"
      },
      "subIndex": {
        "value": "53",
        "category": "良"
      }
    },
    {
      "code": "pm10",
      "name": "PM 10",
      "fullName": "颗粒物(粒径小于等于10µm)",
      "concentration": {
        "value": "54",
        "unit": "μg/m3"
      },
      "subIndex": {
        "value": "53",
        "category": "良"
      }
    },
    {
      "code": "no2",
      "name": "NO2",
      "fullName": "二氧化氮",
      "concentration": {
        "value": "62",
        "unit": "μg/m3"
      },
      "subIndex": {
        "value": "32",
        "category": "优"
      }
    },
    {
      "code": "o3",
      "name": "O3",
      "fullName": "臭氧",
      "concentration": {
        "value": "26",
        "unit": "μg/m3"
      },
      "subIndex": {
        "value": "9",
        "category": "优"
      }
    },
    {
      "code": "so2",
      "name": "SO2",
      "fullName": "二氧化硫",
      "concentration": {
        "value": "5",
        "unit": "μg/m3"
      },
      "subIndex": {
        "value": "2",
        "category": "优"
      }
    },
    {
      "code": "co",
      "name": "CO",
      "fullName": "一氧化碳",
      "concentration": {
        "value": "0.6",
        "unit": "mg/m3"
      },
      "subIndex": {
        "value": "7",
        "category": "优"
      }
    }
  ],
  "station": [
    {
      "id": "P5697",
      "name": "普陀"
    },
    {
      "id": "P54852",
      "name": "十五厂"
    },
    {
      "id": "P57823",
      "name": "虹口"
    },
    {
      "id": "P55605",
      "name": "徐汇上师大"
    },
    {
      "id": "P53057",
      "name": "杨浦四漂"
    },
    {
      "id": "P5663",
      "name": "静安监测站"
    },
    {
      "id": "P53991",
      "name": "浦东川沙"
    },
    {
      "id": "P53763",
      "name": "浦东新区监测站"
    },
    {
      "id": "P5659",
      "name": "浦东张江"
    },
    {
      "id": "P54024",
      "name": "宝山庙行"
    },
    {
      "id": "P59043",
      "name": "嘉定南翔"
    },
    {
      "id": "P5991",
      "name": "金山新城"
    },
    {
      "id": "P56226",
      "name": "闵行浦江"
    },
    {
      "id": "P56748",
      "name": "青浦徐泾"
    },
    {
      "id": "P56697",
      "name": "松江图书馆"
    },
    {
      "id": "P56700",
      "name": "长宁仙霞"
    },
    {
      "id": "P52014",
      "name": "浦东惠南"
    },
    {
      "id": "P51966",
      "name": "奉贤南桥新城"
    }
  ],
  "source": [
    "中国环境监测总站 (CNEMC)。1小时实时数据仅供参考,未经过完整的审核程序进行修订和确认。"
  ]
}
  • code See Status Code
  • updateTime API last update time
  • fxLink Responsive web page of this data, for embedded in website or APP
  • aqi.code Code of air quality index
  • aqi.name Name of air quality index
  • aqi.value Value of air quality index
  • aqi.level Level of air quality index
  • aqi.category Category of air quality index
  • aqi.color RGB color for AQI
  • aqi.primaryPollutant.code The primary pollutant code, maybe NULL.
  • aqi.primaryPollutant.name Name of primary pollutant, maybe NULL.
  • aqi.primaryPollutant.fullName Full name of primary pollutant, maybe NULL.
  • pollutant.code The pollutant code.
  • pollutant.name Name of pollutant.
  • pollutant.fullName Full name of pollutant.
  • pollutant.concentration.value Concentration values of pollutants.
  • pollutant.concentration.unit Units for concentration values of pollutants.
  • pollutant.subIndex.value Sub-index for pollutant, maybe NULL.
  • pollutant.subIndex.level Sub-index level for pollutant, maybe NULL.
  • pollutant.subIndex.category Sub-index category for pollutant, maybe NULL.
  • station.id Location ID of the monitoring station for this AQI reference, maybe NULL.
  • station.name Name of the monitoring station for this AQI reference, maybe NULL.
  • source Data source or provider name and their declaration, which must be displayed with the air quality data. May be NULL