和风天气 API 获取天气预报 2025/5/21
和风天气 API 获取天气预报 2025/5/21
URL请求格式为GET
https://这里填账号设置中的API Host地址/v7/weather/now?location=这里填城市对应的数字
请求头需包含:
X-QW-Api-Key:值为你项目的 API KEY
北京为例子,返回结果如下
{
"code": "200",
"updateTime": "2025-05-21T19:02+08:00",
"fxLink": "https://www.qweather.com/weather/beijing-101010100.html",
"now": {
"obsTime": "2025-05-21T19:01+08:00",
"temp": "26",
"feelsLike": "26",
"icon": "100",
"text": "晴",
"wind360": "90",
"windDir": "东风",
"windScale": "2",
"windSpeed": "8",
"humidity": "48",
"precip": "0.0",
"pressure": "1005",
"vis": "13",
"cloud": "91",
"dew": "14"
},
"refer": {
"sources": [
"QWeather"
],
"license": [
"QWeather Developers License"
]
}
}
打开 fxLink 网页 https://www.qweather.com/weather/beijing-101010100.html