# 搜索 Business 地域

- API 版本：1.10.0
- 最后更新：2026-09-29
- 服务地址：`https://api.ailingtu.com`
- 网页文档：[搜索 Business 地域](/openapi/business-locations)
- 完整接口约束：[JSON Schema](/openapi/operations/searchTikTokBusinessLocations.json)
- 接口发现：[接口索引](/openapi/operations/index.json)

## GET /v1/creator/tiktokBusiness/searchLocation

接口标识：`searchTikTokBusinessLocations`

搜索 Business 地域。

鉴权：请求头 `x-api-key: <YOUR_API_KEY>`；密钥仅保存在服务端。

成功判断：HTTP 2xx 且响应 code=0；异步任务还需查询最终状态。

### 请求参数

| 字段 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| `id` | query | integer | 是 | 账号 ID（creator_account_tk.id） |
| `searchQuery` | query | string | 是 | 搜索词，平台限制最多 100 个字符 |

### 成功响应

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "locations": [
      {
        "locationId": "loc-1",
        "locationName": "City of London, United Kingdom",
        "locationAddress": "London, United Kingdom"
      }
    ]
  },
  "timestamp": 1790640000000
}
```

### 响应字段

以下列出主要层级；完整结构、联合类型及校验规则以接口 JSON Schema 为准。必填指字段所在对象中的约束。

| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `code` | integer | 是 | — |
| `message` | string | 是 | — |
| `data` | object | 是 | — |
| `data.locations` | object[] | 是 | — |
| `data.locations[].locationId` | string | 是 | 发布时传给 post_info.location_id |
| `data.locations[].locationName` | string | 是 | 地域名称，发布时与 ID 一起传；列表显示也用它 |
| `data.locations[].locationAddress` | string | 否 | 地域补充信息：可能只有国家，也可能是省/州、城市或完整地址，仅展示 |
| `timestamp` | integer | 是 | — |

### 接入说明与限制

- 发布页选地域：按关键词搜这个 TikTok 账号能给帖子加的地域标签，一次最多 20 个。

- 实时查平台，不落库不缓存。
- 返回的 locationId 与 locationName 必须成对提交：创建/编辑帖子时放进 tiktokBusiness（视频）或 tiktokBusinessPhoto（图文）的 locationInfo，发布时落到 post_info.location_id / location_name。
- 只传其中一个平台不生效，所以创建/编辑接口会直接校验失败（地域的 ID 与名称必须同时传）。
- 缺 ID 或名称的条目不会返回。
- 账号的 open_id 作为平台的 business_id，后端自动取，不用前端传；平台判定授权失效时会返回「授权过期，请重新授权」。

### 相关接口

- [创建发布任务](/openapi/create-post) · [Markdown](/openapi/operations/createCreatorPost.md)
- [编辑发布记录](/openapi/update-post) · [Markdown](/openapi/operations/updateCreatorPost.md)
