Web/PC

AQI 监测地图 (网页端)
桌面浏览器端的空气质量动态监测地图,实时展示各监测站点的 AQI 指数分布与污染物浓度
airquality/v1/global/observations 实时 AQI 与 PM2.5/PM10/O₃ 等污染物浓度,需 Location Key;逐小时预报与中国城市排名为进阶能力。
华风爱科空气质量 API 提供全球观测站点的实时空气质量数据,分为标准能力与进阶能力。调用前需通过 定位搜索 API 获取 Location Key。标准路径 global/observations 返回 AQI 与六项污染物浓度;AQI 分级对照见实用资料 · 空气质量信息。由中国气象局授权品牌与 AccuWeather 全球数据能力提供支撑。
/airquality/v1/global/observations/{locationkey}.json 当前实况forecasts/hourly/24hour 逐小时预报;china/ranking 中国城市排名通过空气质量API可以构建的应用示例

桌面浏览器端的空气质量动态监测地图,实时展示各监测站点的 AQI 指数分布与污染物浓度

原生移动端空气助手,提供精准的站点天气数据查询、空气质量预报及健康防护建议

专业的空气质量统计分析平台,通过图表直观展示各项污染物的历史变化趋势与区域动态对比
101924 北京)。GET /airquality/v1/global/observations/{locationkey}.json,建议 language=zh-cn;AQI 等级对照见实用资料 · 空气质量信息。URL 路径中的 {locationkey} 为定位 API 返回的 Location Key;标准路径为 global/observations;进阶路径为 forecasts/hourly/24hour 或 china/ranking;下表为查询参数。
| 参数名 | 类型 | 必填 | 默认值 | 说明 | 示例 |
|---|---|---|---|---|---|
| apikey | String | 是 | - | 用以在API里验证与授权使用的用户密钥 | YOUR_API_KEY |
| version | String | 是 | v1 | 当前API版本 | v1 |
| locationkey | String | 是 | - | 用以搜索指定地点的特定ID | 101924 |
| format | String | 否 | JSON | 响应格式 | JSON |
| language | String | 否 | en-us | 指定响应数据语言的字符串 | zh-cn |
| details | String | 否 | false | 用以判断返回缩短版或完整版的空气质量数据 | details = true |
| 参数 | 类型 | 说明 | 数据形式示例 |
|---|---|---|---|
|
CarbonMonoxide
|
Float | 一氧化碳浓度 (mg/m³) | 0 |
|
ParticulateMatter2_5
|
Float | PM2.5 浓度 (μg/m³) | 19 |
|
NitrogenMonoxide
|
Float | 一氧化氮浓度 (μg/m³) | null |
|
EpochDate
|
Int | 观测时间的 UNIX 时间戳 | 1785128400 |
|
Lead
|
Float | 铅浓度 (μg/m³) | null |
|
Ozone
|
Float | 臭氧浓度 (μg/m³) | 154 |
|
Index
|
Int | 空气质量指数 (AQI) | 49 |
|
ParticulateMatter10
|
Float | PM10 浓度 (μg/m³) | 28 |
|
SulfurDioxide
|
Float | 二氧化硫浓度 (μg/m³) | 2 |
|
Date
|
String | 本地观测时间 (ISO 8601 格式) | 2026-07-27T13:00:00+08:00 |
|
NitrogenDioxide
|
Float | 二氧化氮浓度 (μg/m³) | 7 |
|
Source
|
String | 数据来源 (如 MEP) | MEP |
# 调取当前空气质量(标准能力)
curl "https://openapi.weathercn.com/airquality/v1/global/observations/101924.json?apikey=YOUR_API_KEY&language=zh-cn"
// 调取当前空气质量(标准能力)
fetch('https://openapi.weathercn.com/airquality/v1/global/observations/101924.json?apikey=YOUR_API_KEY&language=zh-cn')
.then(response => response.json())
.then(data => console.log(data));
import requests
# 调取当前空气质量(标准能力)
url = "https://openapi.weathercn.com/airquality/v1/global/observations/101924.json"
params = {'apikey': 'YOUR_API_KEY', 'language': 'zh-cn'}
response = requests.get(url, params=params)
print(response.json())
// 调取当前空气质量(标准能力)
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.weathercn.com/airquality/v1/global/observations/101924.json?apikey=YOUR_API_KEY&language=zh-cn"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
// 调取当前空气质量(标准能力)
$url = 'https://openapi.weathercn.com/airquality/v1/global/observations/101924.json';
$params = http_build_query(['apikey' => 'YOUR_API_KEY', 'language' => 'zh-cn']);
$response = file_get_contents($url . '?' . $params);
print_r(json_decode($response, true));
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://openapi.weathercn.com/airquality/v1/global/observations/101924.json?apikey=YOUR_API_KEY&language=zh-cn"
resp, _ := http.Get(url)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
require 'net/http'
require 'json'
url = URI("https://openapi.weathercn.com/airquality/v1/global/observations/101924.json")
params = {apikey: 'YOUR_API_KEY', language: 'zh-cn'}
url.query = URI.encode_www_form(params)
response = Net::HTTP.get_response(url)
puts JSON.parse(response.body)
let url = URL(string: "https://openapi.weathercn.com/airquality/v1/global/observations/101924.json?apikey=YOUR_API_KEY&language=zh-cn")!
let task = URLSession.shared.dataTask(with: url) { data, response, error in
if let data = data { print(try? JSONSerialization.jsonObject(with: data)) }
}
task.resume()
{
"CarbonMonoxide": 0.0,
"ParticulateMatter2_5": 54.0,
"NitrogenMonoxide": null,
"EpochDate": 1773111600,
"Lead": null,
"Ozone": 40.0,
"Index": 88,
"ParticulateMatter10": 82.0,
"SulfurDioxide": 4.0,
"Date": "2026-03-10T11:00:00+08:00",
"NitrogenDioxide": 44.0,
"Source": "MEP"
}
Key。Index 对应 AQI 数值,等级对照见实用资料 · 空气质量信息。X-Gw-API-Key: YOUR_API_KEY,避免 Key 出现在 URL 日志中。