天气查询API
获取全球城市实时天气信息,支持7天预报
12.5k
调用次数
4.8
用户评分
99.9%
可用率
接口地址
https://api.weather.com/v1/weather/current
请求方式
请求参数
city
必填
城市名称,支持中英文
示例:北京、Beijing
key
必填
API密钥
示例:your_api_key
units
选填
温度单位
可选值:metric(摄氏度)、imperial(华氏度)
返回示例
{ "code": 200, "message": "success", "data": { "city": "北京", "temperature": 25, "weather": "晴", "humidity": 45, "wind": { "speed": 3.2, "direction": "东北风" } } }