七日天气预报
七天天气获取

接口地址 https://api.kit9.cn/api/seven_days_weather/api.php

请求方式 GET/POST

返回格式 JSON

HTTP/HTTPS 支持

请求示例 https://api.kit9.cn/api/seven_days_weather/api.php?city=西安

参数说明

参数 必填 类型 说明
cityString市/县

返回参数

名称 类型 说明
code number 状态码 200为正常,其它为异常
msg string 状态说明
data array 数组
date string 当日时间
weather string 当日天气
high string 当日高温
low string 当日低温
air_quality string 空气质量
humidity string 当日温湿
wind_direction string 当日风向
wind_scale string 当日风级
update_time string 更新时间

返回示例

{
    "code": 200,
    "msg": "success",
    "data": [
        {
            "date": "2022-08-26",
            "weather": "中雨",
            "high": 24,
            "low": 20,
            "air_quality": "优",
            "humidity": "94%",
            "wind_direction": "北风3级",
            "wind_scale": 3,
            "update_time": "2022-08-26 14:55:08"
        },
        {
            "date": "2022-08-27",
            "weather": "小雨",
            "high": 21,
            "low": 17,
            "air_quality": "优",
            "humidity": "未知",
            "wind_direction": "东北风",
            "wind_scale": 4,
            "update_time": "2022-08-26 14:10:00"
        },
        {
            "date": "2022-08-28",
            "weather": "中雨",
            "high": 23,
            "low": 18,
            "air_quality": "优",
            "humidity": "未知",
            "wind_direction": "北风",
            "wind_scale": 2,
            "update_time": "2022-08-26 14:10:00"
        },
        {
            "date": "2022-08-29",
            "weather": "大雨",
            "high": 20,
            "low": 17,
            "air_quality": "优",
            "humidity": "未知",
            "wind_direction": "西南风",
            "wind_scale": 2,
            "update_time": "2022-08-26 14:10:00"
        },
        {
            "date": "2022-08-30",
            "weather": "多云",
            "high": 22,
            "low": 17,
            "air_quality": "良",
            "humidity": "未知",
            "wind_direction": "南风",
            "wind_scale": 1,
            "update_time": "2022-08-26 14:10:00"
        },
        {
            "date": "2022-08-31",
            "weather": "多云",
            "high": 26,
            "low": 20,
            "air_quality": "良",
            "humidity": "未知",
            "wind_direction": "东北风",
            "wind_scale": 2,
            "update_time": "2022-08-26 14:10:00"
        },
        {
            "date": "2022-09-01",
            "weather": "多云",
            "high": 30,
            "low": 19,
            "air_quality": "未知",
            "humidity": "未知",
            "wind_direction": "东南风",
            "wind_scale": 3,
            "update_time": "2022-08-26 14:10:00"
        }
    ]
}