https://xxyh.xiaoli.icu/api/p_weather_long.phphttps://xxyh.xiaoli.icu/api/p_weather_long.php?city=%E6%9D%AD%E5%B7%9E&days=7传 city(支持中文,自动地理编码)或同时传 lat / lon。返回逐日的天气现象、最高/最低温、体感温度、降水量与概率、最大风速与风向、紫外线指数、日出日落。
数据源为 Open-Meteo 集合预报(ECMWF / GFS),免费公共接口,缓存 15 分钟。预报天数越远误差越大,第 10 天以后仅供趋势参考。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
city |
string | 选填 | 杭州 | 城市名,如 杭州、北京;与 lat/lon 二选一 |
lat |
float | 选填 | — | 纬度(WGS84),传 city 时可省略 |
lon |
float | 选填 | — | 经度(WGS84),传 city 时可省略 |
days |
int | 选填 | 7 | 预报天数 1~16,默认 7 |
https://xxyh.xiaoli.icu/api/p_weather_long.php
此处将显示接口返回结果…
{
"code": 200,
"msg": "ok",
"data": {
"city": "杭州",
"province": "浙江省",
"days": 7,
"list": [
{
"date": "2026-11-28",
"weekday": "周六",
"weather": "多云",
"temp_max": 18.4,
"temp_min": 9.1,
"rain_prob": 10,
"wind_max": 12.6,
"sunrise": "06:32",
"sunset": "16:58"
}
]
}
}
—