主题
keywords_data/bing/audience_estimation/live
POST /v3/keywords_data/bing/audience_estimation/live
接口说明
POST https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/live
本接口根据指定的广告定向条件,实时返回 Bing Ads 广告活动的受众规模预估数据预计受众量、展示量、点击量、花费、点击率、建议出价和建议预算等指标。
Live 接口会在当前请求中直接返回结果,无需像异步标准接口一样分别调用任务创建和结果查询接口。如果不要求实时获取结果,可使用标准任务接口;标准方式通常成本更低,但需要提交任务,再通过查询接口获取结果。
请求限制
- 请求体使用 UTF-8 编码的 JSON 格式。
- POST 请求体是 JSON 数组。
- 每次 Live API 请求只能 1 个任务。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
location_name、location_code和location_coordinate三且只能指定一个。
计费说明
每次请求均会产生费用。原始示例中单个任务的 cost 为 0.075 美,按参考汇率折算约为 ¥0.54 / 次;费用以接口返回结果及响应头 X-SeerMarTech-Charge-CNY 为准。
请求中的 bid 和 daily_budget 仍接口约定使用数值。
请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
location_name | string | 搜索引擎定位的完整名称。未指定 location_code 或 location_coordinate 时填。指定此参数后,无需再指定另外两个定位参数。可通过 GET /v3/keywords_data/bing/locations 获取可用定位名称。示例:London,England,United Kingdom |
location_code | integer | 搜索引擎定位编码。未指定 location_name 或 location_coordinate 时填。指定此参数后,无需再指定另外两个定位参数。可通过 GET /v3/keywords_data/bing/locations 获取可用定位编码。示例:2840 |
location_coordinate | string | 定位的 GPS 坐标,格式为 "纬度,经度,半径()"。未指定 location_name 或 location_code 时填。数据将该坐标所属国家返回。示例:29.6821525,-82.4098881,100 |
age | array | 目标年龄段。可选值:eighteen_to_twenty_four、fifty_to_sixty_four、sixty_five_and_above、thirteen_to_seventeen、thirty_five_to_forty_nine、twenty_five_to_thirty_four、unknown、zero_to_twelve |
bid | float | 期望的出价,单位为。最大值:1000 |
daily_budget | float | 广告活动每日预算,单位为。最大值:10000 |
gender | array | 目标性别。可选值:male、female、unknown |
industry | array | LinkedIn 资料定向中的行业 ID。可通过 GET /v3/keywords_data/bing/audience_estimation/industries 获取可用行业及 ID。示例:806301758 |
job_function | array | LinkedIn 资料定向中的职能 ID。可通过 GET /v3/keywords_data/bing/audience_estimation/job_functions 获取可用职能及 ID。示例:806300451 |
请求示例
curl
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"location_code": 2840,
"age": [
"twenty_five_to_thirty_four",
"thirty_five_to_forty_nine"
],
"bid": 1,
"daily_budget": 24,
"gender": [
"male",
"female"
],
"industry": [
806301758
],
"job_function": [
806300451
]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
payload = [
{
"location_code": 2840,
"bid": 10
}
]
response = requests.post(url, headers=headers, json=payload, timeout=60)
data = response.json()
if data.get("status_code") == 20000:
print(data)
else:
print(
f"请求失败,错误码:{data.get('status_code')},"
f"错误信息:{data.get('status_message')}"
)TypeScript
typescript
const url =
"https://api.seermartech.cn/v3/keywords_data/bing/audience_estimation/live";
const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify([
{
location_code: 2840,
bid: 10,
},
]),
});
const result = await response.json();
if (result.status_code === 20000) {
console.log(result);
} else {
console.error(
`请求失败,错误码:${result.status_code},错误信息:${result.status_message}`
);
}响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 请求级状态码。20000 表示成功。完整错误码以错误码文档为准。 |
status_message | string | 请求级提示信息 |
time | string | 请求执行耗时,单位为秒 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
tasks 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,通常位于 10000 至 60000 范围 |
status_message | string | 任务状态说明 |
time | string | 任务执行耗时,单位为秒 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量 |
path | array | 请求 URL 路径 |
data | object | 本次任务提交时使用的请求参数 |
result | array | 受众预估结果数组 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
est_impressions | object | 月度预计展示量范围 |
est_audience_size | object | 月度预计触达用户数范围 |
est_clicks | object | 月度预计点击量范围 |
est_spend | object | 月度预计花费范围 |
est_cost_per_event | object | 预计单次事件成本范围 |
est_ctr | object | 预计点击率范围 |
suggested_bid | float | 当前定向条件下的建议出价 |
suggested_budget | integer | 根据当前定向条件和出价计算出的建议每日预算 |
events_lost_to_bid | integer | 因出价不足而损失的预计事件数 |
events_lost_to_budget | integer | 因预算不足而损失的预计事件数 |
est_reach_audience_size | integer | 月度预计触达用户数 |
est_reach_impressions | integer | 月度预计展示量 |
currency | integer | 货币名称。示例值:USDollar |
以下范围对象均 high 和 low 两个字段:
| 字段 | 类型 | 说明 |
|---|---|---|
high | integer / float | 预估范围上限 |
low | integer / float | 预估范围下限 |
:
est_impressions、est_audience_size、est_clicks、est_spend的high和low通常为整数。est_cost_per_event和est_ctr的high和low为浮点数。
响应示例
json
{
"version": "0.1.20240801",
"status_code": 20000,
"status_message": "Ok.",
"time": "12.1899 sec.",
"cost": 0.075,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": " task-uuid-example ",
"status_code": 20000,
"status_message": "Ok.",
"time": "12.1800 sec.",
"cost": 0.075,
"result_count": 1,
"path": [
"v3",
"keywords_data",
"bing",
"audience_estimation",
"live"
],
"data": {
"api": "keywords_data",
"function": "audience_estimation",
"se": "bing",
"location_coordinate": "29.6821525,-82.4098881,100",
"age": [
"twenty_five_to_thirty_four"
],
"bid": 1,
"daily_budget": 24,
"gender": [
"male",
"female"
],
"industry": [
806301758
],
"job_function": [
806300451
]
},
"result": [
{
"est_impressions": {
"high": 250000,
"low": 120000
},
"est_audience_size": {
"high": 180000,
"low": 90000
},
"est_clicks": {
"high": 5000,
"low": 2200
},
"est_spend": {
"high": 2400,
"low": 1000
},
"est_cost_per_event": {
"high": 1.2,
"low": 0.45
},
"est_ctr": {
"high": 0.025,
"low": 0.018
},
"suggested_bid": 1.1,
"suggested_budget": 30,
"events_lost_to_bid": 120,
"events_lost_to_budget": 80,
"est_reach_audience_size": 135000,
"est_reach_impressions": 185000,
"currency": "USDollar"
}
]
}
]
}> 注意:响应中的 cost、预估花费及出价字段遵循接口的数据约定;人民币扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
实用场景
- 评估广告受众规模:根据地域、年龄、性别、行业和职能组合预估可触达用户量,判断广告活动是否备足够的目标人群。
- 制定广告预算:结合预计展示量、点击量和花费范围,提前规划每日预算,降低预算不足导致的流量损失。
- 优化竞价策略:对比出价与
suggested_bid,调整投放报价,在控制成本的同时减少因出价不足造成的事件损失。 - 比较定向方案:批量测试不同年龄、性别、行业或职能组合,筛选点击率和受众规模更优的广告定向策略。
- 预测投放效果:使用预计点击率、点击量、触达用户数和单次事件成本,为广告上线前的效果预估及投放审批提供数据依据。