查询广告主
使用 POST /v2/research/adlib/advertiser/query 查询广告主。
HTTP URL | https://open.tiktokapis.com/v2/research/adlib/advertiser/query/ |
HTTP 请求方法 | POST |
权限范围 | research.adlib.basic |
请求
请求头
Key | 类型 | 描述 | 示例 | 是否必填 |
Authorization | 字符串 (String) | TikTok 用户授权的访问令牌,通过 /v2/oauth/token/ 获取。 | Bearer clt.example12345Example12345Example | 是 |
Content-Type | 字符串 (String) | 资源的原始媒体类型。 | application/json | 是 |
查询参数
Key | 类型 | 描述 | 示例 | 是否必填 |
fields | 字符串 (String) | 请求的字段:
| business_name,business_id,country_code | 是 |
请求体
Key | 类型 | 描述 | 示例 | 是否必填 |
search_term | 字符串 (String) | 搜索词。最大长度限制为 50 个字符。 | 极好的 | 是 |
max_count | i64 | 单次请求返回的最大结果数。默认值为 10,最大值为 50。 | 20 | 否 |
请求示例
curl -L -X POST 'https://open.tiktokapis.com/v2/research/adlib/advertiser/query/?fields=business_id,business_name' \
-H 'Authorization: Bearer clt.example12345Example12345Example' \
-H 'Content-Type: application/json' \
--data-raw '{
"search_term": "awesome",
"max_count": 25
}'响应
Key | 类型 | 示例 |
data | QueryAdvertiserData | 请参见以下响应示例。 |
error | ErrorStructV2 | 请参见以下响应示例。 |
响应示例
{
"data": {
"advertisers": [
{
"business_id": 1755645247067185,
"business_name": "Awesome Food Co.",
"country_code": "US",
},
{
"business_id": 183746395837294,
"business_name": "Awesome Drink Co.",
"country_code": "CA",
}
]
},
"error": {
"code": "ok",
"http_status_code": 200,
"log_id": "202207280326050102231031430C7E754E",
"message": ""
}
}数据结构
QueryAdvertiserData
Key | 类型 | 描述 | 示例 |
advertisers | list<Advertiser> | 匹配所有条件的广告主信息列表。 |
Advertiser
Key | 类型 | 描述 | 示例 |
business_id | i64 | 广告主的企业 ID。 | 1755645247067185 |
business_name | 字符串 (String) | 广告主的企业名称。 | Awesome Food Co. |
country_code | 字符串 (String) | 广告主所在的国家/地区,取值格式为 ISO 3166-1 定义的双字母代码。 | US |
ErrorStructV2
Key | 类型 | 描述 | 示例 |
code | 字符串 (String) | 字符串格式的错误类别代码。 | ok |
message | 字符串 (String) | 详细的错误描述。 | |
log_id | 字符串 (String) | 与对应请求关联的唯一日志 ID,用于错误处理。 | 202207280326050102231031430C7E754E |
http_status_code | i32 | HTTP 状态码。 | 200 |