天气查询
查询天气情况
请求参数
-
city
类型:string
是否必填:必填
说明:格式为 xx区/县/市
访问示例
https://www.cunyuapi.top/weather?city=北京市
返回数据
{
"city_info": {
"city": "\u5317\u4eac\u5e02",
"reporttime": "2025-03-02 12:03:32"
},
"forecasts": [
{
"date": "2025-03-02",
"temperature": {
"day": "6",
"night": "-2"
},
"weather": {
"day": "\u591a\u4e91",
"night": "\u591a\u4e91"
},
"wind": {
"day": {
"direction": "\u4e1c\u5317",
"power": "1-3"
},
"night": {
"direction": "\u4e1c\u5317",
"power": "1-3"
}
}
},
{
"date": "2025-03-03",
"temperature": {
"day": "8",
"night": "-1"
},
"weather": {
"day": "\u591a\u4e91",
"night": "\u9634"
},
"wind": {
"day": {
"direction": "\u4e1c",
"power": "1-3"
},
"night": {
"direction": "\u4e1c",
"power": "1-3"
}
}
},
{
"date": "2025-03-04",
"temperature": {
"day": "8",
"night": "-1"
},
"weather": {
"day": "\u9634",
"night": "\u591a\u4e91"
},
"wind": {
"day": {
"direction": "\u5357",
"power": "1-3"
},
"night": {
"direction": "\u5357",
"power": "1-3"
}
}
},
{
"date": "2025-03-05",
"temperature": {
"day": "10",
"night": "0"
},
"weather": {
"day": "\u591a\u4e91",
"night": "\u6674"
},
"wind": {
"day": {
"direction": "\u897f",
"power": "1-3"
},
"night": {
"direction": "\u897f",
"power": "1-3"
}
}
}
]
}