ApiWeather
实时天气查询
查询指定位置的实时天气、小时级预报、每日预报等完整天气信息
Path Parameters
appKey*string
API 鉴权密钥(通过 API_FIXED_PARAMS 自动注入)
location*string
经纬度坐标,格式为 经度,纬度(注意经度在前)
例如:116.4,39.9(北京天安门)
Query Parameters
dailysteps?integer
每日预报天数(1-7),默认为 7
hourlysteps?integer
小时级预报时长(1-48),默认为 48
alert?boolean
是否返回气象预警信息
Response Body
application/json
curl -X GET "https://example.com/v2.6/string/string/weather"{
"status": "ok",
"result": {
"realtime": {
"temperature": 0,
"humidity": 0,
"skycon": "string",
"wind": {
"speed": 0,
"direction": 0
}
},
"daily": {},
"hourly": {},
"alert": {}
}
}