API 参考
国内城市排名
按最近一个完整日的PM2.5日均值对一个国家内的城市进行排名,可将污染最严重或最干净的城市排在前面;可仅包括大城市,也可包括所有居民点。
国内城市排名
GEThttps://api.atmy.ai/v1/ranking
查询参数
country string 必填
网站任一语言的国家名称,或其 ISO 代码。
order string 可选
most_polluted 或 cleanest 在前。
默认值: most_polluted
settlements string 可选
cities — 仅大城市;all — 所有传感器足够的居民点。
默认值: cities
limit integer 可选
城市数量,最多 50。
默认值: 10
lang string 可选
城市和国家名称以及页面链接的语言。
默认值: en
GET/ranking?country=Germany&limit=10
curl "https://api.atmy.ai/v1/ranking?country=Germany&limit=10"const response = await fetch("https://api.atmy.ai/v1/ranking?country=Germany&limit=10");
const data = await response.json();import requests
data = requests.get("https://api.atmy.ai/v1/ranking?country=Germany&limit=10").json()200响应
{
"country": "Germany",
"date": "2026-10-26",
"period": "2026-10-26T00:00:00Z/2026-10-27T00:00:00Z",
"order": "most_polluted",
"settlements": "cities",
"unit": "ug/m3",
"method": "datahub_daily",
"category_scale": "US_EPA_2024",
"count": 76,
"cities": [
{
"rank": 1,
"id": 52005,
"name": "Flensburg",
"pm25": 39.2,
"level": "unhealthy_for_sensitive_groups",
"sensors": 10
},
{
"rank": 2,
"id": 52151,
"name": "Würzburg",
"pm25": 22.2,
"level": "moderate",
"sensors": 5
}
]
}