# Search district/county information

Search district/county information, by district/county ID or city ID

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/corehr/v2/basic_info/districts/search
HTTP Method | POST
Rate Limit | [1000 per minute、50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Get basic data information(corehr:common_data.basic_data:read)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
page_size | int | Yes | Page size, up to 100<br>**Example value**: 100<br>**Data validation rules**:<br>- Value range: `1` ～ `100`
page_token | string | No | Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups<br>**Example value**: 6863333352758314504

### Request body

Parameter | Type | Required | Description
---|---|---|---
city_id_list | string\[\] | No | The list of city IDs to which it belongs, and the detailed information can be obtained through the [Search city information](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-city/search) interface.  Match all records if omitted<br>**Example value**: ["6863333352603125255"]<br>**Data validation rules**:<br>- Maximum length: `100`
district_id_list | string\[\] | No | District/county ID list. Match all records if omitted<br>**Example value**: ["6863333353496512007"]<br>**Data validation rules**:<br>- Maximum length: `100`
status_list | int\[\] | No | List of status codes.  Match all records if omitted<br>**Example value**: [1]<br>**Optional values are**:<br>- 1：active<br>- 0：inactive<br>**Default value**: `[1]`<br>**Data validation rules**:<br>- Maximum length: `2`

### Request body example
```json
{
    "city_id_list": [
        "6863333352603125255"
    ],
    "district_id_list": [
        "6863333353496512007"
    ],
    "status_list": [
        1
    ]
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
items | district\[\] | Inquire about district/county information
district_id | string | District/County ID
name | i18n\[\] | name
lang | string | language
value | string | content
city_id | string | City ID, the detailed information can be obtained through the [Search city information](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-city/search) interface
subregion_code | string | Subregion code
status | int | status<br>**Optional values are**:<br>- 1：active<br>- 0：inactive
page_token | string | Page identifier, when has_more is true, a new page_token will also be returned. Otherwise, page_token will not be returned
has_more | boolean | Whether the response body has more parameters

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "district_id": "6863333353496512007",
                "name": [
                    {
                        "lang": "zh-CN",
                        "value": "中文示例"
                    }
                ],
                "city_id": "6863333352603125255",
                "subregion_code": "230110",
                "status": 1
            }
        ],
        "page_token": "6863333354096297480",
        "has_more": true
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
500 | 1160998 | Internal Server Error | System error. Please try again later or [contact technical support](https://applink.feishu.cn/TLJpeNdW)

