实时空气质量
实时空气质量API提供指定地点的实时空气质量数据,精度为1x1公里。
- 基于各个国家或地区当地标准的AQI、AQI等级、颜色和首要污染物
- 和风天气通用AQI
- 污染物浓度值、分指数
- 健康建议
- 相关联的监测站信息
我们推荐阅读空气质量信息文档,以便了解指数类型、污染物、支持的国家等信息。
请求路径#
GET /airquality/v1/current/{latitude}/{longitude}参数#
路径参数
-
latitude(必选) 所需位置的纬度。十进制,最多支持小数点后两位。例如39.92 -
longitude(必选) 所需位置的经度。十进制,最多支持小数点后两位。例如116.41
查询参数
-
lang多语言设置,请阅读多语言文档,了解我们的多语言是如何工作、如何设置以及数据是否支持多语言。
请求示例#
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/airquality/v1/current/39.92/116.41?lang=zh'
请将your_token替换为你的JWT身份认证,将your_api_host替换为你的API Host
返回数据#
{
"metadata": {
"tag": "d75a323239766b831889e8020cba5aca9b90fca5080a1175c3487fd8acb06e84",
"attributions": [
"https://developer.qweather.com/attribution.html"
]
},
"indexes": [
{
"code": "us-epa",
"name": "AQI (US)",
"aqi": 46,
"aqiDisplay": "46",
"level": "1",
"category": "Good",
"color": {
"red": 0,
"green": 228,
"blue": 0,
"alpha": 1
},
"primaryPollutant": {
"code": "pm2p5",
"name": "PM 2.5",
"fullName": "Fine particulate matter (<2.5µm)"
},
"health": {
"effect": "No health effects.",
"advice": {
"generalPopulation": "Everyone can continue their outdoor activities normally.",
"sensitivePopulation": "Everyone can continue their outdoor activities normally."
}
}
},
{
"code": "qaqi",
"name": "QAQI",
"aqi": 0.9,
"aqiDisplay": "0.9",
"level": "1",
"category": "Excellent",
"color": {
"red": 80,
"green": 240,
"blue": 230,
"alpha": 1
},
"primaryPollutant": {
"code": "pm2p5",
"name": "PM 2.5",
"fullName": "Fine particulate matter (<2.5µm)"
},
"health": {
"effect": "No health implications.",
"advice": {
"generalPopulation": "Enjoy your outdoor activities.",
"sensitivePopulation": "Enjoy your outdoor activities."
}
}
}
],
"pollutants": [
{
"code": "pm2p5",
"name": "PM 2.5",
"fullName": "Fine particulate matter (<2.5µm)",
"concentration": {
"value": 11.0,
"unit": "μg/m3"
},
"subIndexes": [
{
"code": "us-epa",
"aqi": 46,
"aqiDisplay": "46"
},
{
"code": "qaqi",
"aqi": 0.9,
"aqiDisplay": "0.9"
}
]
},
{
"code": "pm10",
"name": "PM 10",
"fullName": "Inhalable particulate matter (<10µm)",
"concentration": {
"value": 12.0,
"unit": "μg/m3"
},
"subIndexes": [
{
"code": "us-epa",
"aqi": 12,
"aqiDisplay": "12"
},
{
"code": "qaqi",
"aqi": 0.5,
"aqiDisplay": "0.5"
}
]
},
{
"code": "no2",
"name": "NO2",
"fullName": "Nitrogen dioxide",
"concentration": {
"value": 6.77,
"unit": "ppb"
},
"subIndexes": [
{
"code": "us-epa",
"aqi": 7,
"aqiDisplay": "7"
},
{
"code": "qaqi",
"aqi": 0.1,
"aqiDisplay": "0.1"
}
]
},
{
"code": "o3",
"name": "O3",
"fullName": "Ozone",
"concentration": {
"value": 0.02,
"unit": "ppb"
},
"subIndexes": [
{
"code": "us-epa",
"aqi": 21,
"aqiDisplay": "21"
},
{
"code": "qaqi",
"aqi": 0.2,
"aqiDisplay": "0.2"
}
]
},
{
"code": "co",
"name": "CO",
"fullName": "Carbon monoxide",
"concentration": {
"value": 0.25,
"unit": "ppm"
},
"subIndexes": [
{
"code": "us-epa",
"aqi": 3,
"aqiDisplay": "3"
},
{
"code": "qaqi",
"aqi": 0.1,
"aqiDisplay": "0.1"
}
]
}
],
"stations": [
{
"id": "P51762",
"name": "North Holywood"
},
{
"id": "P58056",
"name": "Pasadena"
},
{
"id": "P57327",
"name": "Los Angeles - N. Main Street"
}
]
}
-
metadataobject 当前响应的元数据-
tagstring 数据唯一标识 -
attributionsarray 数据归因信息,必须与当前数据共同显示
-
-
-
codestring 空气质量指数 Code -
namestring 空气质量指数的名字 -
levelstring 空气质量指数等级,可能为空 -
categorystring 空气质量指数类别,可能为空 -
colorobject 空气质量指数的 RGBA 颜色表示-
rednumber 红色分量值(RGBA),范围 0–255 -
greennumber 绿色分量值(RGBA),范围 0–255 -
bluenumber 蓝色分量值(RGBA),范围 0–255 -
alphanumber 透明度分量值(RGBA),范围 0-1
-
-
-
codestring 首要污染物的Code -
namestring 首要污染物的名字 -
fullNamestring 首要污染物的全称
-
-
-
effectstring 空气质量对健康的影响,可能为空 -
adviceobject 健康建议,可能为空-
generalPopulationstring 对一般人群的健康指导意见,可能为空 -
sensitivePopulationstring 对敏感人群的健康指导意见,可能为空
-
-
-
-
-
codestring 污染物的Code -
namestring 污染物的名字 -
fullNamestring 污染物的全称 -
concentrationobject 污染物的浓度值,可能为空-
valuenumber 数值 -
unitstring 单位
-
-
-
codestring 分指数的Code -
aqinumber 分指数的数值 -
aqiDisplaystring 分指数数值的显示名称
-
-
-
stationsarray 当前参考的空气质量监测站列表,可能为空-
idstring 监测站Location ID -
namestring 监测站名称
-