OkayAPI Docs


API Path: /api/App/Common_Weather/LiveWeather

API Description: 返回地区实时天气状况。请注意:此接口数据来源网上,仅用于学习娱乐,不得用于商业用途。

1
API Traffic
HTTP/HTTPS
Protocol
GET/POST
Method
UTF-8
Charset
JSON
Response

API Debug   


API Params

ParameterTypeRequiredDefaultNoteDescription
HTTP_APPKEYStringRequiredMIN: 32Common Put Your APPKEY
cityStringRequired需要搜索的城市,示例中会给出支持查询的城市

API Debug

KEYREQUIREDVALUE
app_key *Required
city *Required

API Response

KEYTypeDescription
weatherArray该地区天气实况
weather[].dateString日期
weather[].timeString更新时间
weather[].weekString周几
weather[].cityString城市
weather[].weatherString天气情况
weather[].temString温度
weather[].winString风向
weather[].win_speedString风速等级
weather[].win_meterString风速
weather[].humidityString湿度
weather[].pressureString气压(hPa)
weather[].airString空气质量
weather[].air_pm25StringPM2.5
weather[].air_levelString空气质量等级
weather[].air_tipsString空气质量描述
weather[].alarm[]Array预警信息
weather[].alarm[].alarm_typeString预警类型
weather[].alarm[].alarm_levelString预警级别
weather[].alarm[].alarm_contentString预警信息

HTTP Response Code

HTTP Status CodeDescription
Http Status = 200Success
Http Status = 400表示客户端参数错误
Http Status = 404表示接口服务不存在
Http Status = 500表示服务端内部错误