主题
AI 优化 — LLM 提及次数最高的品牌类别(Lite)实时接口
POST /v3/ai_optimization/llm_mentions/top_mentioned_brand_categories_lite/live
本接口使用 POST 方法,请求路径为:
/v3/ai_optimization/llm_mentions/top_mentioned_brand_categories_lite/live
本接口是“LLM 提及次数最高的品牌类别”接口的简化版本,用于品牌类别汇总 LLM 提及指标,并返回被提及次数最高的品牌类别。结果与指定的目标、平台、地区和语言。
> 注意:品牌实体数据目前适用于 chat_gpt 平台。
接口信息
- 请求方法:
POST - 请求地址:
https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_brand_categories_lite/live - 请求格式:
application/json - 请求体格式:JSON 数组,最多 1 个任务对象 平台限流以认证说明中的 30/60/120 次/分钟规则为准- 单次请求任务数:1
- 预计执行时间:最长约 120 秒
所有 POST 请求数据使用 UTF-8 编码的 JSON 格式。任务参数放在通用请求数组中。
计费说明
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
响应体中的 cost 字段用于返回任务成本信息;如需进行账户余额或账单核对,请优使用响应头中的人民币扣费值。
请求参数
顶层参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
target | array | 是 | 目标实体数组,最多 10 个实体对象。每个实体只能一个 domain 或一个 keyword。 |
location_name | string | 否 | 搜索地区的完整名称。指定后无需再传 location_code。 |
location_code | integer | 否 | 搜索地区代码。未指定地区时默认使用 2840。 |
language_name | string | 否 | 搜索语言的完整名称。指定后无需再传 language_code。 |
language_code | string | 否 | 搜索语言代码。未指定语言时默认使用 en。 |
platform | string | 否 | 目标 LLM 平台。可选值: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_brand_categories | array | 否 | 返回指定的品牌类别。 |
exclude_brand_categories | array | 否 | 排除指定的品牌类别。 |
tag | string | 否 | 用户自定义任务标识,最长 255 个字符。响应中的 data 对象会原样返回该值。 |
> target 至少一个 domain_entity 或 keyword_entity,且 "search_filter"须设置为 "include"。
target
target 是目标实体数组,最多 10 个实体对象。每个实体可使用一个域名或一个。
示例:
json
[
{
"domain": "example.com",
"search_filter": "include",
"search_scope": ["any"],
"include_subdomains": false
},
{
"keyword": "bmw",
"search_filter": "include",
"search_scope": ["answer"],
"match_type": "partial_match"
}
]域名实体
域名实体用于指定目标域名。
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
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": "en.wikipedia.org",
"search_filter": "exclude",
"search_scope": ["sources"],
"include_subdomains": false
}实体
实体用于指定目标。
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
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。 |
match_type 说明:
word_match:对完整词组进行匹,也会匹前后或词组词的。partial_match:匹中出现的或片段。
实体示例:
json
{
"keyword": "bmw",
"search_filter": "include",
"search_scope": ["answer"],
"match_type": "partial_match"
}地区与语言
location_name
搜索地区的完整名称。传该参数后,无需传 location_code。
未指定地区时,默认使用 location_code: 2840。可通过以下接口获取可用地区及名称:
/v3/ai_optimization/llm_mentions/locations_and_languages
> chat_gpt 平台目前支持 United States。
location_code
搜索地区代码。传该参数后,无需传 location_name。
默认值:2840。可通过以下接口获取可用地区及代码:
/v3/ai_optimization/llm_mentions/locations_and_languages
> chat_gpt 平台目前支持地区代码 2840。
language_name
搜索语言的完整名称。传该参数后,无需传 language_code。
未指定语言时,默认使用 language_code: en。可通过以下接口获取可用语言及名称:
/v3/ai_optimization/llm_mentions/locations_and_languages
> chat_gpt 平台目前支持 English。
language_code
搜索语言代码。传该参数后,无需传 language_name。
默认值:en。可通过以下接口获取可用语言及代码:
/v3/ai_optimization/llm_mentions/locations_and_languages
> chat_gpt 平台目前支持 en。
platform
目标平台,可选值:
chat_gptgoogle
默认值:google。
品牌实体数据适用于 chat_gpt。该平台目前支持美国地区和英语,即:
json
{
"platform": "chat_gpt",
"location_code": 2840,
"language_code": "en"
}filters
用于对聚合后的结果进行过滤。最多可同时设置 8 个过滤条件,多个条件之间使用逻辑运算符 and 或 or。
支持的运算符:
=<>innot_inlikenot_likeilikenot_ilikematchnot_match
like 和 not_like 支持使用 % 匹任意长度的字符串空字符串。
示例:
json
[
["mentions", ">", 10],
"and",
["brand_category", "like", "%auto%"]
]initial_dataset_filters
用于在聚合前筛选原始 LLM 提及数据,只有符合条件的数据行会参与最终聚合。
最多可设置 8 个过滤条件,多个条件之间使用 and 或 or。支持的运算符与 filters 相同。
示例:
json
[
["ai_search_volume", ">", 10]
]limit
限制 items 数组中的结果数量。
- 最小值:
1 - 最大值:
1000 - 默认值:
100
internal_list_limit
限制以下数组的数量:
sources_domainsearch_results_domainbrand_entities_titlebrand_entities_category最小值:
1最大值:
10默认值:
5
order_by
设置结果排序规则。排序字段可使用与 filters 相同的字段。
排序格式为:
text
字段名,asc
字段名,desc:
asc:升序desc:降序
示例:
json
[
"mentions,desc",
"ai_search_volume,desc"
]单次请求最多设置 3 条排序规则。
offset
设置结果偏移量。
例如,设置为 10 时,将跳过前 10 条结果,从第 11 条结果开始返回。
- 默认值:
0 - 最大值:
1000000
include_brand_categories
返回指定的品牌类别。
示例:
json
[
"Automotive",
"Software"
]exclude_brand_categories
排除指定的品牌类别。
示例:
json
[
"News",
"Retail"
]tag
用户自定义任务标识,最长 255 个字符。可用于请求与响应,返回结果中的 data.tag 会保留该值。
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_brand_categories_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_brand_categories_lite/live"
)
payload = [
{
"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
}
]
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, timeout=150)
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_brand_categories_lite/live";
const payload = [
{
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, payload, {
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
})
.then((response) => {
// 处理接口响应
console.log(response.data);
})
.catch((error) => {
// 处理网络或接口错误
console.error(error.response?.data || error.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 字段
| 字段 | 类型 | 说明 |
|---|---|---|
total_count | integer | 结果总数。 |
offset | integer | 当前结果偏移量,与请求中的 offset 对应。 |
items_count | integer | 当前 items 数组中的数量。 |
aggregated_metrics | object/null | 汇总的 LLM 提及指标。对于本 Lite 接口,该字段通常为 null。 |
items | array | 品牌类别提及数据。 |
items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
brand_category | string | 品牌类别标识。 |
location | integer | 汇总指标对应的地区标识。 |
language | string | 汇总指标对应的语言标识。 |
platform | string | 汇总指标对应的 LLM 平台。 |
metrics | object | 按指定维度聚合后的 LLM 指标。 |
metrics 字段
| 字段 | 类型 | 说明 |
|---|---|---|
mentions | integer | LLM 提及总次数,即目标品牌类别在中被提及的次数。 |
ai_search_volume | integer | 当前 AI 搜索量指标。 |
响应示例
json
{
"version": "0.1.20260610",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2224 sec.",
"cost": 0.101,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2100 sec.",
"cost": 0.101,
"result_count": 1,
"path": [
"v3",
"ai_optimization",
"llm_mentions",
"top_mentioned_brand_categories_lite",
"live"
],
"data": {
"api": "ai_optimization",
"function": "top_mentioned_brand_categories_lite",
"target": [
{
"keyword": "bmw",
"search_scope": ["answer"]
}
],
"platform": "chat_gpt",
"language_code": "en",
"location_code": 2840,
"order_by": ["mentions,desc"],
"limit": 5,
"offset": 0,
"include_brand_categories": [],
"exclude_brand_categories": []
},
"result": [
{
"total_count": 1,
"offset": 0,
"items_count": 1,
"aggregated_metrics": null,
"items": [
{
"brand_category": "Automotive",
"location": 2840,
"language": "en",
"platform": "chat_gpt",
"metrics": {
"mentions": 128,
"ai_search_volume": 42
}
}
]
}
]
}
]
}状态码与错误处理
请根据顶层 status_code、任务级 status_code 和对应的 status_message 判断请求是否成功。
20000:请求成功。- 状态码:请求或任务执行失败,应结合
status_message进行错误定位。
建议客户端实现以下处理机制:
- 检查 HTTP 状态码及 JSON 响应是否完整。
- 检查顶层和任务级
status_code。 - 对时、网络异常和服务端错误进行重试或告警。
- 通过任务
id、tag记录和业务请求。 - 不要依赖 HTTP 状态码,应同时判断业务状态码。
实用场景
- 识别高频品牌类别:统计 LLM 回答中被提及次数最高的品牌类别,帮助 SEO 团队发现目标市场中的主要竞争类别。
- 对比品牌与覆盖范围:同时提交域名和实体,分析品牌在不同搜索范围中的 LLM 可见度,制定覆盖策略。
- 筛选高 AI 搜索量机会:使用
initial_dataset_filters保留 AI 搜索量较高的数据,优定位更增长潜力的品牌类别。 - 监测不同平台的品牌:分别查询
chat_gpt和google平台,比较品牌类别在不同 LLM 搜索环境中的提及表现。 - 构建品牌类别排行榜:结合
order_by、limit和offset分页获取排名数据,为品牌监测仪表盘和周期性 SEO 报告提供数据。