天级别预报
bash
curl "https://api.caiyunapp.com/v2.3/TAkhjf8d1nlSlspN/101.6656,39.2072/daily?dailysteps=1"
dailysteps
: 控制返回多少天的数据,[1, 15]
json
{
"status": "ok",
"api_version": "v2.3",
"api_status": "active",
"lang": "zh_CN",
"unit": "metric",
"tzshift": 28800,
"timezone": "Asia/Shanghai",
"server_time": 1640785978,
"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": 0,
"min": -14,
"avg": -12.67
}
],
"wind": [
{
"date": "2021-12-29T00:00+08:00",
"max": {
"speed": 7.09,
"direction": 305.17
},
"min": {
"speed": 2.14,
"direction": 217.75
},
"avg": {
"speed": 4.31,
"direction": 267.21
}
}
],
"humidity": [
{
"date": "2021-12-29T00:00+08:00",
"max": 0.75,
"min": 0.52,
"avg": 0.68
}
],
"cloudrate": [
{
"date": "2021-12-29T00:00+08:00",
"max": 0.16,
"min": 0,
"avg": 0.05
}
],
"pres": [
{
"date": "2021-12-29T00:00+08:00",
"max": 85683.75,
"min": 85443.75,
"avg": 85679.19
}
],
"visibility": [
{
"date": "2021-12-29T00:00+08:00",
"max": 24.13,
"min": 5.89,
"avg": 6.09
}
],
"dswrf": [
{
"date": "2021-12-29T00:00+08:00",
"max": 406.6,
"min": 0,
"avg": 0
}
],
"aqi": [
{
"date": "2021-12-29T00:00+08:00",
"max": 221,
"min": 54,
"avg": 80
}
],
"pm25": [
{
"date": "2021-12-29T00:00+08:00",
"max": 72,
"min": 18,
"avg": 55
}
],
"skycon": [
{
"date": "2021-12-29T00:00+08:00",
"value": "CLEAR_NIGHT"
}
],
"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"
}
],
"ultraviolet": [
{
"datetime": "2021-12-29T00:00+08:00",
"index": "4",
"desc": "强"
}
],
"carWashing": [
{
"datetime": "2021-12-29T00:00+08:00",
"index": "2",
"desc": "较适宜"
}
],
"dressing": [
{
"datetime": "2021-12-29T00:00+08:00",
"index": "8",
"desc": "极冷"
}
],
"comfort": [
{
"datetime": "2021-12-29T00:00+08:00",
"index": "12",
"desc": "湿冷"
}
],
"coldRisk": [
{
"datetime": "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 不作用在这个变量) |