天级别预报
bash
curl "https://api.caiyunapp.com/v2.5/TAkhjf8d1nlSlspN/101.6656,39.2072/daily?dailysteps=1"
dailysteps
: 控制返回多少天的数据,[1, 15]
json
{
"status": "ok",
"api_version": "v2.5",
"api_status": "active",
"lang": "zh_CN",
"unit": "metric",
"tzshift": 28800,
"timezone": "Asia/Shanghai",
"server_time": 1640748007,
"location": [39.2072, 101.6656],
"result": {
"daily": {
"status": "ok",
"astro": [
{
"date": "2021-12-29T00:00+08:00",
"sunrise": {
"time": "08:32"
},
"sunset": {
"time": "17:58"
}
}
],
"precipitation": [
{
"date": "2021-12-29T00:00+08:00",
"max": 0,
"min": 0,
"avg": 0
}
],
"temperature": [
{
"date": "2021-12-29T00:00+08:00",
"max": -3,
"min": -12.5,
"avg": -4.99
}
],
"wind": [
{
"date": "2021-12-29T00:00+08:00",
"max": {
"speed": 7.28,
"direction": 306.43
},
"min": {
"speed": 1.8,
"direction": 22
},
"avg": {
"speed": 4.14,
"direction": 283.01
}
}
],
"humidity": [
{
"date": "2021-12-29T00:00+08:00",
"max": 0.76,
"min": 0.45,
"avg": 0.61
}
],
"cloudrate": [
{
"date": "2021-12-29T00:00+08:00",
"max": 0.52,
"min": 0,
"avg": 0.06
}
],
"pressure": [
{
"date": "2021-12-29T00:00+08:00",
"max": 85640.37,
"min": 85423.36,
"avg": 85539.3
}
],
"visibility": [
{
"date": "2021-12-29T00:00+08:00",
"max": 24.13,
"min": 4.86,
"avg": 7.18
}
],
"dswrf": [
{
"date": "2021-12-29T00:00+08:00",
"max": 405.6,
"min": 0,
"avg": 183.2
}
],
"air_quality": {
"aqi": [
{
"date": "2021-12-29T00:00+08:00",
"max": {
"chn": 65,
"usa": 102
},
"avg": {
"chn": 49,
"usa": 95
},
"min": {
"chn": 44,
"usa": 63
}
}
],
"pm25": [
{
"date": "2021-12-29T00:00+08:00",
"max": 36,
"avg": 33,
"min": 18
}
]
},
"skycon": [
{
"date": "2021-12-29T00:00+08:00",
"value": "CLEAR_DAY"
}
],
"skycon_08h_20h": [
{
"date": "2021-12-29T00:00+08:00",
"value": "CLEAR_DAY"
}
],
"skycon_20h_32h": [
{
"date": "2021-12-29T00:00+08:00",
"value": "PARTLY_CLOUDY_NIGHT"
}
],
"life_index": {
"ultraviolet": [
{
"date": "2021-12-29T00:00+08:00",
"index": "4",
"desc": "强"
}
],
"carWashing": [
{
"date": "2021-12-29T00:00+08:00",
"index": "1",
"desc": "适宜"
}
],
"dressing": [
{
"date": "2021-12-29T00:00+08:00",
"index": "8",
"desc": "极冷"
}
],
"comfort": [
{
"date": "2021-12-29T00:00+08:00",
"index": "12",
"desc": "湿冷"
}
],
"coldRisk": [
{
"date": "2021-12-29T00:00+08:00",
"index": "4",
"desc": "极易发"
}
]
}
},
"primary": 0
}
}
JSONPath $.result.daily. | 说明 |
---|---|
temperature[max,min,avg] | 地表 2 米气温 |
pressure[max,min,avg] | 地面气压 |
humidity[max,min,avg] | 地表 2 米相对湿度(%) |
wind.speed[max,min,avg] | 地表 10 米风速 |
precipitation[max,min,avg] | 降水数据 |
cloudrate[max,min,avg] | 云量(0.0-1.0) |
dswrf[max,min,avg] | 向下短波辐射通量(W/M2) |
visibility[max,min,avg] | 地表水平能见度 |
skycon.value | 全天主要 天气现象 |
skycon_08h_20h.value | 白天主要 天气现象 |
skycon_20h_32h.value | 夜晚主要 天气现象 |
ultraviolet.desc | 紫外线指数自然语言 |
comfort.desc | 舒适度指数自然语言 |
carWashing.desc | 洗车指数自然语言 |
coldRisk.desc | 感冒指数自然语言 |
dressing.desc | 穿衣指数自然语言 |
pm25[max,min,avg] | PM2.5 浓度(μg/m3) |
aqi[max,min,avg] | 国标 AQI |
astro[sunrise,sunset] | 日出日落时间,当地时区的时刻,tzshift 不作用在这个变量) |
备注:
- 对于
xxx.avg
,在当日,表示的是从当前时刻至当天结束的平均值,而不是全天的平均值