OkayAPI Docs
API Params
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
city | String | Required | 需要搜索的城市,示例中会给出支持查询的城市 |
API Debug
KEY | REQUIRED | VALUE |
---|---|---|
app_key | *Required | |
city | *Required |
API Response
KEY | Type | Description |
---|---|---|
weather | Array | 该地区天气实况 |
weather[].date | String | 日期 |
weather[].time | String | 更新时间 |
weather[].week | String | 周几 |
weather[].city | String | 城市 |
weather[].weather | String | 天气情况 |
weather[].tem | String | 温度 |
weather[].win | String | 风向 |
weather[].win_speed | String | 风速等级 |
weather[].win_meter | String | 风速 |
weather[].humidity | String | 湿度 |
weather[].pressure | String | 气压(hPa) |
weather[].air | String | 空气质量 |
weather[].air_pm25 | String | PM2.5 |
weather[].air_level | String | 空气质量等级 |
weather[].air_tips | String | 空气质量描述 |
weather[].alarm[] | Array | 预警信息 |
weather[].alarm[].alarm_type | String | 预警类型 |
weather[].alarm[].alarm_level | String | 预警级别 |
weather[].alarm[].alarm_content | String | 预警信息 |
HTTP Response Code
HTTP Status Code | Description |
---|---|
Http Status = 200 | Success |
Http Status = 400 | 表示客户端参数错误 |
Http Status = 404 | 表示接口服务不存在 |
Http Status = 500 | 表示服务端内部错误 |