主题
AI 优化:LLM 提及次数最高品牌(精简版,实时)
POST /v3/ai_optimization/llm_mentions/top_mentioned_brands_lite/live
本接口使用 POST 方法,请求路径为:
/v3/ai_optimization/llm_mentions/top_mentioned_brands_lite/live
本接口是“LLM 提及次数最高品牌”接口的精简版本,用于根据指定的 target,按品牌聚合并返回 LLM 提及指标。结果受平台、地域和语言参数影响。
> 注意:品牌实体数据适用于 platform: chat_gpt。
接口信息
- 请求方法:
POST - 请求地址:
https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_brands_lite/live - 请求格式:
application/json - 单次请求任务数:1 平台限流以认证说明中的 30/60/120 次/分钟规则为准/分钟
- 最长执行时间:约 120 秒
计费说明
本接口按任务计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求体是 JSON 数组,单次请求只能一个任务:
json
[
{
"target": [
{
"keyword": "bmw",
"search_scope": ["answer"]
},
{
"keyword": "auto",
"search_scope": ["question"],
"match_type": "partial_match"
}
],
"location_code": 2840,
"language_code": "en",
"platform": "chat_gpt",
"limit": 5,
"internal_list_limit": 2
}
]任务参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
target | array | 是 | 目标实体数组,最多 10 个实体。每个实体只能一个 domain 或一个 keyword。请求至少需要一个 search_filter 为 include 的 domain_entity 或 keyword_entity。 |
location_name | string | 否 | 搜索地域的完整名称。使用该参数时无需传 location_code。未指定时默认使用 location_code: 2840。 |
location_code | integer | 否 | 搜索地域代码。使用该参数时无需传 location_name,默认值为 2840。 |
language_name | string | 否 | 搜索语言的完整名称。使用该参数时无需传 language_code。 |
language_code | string | 否 | 搜索语言代码,默认值为 en。 |
platform | string | 否 | 目标平台,可选值:chat_gpt、google。默认值为 google。 |
filters | array | 否 | 在聚合结果上执行过滤。最多设置 8 个过滤条件。 |
initial_dataset_filters | array | 否 | 在聚合前对原始提及数据进行过滤,用于限制参与聚合的数据行。最多设置 8 个过滤条件。 |
limit | integer | 否 | items 数组最多返回的结果数,范围为 1~1000,默认值为 100。 |
internal_list_limit | integer | 否 | 限制数组的最大数,适用于 sources_domain、search_results_domain、brand_entities_title 和 brand_entities_category。范围为 1~10,默认值为 5。 |
order_by | array | 否 | 结果排序规则,最多设置 3 个排序条件。 |
offset | integer | 否 | 结果偏移量,默认值为 0,最大值为 1000000。 |
include_brands | array | 否 | 返回指定品牌。 |
exclude_brands | array | 否 | 排除指定品牌。 |
tag | string | 否 | 用户自定义任务标识,最长 255 个字符。该值会原样返回在响应任务的 data 对象中。 |
地域和语言限制
当 platform 为 chat_gpt 时支持以下组合:
location_name:United Stateslocation_code:2840language_name:Englishlanguage_code:en
可通过以下接口获取支持的地域和语言列表:
/v3/ai_optimization/llm_mentions/locations_and_languages
target 参数
target 是目标实体数组,最多 10 个对象。每个对象可使用域名实体或实体。
域名实体:domain_entity
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
domain | string | 条件填 | 目标域名。当实体中未指定 keyword 时填,最长 63 个字符。域名不得 https:// 或 www.。 |
search_filter | string | 否 | 域名过滤方式:include、exclude。默认值为 include。 |
search_scope | array | 否 | 搜索范围,可选值:any、sources、search_results。默认值为 any。 |
include_subdomains | boolean | 否 | 是否将目标域名的子域名纳搜索。默认值为 false。 |
示例:
json
{
"domain": "example.com",
"search_filter": "include",
"search_scope": ["sources"],
"include_subdomains": true
}实体:keyword_entity
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
keyword | string | 条件填 | 目标。当实体中未指定 domain 时填,最长 250 个字符。 |
search_filter | string | 否 | 过滤方式:include、exclude。默认值为 include。 |
search_scope | array | 否 | 搜索范围,可选值:any、question、answer、brand_entities、fan_out_queries。默认值为 any。 |
match_type | string | 否 | 匹方式:word_match、partial_match。默认值为 word_match。 |
示例:
json
{
"keyword": "bmw",
"search_filter": "include",
"search_scope": ["answer"],
"match_type": "partial_match"
}match_type 说明
word_match:匹。匹目标的词组,也目标词组前后或存在词。partial_match:部分匹。匹中出现的或片段。
过滤条件
filters
filters 用于对聚合后的结果进行过滤。最多支持 8 个过滤条件,多个条件之间需要使用逻辑运算符 and 或 or。
支持的运算符:
=、<>、in、not_in、like、not_like、ilike、not_ilike、match、not_match
like 和 not_like 支持使用 % 匹任意长度的字符串。
示例:
json
"filters": [
["mentions", ">", 10],
"and",
["brand", "like", "%auto%"]
]initial_dataset_filters
initial_dataset_filters 在原始提及数据聚合前执行过滤,可减少参与聚合的数据量。
支持的运算符与 filters 相同,最多支持 8 个条件。
示例:
json
"initial_dataset_filters": [
["ai_search_volume", ">", 10]
]排序规则
order_by 使用与 filters 相同的字段和排序表达式。排序方向支持:
asc:升序desc:降序
排序字段与排序方向之间使用逗号分隔,多个排序规则之间也使用逗号分隔,单次请求最多设置 3 条排序规则。
示例:
json
"order_by": [
"mentions,desc",
"brand,asc"
]请求示例
curl
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_brands_lite/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"language_code": "en",
"location_code": 2840,
"platform": "chat_gpt",
"target": [
{
"keyword": "bmw",
"search_scope": ["answer"]
},
{
"keyword": "auto",
"search_scope": ["question"],
"match_type": "partial_match"
}
],
"initial_dataset_filters": [
["ai_search_volume", ">", 10]
],
"limit": 5,
"internal_list_limit": 2
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_brands_lite/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
post_data = [
{
"language_code": "en",
"location_code": 2840,
"platform": "chat_gpt",
"target": [
{
"keyword": "bmw",
"search_scope": ["answer"],
},
{
"keyword": "auto",
"search_scope": ["question"],
"match_type": "partial_match",
},
],
"initial_dataset_filters": [
["ai_search_volume", ">", 10],
],
"limit": 5,
"internal_list_limit": 2,
}
]
response = requests.post(url, headers=headers, json=post_data, timeout=120)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
f"请求失败,状态码:{result.get('status_code')},"
f"消息:{result.get('status_message')}"
)TypeScript
typescript
import axios from "axios";
const url =
"https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_brands_lite/live";
const requestData = [
{
language_code: "en",
location_code: 2840,
platform: "chat_gpt",
target: [
{
keyword: "bmw",
search_scope: ["answer"],
},
{
keyword: "auto",
search_scope: ["question"],
match_type: "partial_match",
},
],
initial_dataset_filters: [["ai_search_volume", ">", 10]],
limit: 5,
internal_list_limit: 2,
},
];
axios
.post(url, requestData, {
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
timeout: 120000,
})
.then((response) => {
// 处理接口返回结果
console.log(response.data);
})
.catch((error) => {
// 处理请求异常
console.error(error.response?.data || error.message);
});响应结构
接口返回 JSON 数据,顶层 tasks 数组。
json
{
"version": "0.1.20260527",
"status_code": 20000,
"status_message": "Ok.",
"time": "3.3325 sec.",
"cost": 0.101,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "3.1021 sec.",
"cost": 0.101,
"result_count": 1,
"path": [
"v3",
"ai_optimization",
"llm_mentions",
"top_mentioned_brands_lite",
"live"
],
"data": {
"api": "ai_optimization",
"function": "top_mentioned_brands_lite",
"target": [
{
"keyword": "bmw",
"search_scope": ["answer"],
"search_filter": "include"
}
],
"platform": "chat_gpt",
"language_code": "en",
"location_code": 2840,
"initial_dataset_filters": [],
"filters": [],
"order_by": [],
"limit": 5,
"offset": 0,
"include_brands": [],
"exclude_brands": []
},
"result": [
{
"total_count": 1,
"offset": 0,
"items_count": 1,
"aggregated_metrics": null,
"items": [
{
"brand": "Example Brand",
"location": 2840,
"language": "en",
"platform": "chat_gpt",
"metrics": {
"mentions": 125,
"ai_search_volume": 42
}
}
]
}
]
}
]
}顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求整体状态码。 |
status_message | string | 请求整体状态信息。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务总数。 |
tasks_error | integer | 执行失败的任务数。 |
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 | 请求路径。 |
data | object | 本次请求中提交的任务参数。 |
result | array | 查询结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
total_count | integer | 结果总数。 |
offset | integer | 返回结果的偏移量,与请求中的 offset 对应。 |
items_count | integer | items 数组中的数量。 |
aggregated_metrics | object / null | 所有匹域名的整体聚合指标。本精简接口中该字段通常为 null。 |
items | array | 品牌提及数据列表。 |
items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
brand | string | 品牌名称,也是聚合指标对应的品牌标识。 |
location | integer | 聚合指标对应的地域代码。 |
language | string | 聚合指标对应的语言代码。 |
platform | string | 聚合指标对应的 LLM 平台。 |
metrics | object | 按指定条件聚合后的 LLM 指标。 |
metrics 字段
| 字段 | 类型 | 说明 |
|---|---|---|
mentions | integer | 目标品牌被 LLM 提及的总次数。 |
ai_search_volume | integer | 当前的 AI 搜索量指标。 |
状态码与错误处理
请根据响应中的以下字段判断请求是否成功:
status_codestatus_messagetasks_error
当 status_code 不等于 20000,或任务级 status_code 不等于 20000 时,应记录错误信息并执行重试、告警或人工处理。
实用场景
- 统计品牌在 ChatGPT 中的提及次数,识别品牌在生成式搜索结果中的可见度,制定 GEO 和优化策略。
- 对比多个竞争品牌的 LLM 提及表现,定位品牌声量差距,为竞品分析和市场定位提供依据。
- 按问题和答案范围筛选提及数据,区分品牌在哪类用户问题中更容易被推荐,优化 FAQ、产品页和知识。
- 使用
initial_dataset_filters排除低价值数据,聚合达到指定 AI 搜索量阈值的,提升分析结果的有效性。 - 通过
include_brands和exclude_brands定向查看品牌集合,构建品牌监测名单,降低批量分析和日报生成的处理成本。