主题
Bing 受众预估行业列表
GET /v3/keywords_data/bing/audience_estimation/industries
接口说明
该接口用于获取 Bing Ads 受众预估能力支持的行业列表,以及每个行业对应的 industry_id。
调用成功后,返回可用于受众预估接口的行业信息。
- 请求方式:
GET - 请求地址:
https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/industries - 计费说明:调用,不产生费用;扣费以响应头
X-SeerMarTech-Charge-CNY为准
返回字段
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表见 /v3/appendix/errors |
status_message | string | 通用提示信息,完整列表见 /v3/appendix/errors |
time | string | 执行耗时,单位为秒 |
cost | float | 本次请求总费用,单位为 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表见 /v3/appendix/errors |
status_message | string | 任务提示信息 |
time | string | 任务执行耗时,单位为秒 |
cost | float | 任务费用,单位为 USD |
result_count | integer | result 数组中的结果数量 |
path | array | 请求路径 |
data | object | GET 请求 URL 中传的参数信息 |
result | array | 结果数组 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
industry_id | integer | 行业 ID |
industry_name | string | 行业名称 |
请求示例
cURL
bash
curl --location --request GET "https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/industries" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/industries"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json
if data.get("status_code") == 20000:
print(data)
else:
print(f"error. Code: {data.get('status_code')} Message: {data.get('status_message')}")TypeScript
typescript
import axios from "axios";
axios({
method: "get",
url: "https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/industries",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
})
.then(function (response) {
// 返回结果
console.log(response.data);
})
.catch(function (error) {
console.log(error);
});响应示例
json
{
"version": "0.1.20240801",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0677 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "keywords_data",
"function": "industries",
"se": "bing",
"se_type": "audience_estimation"
},
"result": []
}
]
}响应说明
接口返回的 result 数组中当前可用于 Bing 受众预估的行业列表。每个行业都会提供:
industry_id:行业唯一 ID,后续调用受众预估接口时可直接使用industry_name:行业名称,适合用于前端下拉框、筛选器或映射表展示
data 对象用于回显当前请求对应的接口上下文:
api:所属 API 模块function:当前功能名se:搜索引擎/广告平台标识se_type:能力类型
错误处理
可通过以下字段判断请求是否成功:
- 顶层
status_code = 20000:请求成功 tasks_error = 0:任务层没有错误tasks[].status_code:单个任务状态码tasks[].status_message:单个任务提示信息
完整错误码与提示信息可参考:
/v3/appendix/errors
使用建议
在调用 Bing Audience Estimation 接口前,建议拉取一次行业列表,并将 industry_id 与 industry_name 缓存到本地或业务系统中。这样可以:
- 避手工维护行业 ID 映射
- 降低参数传错导致的请求失败
- 便于在投放、受众分析后台中直接提供标准化行业选项
实用场景
- 构建行业下拉选项:拉取标准行业列表,为受众预估表单提供可选项,减少人工录错误
- 校验行业参数:在提交受众预估请求前验证
industry_id是否有效,提升接口调用成功率 - 同步行业映射表:将平台行业 ID 与 CRM、广告投放系统中的行业分类做映射,便于统一分析
- 支撑投放预估流程:在创建 Bing 广告受众预估任务前获取可用行业集合,确保后续参数合规
- 维护行业标准字:定期同步行业列表,及时发现平台 API 行业枚举变化,降低业务系统失风险