天气查询 API 分享
一、API 信息
• 地址:https://api.lolimi.cn/API/weather/?city=北京
二、返回内容示例
{
“code”: 1,
“text”: “获取成功”,
“data”: {
“city”: “北京”,
“cityEnglish”: “beijing”,
“temp”: “18”,
“tempn”: “15”,
“weather”: “多云转阴”,
“wind”: “西南风转东北风”,
“windSpeed”: “<3 级”,
“time”: “2024-10-05 08:00”,
“warning”: {},
“current”: {
“city”: “北京”,
“cityEnglish”: “beijing”,
“humidity”: “39%”,
“wind”: “南风”,
“windSpeed”: “2 级”,
“visibility”: “5km”,
“weather”: “多云”,
“weatherEnglish”: “Cloudy”,
“temp”: “22.6”,
“fahrenheit”: “72.7”,
“air”: “88”,
“air_pm25”: “88”,
“date”: “10 月 05 日(星期六)”,
“time”: “14:20”,
“image”: “http://api.lolimi.cn/API/weather/cache/image/多云.png”
},
“living”: [
{
“name”: “路况指数”,
“index”: “干燥”,
“tips”: “天气较好,路面较干燥,路况较好。”
},
{
“name”: “晨练指数”,
“index”: “适宜”,
“tips”: “天气不错,空气清新。”
},
//…(此处省略其他生活指数内容)
{
“name”: “交通指数”,
“index”: “良好”,
“tips”: “气象条件良好,车辆可以正常行驶。”
},
{
“name”: “干燥指数”,
“index”: “适宜”,
“tips”: “温湿条件适宜,风速不大,皮肤无需特殊保养,只做日常护理即可。”
}
]
}
}