Skip to content

天级别预报

bash
curl "https://api.caiyunapp.com/v2.6/TAkhjf8d1nlSlspN/101.6656,39.2072/daily?dailysteps=1"
  • dailysteps: 控制返回多少天的数据,[1, 15]
json
{
  "status": "ok",
  "api_version": "v2.6",
  "api_status": "alpha",
  "lang": "zh_CN",
  "unit": "metric",
  "tzshift": 28800,
  "timezone": "Asia/Shanghai",
  "server_time": 1653552787,
  "location": [
    39.2072,
    101.6656
  ],
  "result": {
    "daily": {
      "status": "ok",
      "astro": [
        {
          "date": "2022-05-26T00:00+08:00",
          "sunrise": {
            "time": "05:51"
          },
          "sunset": {
            "time": "20:28"
          }
        }
      ],
      "precipitation_08h_20h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 0,
          "min": 0,
          "avg": 0,
          "probability": 0
        }
      ],
      "precipitation_20h_32h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 0,
          "min": 0,
          "avg": 0,
          "probability": 0
        }
      ],
      "precipitation": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 0,
          "min": 0,
          "avg": 0,
          "probability": 0
        }
      ],
      "temperature": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 27,
          "min": 18,
          "avg": 23.75
        }
      ],
      "temperature_08h_20h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 27,
          "min": 18,
          "avg": 24.57
        }
      ],
      "temperature_20h_32h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 24.8,
          "min": 18,
          "avg": 20.02
        }
      ],
      "wind": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": {
            "speed": 28.24,
            "direction": 122.62
          },
          "min": {
            "speed": 9,
            "direction": 104
          },
          "avg": {
            "speed": 21.61,
            "direction": 118.02
          }
        }
      ],
      "wind_08h_20h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": {
            "speed": 28.24,
            "direction": 122.62
          },
          "min": {
            "speed": 9,
            "direction": 104
          },
          "avg": {
            "speed": 22.74,
            "direction": 115.78
          }
        }
      ],
      "wind_20h_32h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": {
            "speed": 22.39,
            "direction": 97.46
          },
          "min": {
            "speed": 9.73,
            "direction": 125.93
          },
          "avg": {
            "speed": 16,
            "direction": 121.62
          }
        }
      ],
      "humidity": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 0.18,
          "min": 0.08,
          "avg": 0.09
        }
      ],
      "cloudrate": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 1,
          "min": 0,
          "avg": 0.75
        }
      ],
      "pressure": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 84500.84,
          "min": 83940.84,
          "avg": 83991.97
        }
      ],
      "visibility": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 25,
          "min": 24.13,
          "avg": 25
        }
      ],
      "dswrf": [
        {
          "date": "2022-05-26T00:00+08:00",
          "max": 741.9,
          "min": 0,
          "avg": 368.6
        }
      ],
      "air_quality": {
        "aqi": [
          {
            "date": "2022-05-26T00:00+08:00",
            "max": {
              "chn": 183,
              "usa": 160
            },
            "avg": {
              "chn": 29,
              "usa": 57
            },
            "min": {
              "chn": 20,
              "usa": 42
            }
          }
        ],
        "pm25": [
          {
            "date": "2022-05-26T00:00+08:00",
            "max": 74,
            "avg": 15,
            "min": 10
          }
        ]
      },
      "skycon": [
        {
          "date": "2022-05-26T00:00+08:00",
          "value": "PARTLY_CLOUDY_DAY"
        }
      ],
      "skycon_08h_20h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "value": "PARTLY_CLOUDY_DAY"
        }
      ],
      "skycon_20h_32h": [
        {
          "date": "2022-05-26T00:00+08:00",
          "value": "CLOUDY"
        }
      ],
      "life_index": {
        "ultraviolet": [
          {
            "date": "2022-05-26T00:00+08:00",
            "index": "1",
            "desc": "最弱"
          }
        ],
        "carWashing": [
          {
            "date": "2022-05-26T00:00+08:00",
            "index": "1",
            "desc": "适宜"
          }
        ],
        "dressing": [
          {
            "date": "2022-05-26T00:00+08:00",
            "index": "4",
            "desc": "温暖"
          }
        ],
        "comfort": [
          {
            "date": "2022-05-26T00:00+08:00",
            "index": "4",
            "desc": "温暖"
          }
        ],
        "coldRisk": [
          {
            "date": "2022-05-26T00:00+08:00",
            "index": "4",
            "desc": "极易发"
          }
        ]
      }
    },
    "primary": 0
  }
}
JSONPath $.result.daily.说明
temperature[max,min,avg]全天地表 2 米气温
temperature_08h_20h[max,min,avg]白天地表 2 米气温
temperature_20h_32h[max,min,avg]夜晚地表 2 米气温
pressure[max,min,avg]地面气压
humidity[max,min,avg]地表 2 米相对湿度(%)
wind.speed[max,min,avg]全天地表 10 米风速
wind_08h_20h.speed[max,min,avg]白天地表 10 米风速
wind_20h_32h.speed[max,min,avg]夜晚地表 10 米风速
precipitation_08h_20h[max,min,avg,probability]白天降水数据
precipitation_20h_32h[max,min,avg,probability]夜晚降水数据
precipitation[max,min,avg,probability]降水数据
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, xxx_08h_20h, xxx_20h_32h:

  • xxx 表示全天,0时~24时的
  • xxx_08h_20h 表示当天 08~20 时
  • xxx_20h_32h 表示当天 20~次日 08 时的