Skip to content

小时级别预报

bash
curl "https://api.caiyunapp.com/v2.5/TAkhjf8d1nlSlspN/101.6656,39.2072/hourly?hourlysteps=1"
  • hourlysteps: 控制返回多少小时的数据,[1, 360]
json
{
  "status": "ok",
  "api_version": "v2.5",
  "api_status": "active",
  "lang": "zh_CN",
  "unit": "metric",
  "tzshift": 28800,
  "timezone": "Asia/Shanghai",
  "server_time": 1640748098,
  "location": [39.2072, 101.6656],
  "result": {
    "hourly": {
      "status": "ok",
      "description": "未来24小时多云",
      "precipitation": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": 0
        }
      ],
      "temperature": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": -4
        }
      ],
      "wind": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "speed": 4.68,
          "direction": 42
        }
      ],
      "humidity": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": 0.41
        }
      ],
      "cloudrate": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": 0
        }
      ],
      "skycon": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": "CLEAR_DAY"
        }
      ],
      "pressure": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": 85594.178496832
        }
      ],
      "visibility": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": 11.6
        }
      ],
      "dswrf": [
        {
          "datetime": "2021-12-29T11:00+08:00",
          "value": 110.0449512263
        }
      ],
      "air_quality": {
        "aqi": [
          {
            "datetime": "2021-12-29T11:00+08:00",
            "value": {
              "chn": 61,
              "usa": 97
            }
          }
        ],
        "pm25": [
          {
            "datetime": "2021-12-29T11:00+08:00",
            "value": 34
          }
        ]
      }
    },
    "primary": 0,
    "forecast_keypoint": "未来24小时多云"
  }
}
JSONPath $.result.hourly.说明
temperature.value地表 2 米气温
pressure.value地面气压
humidity.value地表 2 米相对湿度(%)
wind.direction.value地表 10 米风向
wind.speed.value地表 10 米风速
precipitation.value降水数据
cloudrate.value云量(0.0-1.0)
dswrf.value向下短波辐射通量(W/M2)
visibility.value地表水平能见度
skycon.value天气现象
description自然语言描述
forecast_keypoint自然语言描述
pm25.valuePM2.5 浓度(μg/m3)
aqi.value国标 AQI