空气污染实况接口

From Caiyun Wiki
Revision as of 04:55, 15 January 2019 by Liuzhonghua (talk | contribs)
Jump to: navigation, search

授权与认证

请先至彩云开放平台注册,注册后可以获得 token 。

把您的 token 拼到 API 请求的 URL 中,如: http://api.caiyunapp.com/v1/aqi?token=TAkhjf8d1nlSlspN

其中 TAkhjf8d1nlSlspN 就是一个共用测试 token 。不要把私有token 告诉任何人!

请求样例

http://api.caiyunapp.com/v1/aqi?token=TAkhjf8d1nlSlspN

返回结构和说明

status	"ok"
category	"aqi_latest_obs_city"
result	
0000A02880	
co	1.1
pm10	134
quality	"轻度污染"
area	"成都市"
o3	null
station_code	"2880A"
lon	104.0238889
lat	30.65638889
so2	8
no2	49
time_point	"2019-01-14T17:00:00Z+08:00"
position_name	"大石西路"
aqi	120
primary_pollutant	"细颗粒物(PM2.5)"
pm25	91
0000A02317	
co	1.4
pm10	null
quality	"中度污染"
area	"宣城市"
o3	26
station_code	"2317A"
lon	118.7386
lat	30.9742
so2	14
no2	64
time_point	"2019-01-14T17:00:00Z+08:00"
position_name	"敬亭山子站"
aqi	180
primary_pollutant	"细颗粒物(PM2.5)"