API地址
GET
https://api.kxlove.top/api/weather/index.php
推荐使用HTTPS协议
请求参数
| 参数名 | 类型 | 必需 | 说明 |
|---|---|---|---|
| ip | string | 否 | IP地址来查询 |
返回数据
{
"code": 200,
"ip_info": {
"ip": "223.95.30.52",
"country": "中国",
"province": "浙江省",
"city": "绍兴市",
"region": "",
"isp": "浙江省绍兴市 移动"
},
"weather": {
"degree": "1",
"humidity": "80",
"precipitation": "0",
"pressure": "1030",
"update_time": "2026-01-20 17:15",
"weather": "阴",
"weather_code": "02",
"weather_short": "阴",
"wind_direction": "8",
"wind_power": "4-5",
"wind_direction_name": "北风"
}
}
"code": 200,
"ip_info": {
"ip": "223.95.30.52",
"country": "中国",
"province": "浙江省",
"city": "绍兴市",
"region": "",
"isp": "浙江省绍兴市 移动"
},
"weather": {
"degree": "1",
"humidity": "80",
"precipitation": "0",
"pressure": "1030",
"update_time": "2026-01-20 17:15",
"weather": "阴",
"weather_code": "02",
"weather_short": "阴",
"wind_direction": "8",
"wind_power": "4-5",
"wind_direction_name": "北风"
}
}
备注信息