每日天气查询,返回城市温度、湿度、风向等
接口地址: https://whyta.cn/api/tianqi
返回格式: JSON
请求方式: GET
请求示例:https://whyta.cn/api/tianqi?key=你的APIKEY&city=Wuhan
接口备注:2
参数 | 类型 | 必填 | 示例值 | 说明 |
---|---|---|---|---|
key | string | 是 | 你的APIKEY | |
city | string | 是 | Beijing | 城市 |
参数 | 类型 | 示例 | 说明 |
---|---|---|---|
city | string | Wuhan | 城市 |
FeelsLikeC | string | 35 | 体感温度(单位:摄氏度) |
temp_C | string | 22 | 实时气温,单位:摄氏度 |
temp_F | string | 50 | 实时气温,单位:华氏:F=C×9/5+32 |
observation_time | time | 12:40 AM | 观察时间(采用UTC时间,即世界统一/标准时间,UTC+0800=北京 时间) |
precipMM | string | 0.0 | 降水量(单位:毫米) |
weatherDesc | string | 小雨 | 天气描述 |
humidity | string | 70 | 空气湿度 |
pressure | string | 1001 | 气压(单位:毫帕) |
visibility | string | 10 | 大气能见度 |
winddir16Point | string | E | 风向(北风:N 东风:E 南风:S 西风:W) |
windspeedKmph | string | 8 | 风速(单位:公里/每小时) |
windspeedMiles | string | 5 | 风速(单位:英里/每小时) |
{
"status": 1,
"message": "success",
"data": {
"FeelsLikeC": "35",
"FeelsLikeF": "94",
"cloudcover": "0",
"humidity": "75",
"localObsDateTime": "2025-07-08 08:40 AM",
"observation_time": "12:40 AM",
"precipInches": "0.0",
"precipMM": "0.0",
"pressure": "1001",
"pressureInches": "30",
"temp_C": "31",// 当前温度
"temp_F": "88",
"uvIndex": "2",
"visibility": "10",
"visibilityMiles": "6",
"weatherCode": "113",
"weatherDesc": [
{
"value": "Sunny" //天气描述
}
],
"weatherIconUrl": [
{
"value": ""
}
],
"winddir16Point": "E",
"winddirDegree": "97",
"windspeedKmph": "8",
"windspeedMiles": "5",
"city": "武汉"
}
}