访问地址: https://weather.sl.al/
查询参数: https://weather.sl.al/?lat=29.881583&lon=121.568458&lang=en
lat:纬度
lon:经度
lang:语言
(默认不带 lang 的话为中文)
结果参考:
{
"lat": "29.881583",
"lon": "121.568458",
"alert": "台风黄色预警",
"location": {
"city": "鄞州区",
"region": "浙江省"
},
"current": {
"temperature": 20,
"feelsLike": 20,
"description": "中雨",
"airQuality": {
"category": "一般",
"statement": "空气质量对大多数人来说是可接受的。然而,敏感人群长期暴露可能会出现轻微或中度症状。"
}
},
"sun": {
"duration": "11 hrs 01 mins",
"sunrise": "AM6:07",
"sunset": "PM5:08"
},
"hourly": [
{
"time": "下午 9 时",
"temperature": 21,
"rainProbability": "60%"
},
{
"time": "下午 10 时",
"temperature": 21,
"rainProbability": "60%"
},
{
"time": "下午 11 时",
"temperature": 21,
"rainProbability": "60%"
},
{
"time": "上午 12 时",
"temperature": 21,
"rainProbability": "49%"
},
{
"time": "上午 1 时",
"temperature": 21,
"rainProbability": "20%"
},
{
"time": "上午 2 时",
"temperature": 21,
"rainProbability": "20%"
},
{
"time": "上午 3 时",
"temperature": 21,
"rainProbability": "20%"
},
{
"time": "上午 4 时",
"temperature": 22,
"rainProbability": "20%"
},
{
"time": "上午 5 时",
"temperature": 22,
"rainProbability": "20%"
},
{
"time": "上午 6 时",
"temperature": 21,
"rainProbability": "25%"
},
{
"time": "上午 7 时",
"temperature": 21,
"rainProbability": "49%"
},
{
"time": "上午 8 时",
"temperature": 21,
"rainProbability": "60%"
}
],
"daily": [
{
"date": "2024-10-31",
"high": 20,
"dayDescription": "晚上有间歇性降雨,有时有大雨;多云",
"rainProbability": "82%"
},
{
"date": "2024-11-01",
"high": 23,
"low": 18,
"dayDescription": "上午有间歇性降雨,有时有大雨;多云,暖和潮湿",
"nightDescription": "晚上有间歇性降雨;多云,大风",
"rainProbability": "82%"
},
{
"date": "2024-11-02",
"high": 22,
"low": 14,
"dayDescription": "上午有零星降雨和毛毛雨;大部分多云,有风",
"nightDescription": "部分多云",
"rainProbability": "55%"
},
{
"date": "2024-11-03",
"high": 22,
"low": 14,
"dayDescription": "部分晴,天气宜人",
"nightDescription": "部分多云",
"rainProbability": "25%"
},
{
"date": "2024-11-04",
"high": 21,
"low": 11,
"dayDescription": "大部分多云,有风",
"nightDescription": "多云,有风",
"rainProbability": "25%"
},
{
"date": "2024-11-05",
"high": 17,
"low": 10,
"dayDescription": "大部分多云,有风",
"nightDescription": "部分多云,凉爽",
"rainProbability": "25%"
},
{
"date": "2024-11-06",
"high": 16,
"low": 10,
"dayDescription": "大部分多云",
"nightDescription": "大部分多云",
"rainProbability": "25%"
},
{
"date": "2024-11-07",
"high": 20,
"low": 11,
"dayDescription": "多云",
"nightDescription": "多云",
"rainProbability": "25%"
},
{
"date": "2024-11-08",
"high": 20,
"low": 14,
"dayDescription": "多云",
"nightDescription": "晚上有零星降雨和毛毛雨;多云",
"rainProbability": "25%"
},
{
"date": "2024-11-09",
"high": 19,
"low": 15,
"dayDescription": "多云,下午有零星降雨和毛毛雨",
"nightDescription": "晚上有零星降雨和毛毛雨;多云",
"rainProbability": "55%"
}
]
}
1
Aboceder 15 天前
不错不错
|
2
RangerWolf 13 天前
如何把城市名称转换成经纬度呢?
|
3
TRY33 OP @RangerWolf 你可以选择高德百度等服务。也可以自己爬数据后自己进行转换
|
4
feisualio 13 天前
感谢分享!
|
5
Aboceder 11 天前 1
@RangerWolf 用和风天气,有免费的 api ,城市名查询经纬度,挺全的
|