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[].[] | Array | 该地区未来某天天气实况 |
weather[].[].day | String | 日期 |
weather[].[].date | String | 具体日期 |
weather[].[].week | String | 周几 |
weather[].[].wea | String | 天气情况 |
weather[].[].wea_img | String | 天气情况等级 |
weather[].[].tem1 | String | 高温/白天温度 |
weather[].[].tem2 | String | 低温/晚上温度 |
weather[].[].tem | String | 当前温度 |
weather[].[].win | String | 风向(早/晚) |
weather[].[].win_speed | String | 风速 |
weather[].[].hour[] | Array | 该地区当天某(02,05,08,11,14,17,20,23)小时天气实况 |
weather[].[].hour[].day | String | 该地区当天某(02,08,14,20)小时 |
weather[].[].hour[].wea | String | 该地区当天某小时天气情况 |
weather[].[].hour[].tem | String | 该地区当天某小时温度 |
weather[].[].hour[].win | String | 该地区当天某小时风速情况 |
weather[].[].hour[].win_speed | String | 该地区当天某小时风速等级 |
weather[].[].index[] | Array | 该地区当天生活指数 |
weather[].[].index[].title | String | 该地区当天生活类型(穿衣指数) |
weather[].[].index[].level | String | 该地区当天生活等级(热) |
weather[].[].index[].desc | String | 该地区当天生活具体描述与建议(适合穿T恤、短薄外套等夏季服装) |
HTTP Response Code
HTTP Status Code | Description |
---|---|
Http Status = 200 | Success |
Http Status = 400 | 表示客户端参数错误 |
Http Status = 404 | 表示接口服务不存在 |
Http Status = 500 | 表示服务端内部错误 |