实时空气质量(beta)
全球空气质量实时数据,我们提供了基于各个国家或地区当地规则的AQI以及污染物浓度值,你可以查询指定城市的当前小时实时数据。
注意:全新的实时空气质量目前处于beta阶段,标准订阅暂不收取费用。数据内容在正式发布后可能会有所不同。查看当前版本的发行公告。
提示:推荐阅读空气质量信息文档,以便了解指数类型、污染物、支持的国家等信息。
请求URL
https://api.qweather.com/airquality/v1/now/{LocationID}?{查询参数}
如果是免费订阅,将上述API Host更改为devapi.qweather.com
。参考免费订阅可用的数据。
路径参数
-
LocationID
(必选)所需查询城市的LocationID,LocationID可通过GeoAPI获取。例如101010100
查询参数
请求示例
上海实时空气质量
返回数据
返回数据是JSON格式并进行了Gzip压缩。
{
"code": "200",
"updateTime": "2023-02-11T10:20+08:00",
"aqi": [
{
"code": "cn-mee-1h",
"name": "AQI-1H (CN)",
"defaultLocalAqi": true,
"value": 37,
"valueDisplay": "37",
"level": "1",
"category": "优",
"color": "0,228,0",
"health": {
"effect": "空气质量令人满意,基本无空气污染。",
"advice": {
"generalPopulation": "各类人群可正常活动。",
"sensitivePopulation": "各类人群可正常活动。"
}
}
},
{
"code": "cn-mee",
"name": "AQI (CN)",
"defaultLocalAqi": false,
"value": 55,
"valueDisplay": "55",
"level": "2",
"category": "良",
"color": "255,255,0",
"primaryPollutant": {
"code": "pm10",
"name": "PM 10",
"fullName": "颗粒物(粒径小于等于10µm)"
},
"health": {
"effect": "空气质量可接受,但某些污染物可能对极少数异常敏感人群健康有较弱影响。",
"advice": {
"generalPopulation": "一般人群可正常活动。",
"sensitivePopulation": "极少数异常敏感人群应减少户外活动。"
}
}
}
],
"pollutant": [
{
"code": "pm2p5",
"name": "PM 2.5",
"fullName": "颗粒物(粒径小于等于2.5µm)",
"concentration": {
"value": 25.0,
"unit": "μg/m3"
},
"subIndex": {
"value": 37,
"valueDisplay": "37"
}
},
{
"code": "pm10",
"name": "PM 10",
"fullName": "颗粒物(粒径小于等于10µm)",
"concentration": {
"value": 36.0,
"unit": "μg/m3"
},
"subIndex": {
"value": 37,
"valueDisplay": "37"
}
},
{
"code": "no2",
"name": "NO2",
"fullName": "二氧化氮",
"concentration": {
"value": 41.0,
"unit": "μg/m3"
},
"subIndex": {
"value": 21,
"valueDisplay": "21"
}
},
{
"code": "o3",
"name": "O3",
"fullName": "臭氧",
"concentration": {
"value": 49.0,
"unit": "μg/m3"
},
"subIndex": {
"value": 16,
"valueDisplay": "16"
}
},
{
"code": "so2",
"name": "SO2",
"fullName": "二氧化硫",
"concentration": {
"value": 6.0,
"unit": "μg/m3"
},
"subIndex": {
"value": 3,
"valueDisplay": "3"
}
},
{
"code": "co",
"name": "CO",
"fullName": "一氧化碳",
"concentration": {
"value": 0.5,
"unit": "mg/m3"
},
"subIndex": {
"value": 6,
"valueDisplay": "6"
}
}
],
"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": "P51755",
"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)。数据仅为当天参考值,未经过完整的审核程序进行修订和确认,不适用评价达标状况或任何正式评估。"
]
}
-
code
请参考状态码 -
updateTime
当前API的最近更新时间 -
aqi.code
空气质量指数Code -
aqi.name
空气质量指数的名字 -
aqi.defaultLocalAqi
是否是默认/推荐的当地AQI -
aqi.value
空气质量指数的值 -
aqi.valueDisplay
空气质量指数的值的文本显示 -
aqi.level
空气质量指数等级,可能为空 -
aqi.category
空气质量指数类别,可能为空 -
aqi.color
空气质量指数的颜色,RGB格式 -
aqi.primaryPollutant.code
首要污染物的Code,可能为空 -
aqi.primaryPollutant.name
首要污染物的名字,可能为空 -
aqi.primaryPollutant.fullName
首要污染物的全称,可能为空 -
aqi.health.effect
空气质量对健康的影响,可能为空 -
aqi.health.advice.generalPopulation
对一般人群的健康指导意见,可能为空 -
aqi.health.advice.sensitivePopulation
对敏感人群的健康指导意见,可能为空 -
pollutant.code
污染物的Code -
pollutant.name
污染物的名字 -
pollutant.fullName
污染物的全称 -
pollutant.concentration.value
污染物的浓度值 -
pollutant.concentration.unit
污染物的浓度值的单位 -
pollutant.subIndex.value
污染物的分指数的数值,可能为空 -
pollutant.subIndex.valueDisplay
污染物的分指数数值的显示名称 -
station.id
AQI相关联的监测站Location ID,可能为空 -
station.name
AQI相关联的监测站名称 -
source
数据来源或提供商名字以及他们的声明,必须与空气质量数据一起展示。可能为空