Skip to content

小时级别预报

bash
curl "https://api.caiyunapp.com/v2.6/TAkhjf8d1nlSlspN/101.6656,39.2072/hourly?hourlysteps=1"
  • hourlysteps: 控制返回多少小时的数据,[1, 360]
json
{
  "status": "ok", // 返回状态
  "api_version": "v2.6", // API 版本
  "api_status": "alpha",
  "lang": "zh_CN",
  "unit": "metric",
  "tzshift": 28800,
  "timezone": "Asia/Shanghai",
  "server_time": 1653552908,
  "location": [39.2072, 101.6656],
  "result": {
    "hourly": {
      "status": "ok",
      "description": "未来24小时阴", // 小时级别预报的天气描述
      "precipitation": [ // 降水数据
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 0, // 降水量
          "probability": 0 // 降水概率
        }
      ],
      "temperature": [ // 地表 2 米气温
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 27
        }
      ],
      "apparent_temperature": [ // 体感温度
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 24.6
        }
      ],
      "wind": [ // 地表 10 米风向和风速
        {
          "datetime": "2022-05-26T16:00+08:00",
          "speed": 9, // 风速
          "direction": 104 // 风向
        }
      ],
      "humidity": [ // 地表 2 米相对湿度
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 0.12
        }
      ],
      "cloudrate": [ // 云量
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 0
        }
      ],
      "skycon": [ // 天气现象
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": "CLEAR_DAY"
        }
      ],
      "pressure": [ // 地面气压
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 84020.8379904
        }
      ],
      "visibility": [ // 地表水平能见度
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 25
        }
      ],
      "dswrf": [ // 向下短波辐射通量
        {
          "datetime": "2022-05-26T16:00+08:00",
          "value": 736.87204608
        }
      ],
      "air_quality": { // 空气质量
        "aqi": [ // 国标 AQI
          {
            "datetime": "2022-05-26T16:00+08:00",
            "value": {
              "chn": 78, // 国内 AQI
              "usa": 54 // 美国 AQI
            }
          }
        ],
        "pm25": [ // PM2.5 浓度
          {
            "datetime": "2022-05-26T16:00+08:00",
            "value": 14
          }
        ]
      }
    },
    "primary": 0,
    "forecast_keypoint": "未来24小时阴" // 天气预报关键点
  }
}
JSONPath $.result.hourly.说明
temperature.value地表 2 米气温
apparent_temperature.value体感温度
pressure.value地面气压
humidity.value地表 2 米相对湿度(%)
wind.direction.value地表 10 米风向
wind.speed.value地表 10 米风速
precipitation.probability降水概率(%)
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