Administrative Region Query
Query global administrative regions with hierarchical structure support. Search by parent region, code, name, or type.
Endpoint: POST /biz/bigdata/administrative/region/query
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| parent | Integer | No | Parent region ID (returns child regions) |
| id | Integer | No | Specific region ID |
| id_in | String | No | Comma-separated list of region IDs |
| code | String | No | Region code (exact match) |
| code_in | String | No | Comma-separated list of region codes |
| name | String | No | Region name (exact match) |
| state | Boolean | No | Active status filter |
| type | String | No | Region type |
| figure | String | No | Figure/geographic code |
If no parent, id, figure, or id_in is provided, the query returns root-level regions (where parent_id is null).
Request
bash
curl -X POST "https://api.alaikis.com/std/biz/bigdata/administrative/region/query" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d 'bizContent={"parent": 1}'Response
json
{
"code": 200,
"msg": "success",
"data": [
{
"id": 101,
"parentId": 1,
"code": "BJ",
"name": "Beijing",
"countryCode": "CN",
"countryAlpha3": "CHN",
"localeName": "北京市",
"state": true,
"type": "province",
"figure": "110000",
"sort": 1,
"version": "2024v1",
"flag": null
}
]
}Data Model
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique region ID |
| parentId | Integer | Parent region ID (null for root) |
| code | String | Region code |
| name | String | Region name |
| countryCode | String | ISO 3166-1 alpha-2 country code |
| countryAlpha3 | String | ISO 3166-1 alpha-3 country code |
| localeName | String | Local language name |
| state | Boolean | Active status |
| type | String | Region type (country, province, city, district) |
| figure | String | Geographic/statistical code |
| sort | Integer | Sort order |
| version | String | Data version |
| flag | String | Additional flag |
Hierarchy Navigation
- Get root regions: Omit
parentparameter → returns countries - Get sub-regions: Set
parentto a region ID → returns child regions - Get specific region: Set
idto a specific region ID - Batch query: Use
id_inwith comma-separated IDs (e.g.,"1,2,3")
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid JSON format |
| 406 | No query parameters provided |