OkayAPI Docs
API Params
| Parameter | Type | Required | Default | Note | Description |
|---|---|---|---|---|---|
| HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
| province_code | String | Optaion | 省份编码 | ||
| city_code | String | Optaion | 城市编码 | ||
| area_code | String | Optaion | 区县编码 | ||
| street_code | String | Optaion | 乡镇编码 | ||
| village_code | String | Optaion | 村庄编码 |
API Debug
| KEY | REQUIRED | VALUE |
|---|---|---|
| app_key | *Required | |
| province_code | Option | |
| city_code | Option | |
| area_code | Option | |
| street_code | Option | |
| village_code | Option |
API Response
| KEY | Type | Description |
|---|---|---|
| province | Object | 省份信息(若有) |
| province.code | String | 省份编码 |
| province.name | String | 省份名称 |
| province.next | String | 省份下的城市列表 |
| city | Object | 城市信息(若有) |
| city.code | String | 城市编码 |
| city.name | String | 城市名称 |
| city.next | String | 城市下的区县列表 |
| area | Object | 区县信息(若有) |
| area.code | String | 区县编码 |
| area.name | String | 区县名称 |
| area.next | String | 区县下的乡镇列表 |
| street | Object | 乡镇信息(若有) |
| street.code | String | 乡镇编码 |
| street.name | String | 乡镇名称 |
| street.next | String | 乡镇下的村庄列表 |
| village | Object | 村庄信息(若有) |
| village.code | String | 村庄编码 |
| village.name | String | 村庄名称 |
| village.next | String | 下一级列表 |
| province_list | Array | 全国省份列表(固定返回) |
| province_list[].code | String | 省份编码 |
| province_list[].name | String | 省份名称 |
| full_address | String | 完整的地址,例如:北京市市辖区东城区东华门街道办事处正义路社区居委会 |
HTTP Response Code
| HTTP Status Code | Description |
|---|---|
| Http Status = 200 | Success |
| Http Status = 400 | 表示客户端参数错误 |
| Http Status = 404 | 表示接口服务不存在 |
| Http Status = 500 | 表示服务端内部错误 |