天气查询
用于查询某城市的天气
拥有非常全面的天气数据,可以根据IP查询

接口地址: https://api.wer.plus/api/tian

返回格式: JSON

请求方式: GET

请求示例: https://api.wer.plus/api/tian?city=要查询的城市

请求参数说明:

返回参数说明:

返回示例:

{"cityid":"101010100","date":"2022-04-18","week":"星期一","update_time":"20:53","city":"北京","cityEn":"beijing","country":"中国","countryEn":"China","wea":"霾","wea_img":"wu","tem":"17","tem1":"23","tem2":"9","win":"南风","win_speed":"2级","win_meter":"5km\/h","humidity":"44%","visibility":"6km","pressure":"1013","air":"92","air_pm25":"68","air_level":"良","air_tips":"空气好,可以外出活动,除极少数对污染物特别敏感的人群以外,对公众没有危害!","alarm":{"alarm_type":"","alarm_level":"","alarm_content":""},"win_speed_day":"3-4级","win_speed_night":"<3级","aqi":{"update_time":"19:55","cityid":"101010100","city":"北京","cityEn":"beijing","country":"中国","countryEn":"China","air":"92","air_level":"良","air_tips":"空气好,可以外出活动,除极少数对污染物特别敏感的人群以外,对公众没有危害!","pm25":"68","pm25_desc":"良","pm10":"100","pm10_desc":"良","o3":"159","o3_desc":"优","no2":"18","no2_desc":"优","so2":"7","so2_desc":"优","co":"-","co_desc":"-","kouzhao":"不用佩戴口罩","yundong":"适宜运动","waichu":"适宜外出","kaichuang":"适宜开窗","jinghuaqi":"关闭净化器"}}

错误码格式说明:更多返回错误代码请看首页的错误代码描述

 100 json解析失败
101 token不合法
102 url不合法
103 图片过大
104 读取图片失败
105 base64读取失败
106 未知类型
107 识别失败
108 参数获取失败
109 未知错误
110 token次数已用尽
111 token不存在或校验失败
121 数据查询失败
122 发送失败
200 成功

代码示例:

暂无示例