未来七日天气
接口地址 https://apis.kit9.cn/api/seven_days_weather/api.php
请求方式 GET/POST
返回格式 JSON
HTTP/HTTPS 支持
请求示例 https://apis.kit9.cn/api/seven_days_weather/api.php?city=上海
参数说明
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| city | 是 | String | 市/县 |
返回参数
| 名称 | 类型 | 说明 | ||
|---|---|---|---|---|
| code | number | 状态码 200为正常,其它为异常 | ||
| msg | string | 状态说明 | ||
| data | array | 数组 | ||
| date | string | 今天日期 | ||
| sunrise | string | 当天日出 | ||
| sunset | string | 当天日落 | ||
| weather | string | 当日天气 | ||
| high | string | 当日高温 | ||
| low | string | 当日低温 | ||
| wind_scale | string | 当日风级 | ||
| wind_direction | string | 当日风向 | ||
返回示例
{
"code": 200,
"msg": "success",
"data": [
{
"date": "2024-02-05",
"sunrise": "06:43",
"sunset": "17:32",
"weather": "阴转多云",
"high": 6,
"low": 2,
"wind_scale": 3,
"wind_direction": "西北风"
},
{
"date": "2024-02-06",
"sunrise": "06:43",
"sunset": "17:33",
"weather": "小雨转多云",
"high": 4,
"low": 1,
"wind_scale": 2,
"wind_direction": "北风"
},
{
"date": "2024-02-07",
"sunrise": "06:42",
"sunset": "17:34",
"weather": "阴转多云",
"high": 7,
"low": 1,
"wind_scale": 3,
"wind_direction": "北风"
},
{
"date": "2024-02-08",
"sunrise": "06:41",
"sunset": "17:35",
"weather": "阴转多云",
"high": 6,
"low": 0,
"wind_scale": 2,
"wind_direction": "北风"
},
{
"date": "2024-02-09",
"sunrise": "06:40",
"sunset": "17:35",
"weather": "多云",
"high": 9,
"low": -2,
"wind_scale": 2,
"wind_direction": "西北风"
},
{
"date": "2024-02-10",
"sunrise": "06:39",
"sunset": "17:36",
"weather": "晴",
"high": 14,
"low": -2,
"wind_scale": 2,
"wind_direction": "西风"
},
{
"date": "2024-02-11",
"sunrise": "06:39",
"sunset": "17:37",
"weather": "小雨转晴",
"high": 11,
"low": 3,
"wind_scale": 2,
"wind_direction": "西北风"
}
]
}