主题
LLM 提及聚合指标(实时)
接口说明
实时 LLM 提及聚合指标接口用于统计请求中 target 数组指定的或域名,在大模型结果中的聚合提及数据。
返回结果会受到以下参数影响:
platform:目标平台google:Google AI Overviewchat_gpt:ChatGPTlocation_name/location_code:地区language_name/language_code:语言
接口路径:
POST https://api.seermartech.cn/v3/ai_optimization/llm_mentions/aggregated_metrics/live
参考价约 ¥1.6160 / 次 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求说明
- 请求方法:
POST - 请求体格式:JSON 数组
[{ ... }] - 每分钟最多可发送 2000 次 API 调用
- 每次 Live LLM Mentions API 调用支持 1 个任务
- 当前该接口任务执行时间最长可达 120 秒
请求参数
顶层参数
| 字段名 | 类型 | 说明 |
|---|---|---|
target | array | 目标实体数组,填。最多可传 10 个实体对象。每个实体只能一个 domain 或一个 keyword 及参数。 |
location_name | string | 搜索地区名。可与 location_code 二选一;如已传此字段,则无需传 location_code。默认使用 2840。可通过 /v3/ai_optimization/llm_mentions/locations_and_languages 获取可用地区列表。注意:chat_gpt 支持 United States。 |
location_code | integer | 搜索地区代码。可与 location_name 二选一。默认值:2840。可通过 /v3/ai_optimization/llm_mentions/locations_and_languages 获取可用地区列表。注意:chat_gpt 支持 2840。 |
language_name | string | 搜索语言名。可与 language_code 二选一;如已传此字段,则无需传 language_code。默认使用 en。可通过 /v3/ai_optimization/llm_mentions/locations_and_languages 获取可用语言列表。注意:chat_gpt 支持 English。 |
language_code | string | 搜索语言代码。可与 language_name 二选一。默认值:en。可通过 /v3/ai_optimization/llm_mentions/locations_and_languages 获取可用语言列表。注意:chat_gpt 支持 en。 |
platform | string | 目标平台,可选值:chat_gpt、google。默认值:google。不同平台返回的数据不同。注意:chat_gpt 支持美国英语数据。 |
initial_dataset_filters | array | 聚合前过滤条件数组,可选。用于过滤原始提及数据,再进行聚合统计。最多支持 8 个过滤条件,多个条件之间应使用逻辑运算符 and / or 连接。支持操作符:=、<>、in、not_in、like、not_like、ilike、not_ilike、match、not_match。like / not_like 支持 % 通任意长度字符串。可用过滤字段请参考 /v3/ai_optimization/llm_mentions/filters。 |
internal_list_limit | integer | 部数组数量上限,可选。影响以下字段返回数量:sources_domain、search_results_domain。取值范围:1 到 20,默认值:10。 |
tag | string | 自定义任务标识,可选,最长 255 个字符。可用于请求与响应结果对账,返回时会出现在响应的 data 对象中。 |
target 实体参数
target 中的每个对象是以下两种之一:
- 域名实体
domain_entity - 实体
keyword_entity
域名实体 domain_entity
示例:
json
{
"domain": "en.wikipedia.org",
"search_filter": "exclude",
"search_scope": ["sources"]
}| 字段名 | 类型 | 说明 |
|---|---|---|
domain | string | 目标域名。如果未传 keyword,则该字段填。最长 63 个字符。域名中不要带 https:// 和 www.。 |
search_filter | string | 域名搜索过滤方式,可选值:include、exclude。默认值:include。 |
search_scope | array | 域名搜索范围,可选值:any、sources、search_results。默认值:any。 |
include_subdomains | boolean | 是否将目标域名的子域名纳搜索,可选。设为 true 时会子域名。默认值:false。 |
实体 keyword_entity
示例:
json
{
"keyword": "bmw",
"search_filter": "include",
"search_scope": ["answer"],
"match_type": "partial_match"
}| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 目标。如果未传 domain,则该字段填。最长 250 个字符。所有 %## 会被解码,字符 + 会被解码为空格。如需传字面量 %,请写为 %25;如需传字面量 +,请写为 %2B。 |
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、partial_match。默认值:word_match。 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/aggregated_metrics/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"language_code": "es",
"location_code": 2840,
"platform": "google",
"target": [
{
"domain": "en.wikipedia.org",
"search_filter": "exclude"
},
{
"keyword": "bmw",
"search_scope": ["answer"]
}
],
"initial_dataset_filters": [
["ai_search_volume", ">", 10]
],
"internal_list_limit": 10
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/aggregated_metrics/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
payload = [
{
"language_code": "es",
"location_code": 2840,
"platform": "google",
"target": [
{
"domain": "en.wikipedia.org",
"search_filter": "exclude"
},
{
"keyword": "bmw",
"search_scope": ["answer"]
}
],
"initial_dataset_filters": [
["ai_search_volume", ">", 10]
],
"internal_list_limit": 10
}
]
response = requests.post(url, headers=headers, json=payload, timeout=180)
print(response.json)TypeScript
typescript
import axios from "axios";
async function run {
const response = await axios.post(
"https://api.seermartech.cn/v3/ai_optimization/llm_mentions/aggregated_metrics/live",
[
{
language_code: "es",
location_code: 2840,
platform: "google",
target: [
{
domain: "en.wikipedia.org",
search_filter: "exclude",
},
{
keyword: "bmw",
search_scope: ["answer"],
},
],
initial_dataset_filters: [
["ai_search_volume", ">", 10]
],
internal_list_limit: 10,
},
],
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
timeout: 180000,
}
);
console.log(response.data);
}
run.catch(console.error);响应结构
接口返回 JSON,顶层 tasks 数组。
顶层响应字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码。完整错误码请参考 /v3/appendix/errors。建议在系统中做好异常与错误处理。 |
status_message | string | 通用状态信息 |
time | string | 执行时间,单位秒 |
cost | float | 本次请求总费用,单位 USD |
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 |
result_count | integer | result 数组中的数量 |
path | array | URL 路径 |
data | object | 与请求中提交的参数一致 |
result | array | 结果数组 |
结果字段说明
result[] 中主要以下字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
total | object | 聚合提及指标汇总。汇总所有命中的域名,并按多个维度分组统计。 |
location | array | 按地区分组的提及指标 |
language | array | 按语言分组的提及指标 |
platform | array | 按平台分组的提及指标 |
sources_domain | array | 与目标最的来源域名,即在 LLM 响应中被引用为来源的网站 |
search_results_domain | array | 与目标、出现在搜索结果中的顶级域名 |
brand_entities_title | array | 与目标的品牌实体标题数据 |
brand_entities_category | array | 与目标的品牌实体分类数据 |
items | array | 页面级明细结果。该接口中该字段为 null。 |
通用分组字段
以下数组中的结构一致:
locationlanguageplatformsources_domainsearch_results_domainbrand_entities_titlebrand_entities_category
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 group_element |
key | string | 分组键值,不同数组含义不同,例如地区、语言、平台、域名、品牌实体标题或分类 |
mentions | integer | LLM 提及次数,即目标或域名与该分组键的总提及量 |
ai_search_volume | integer | 当前的 AI 搜索量指标 |
impressions | integer | 已废弃字段,返回值始终为 null |
各分组维度含义
location:按地理位置统计提及language:按语言统计提及platform:按 AI 平台统计提及sources_domain:统计在 LLM 响应中被引用为来源的域名search_results_domain:统计与 LLM 查询的搜索结果域名brand_entities_title:统计品牌实体标题brand_entities_category:统计品牌实体分类
响应示例
json
{
"version": "0.1.20251208",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.9593 sec.",
"cost": 0.101,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "c1a11111-2222-3333-4444-555555555555",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.9231 sec.",
"cost": 0.101,
"result_count": 1,
"path": [
"v3",
"ai_optimization",
"llm_mentions",
"aggregated_metrics",
"live"
],
"data": {
"api": "ai_optimization",
"function": "aggregated_metrics",
"language_code": "es",
"location_code": 2840,
"platform": "google",
"target": [
{
"domain": "en.wikipedia.org",
"search_filter": "exclude"
},
{
"keyword": "bmw",
"search_scope": ["answer"]
}
],
"internal_list_limit": 10
},
"result": [
{
"total": {
"location": [
{
"type": "group_element",
"key": "United States",
"mentions": 124,
"ai_search_volume": 980,
"impressions": null
}
],
"language": [
{
"type": "group_element",
"key": "Spanish",
"mentions": 124,
"ai_search_volume": 980,
"impressions": null
}
],
"platform": [
{
"type": "group_element",
"key": "google",
"mentions": 124,
"ai_search_volume": 980,
"impressions": null
}
],
"sources_domain": [
{
"type": "group_element",
"key": "example.com",
"mentions": 27,
"ai_search_volume": 980,
"impressions": null
}
],
"search_results_domain": null,
"brand_entities_title": null,
"brand_entities_category": null
},
"items": null
}
]
}
]
}错误处理
- 顶层
status_code表示整次请求的处理结果 tasks[].status_code表示单个任务结果- 建议同时校验:
- HTTP 状态码
- 顶层
status_code tasks[].status_code
常见错误码、状态说明可参考:
/v3/appendix/errors
使用建议
target最多支持 10 个实体,适合对一组品牌词、竞品词或重点域名做集中聚合分析。- 如需更精确控制统计范围,建议结合
initial_dataset_filters过滤原始数据。 - 若来源站点或搜索结果域名,可通过
internal_list_limit控制返回列表长度,降低结果体积。 - 如果使用
chat_gpt平台,请确保地区为美国、语言为英语,否则可能无法返回有效数据。
实用场景
- 评估品牌在 AI 答案中的度:按或品牌域名统计
mentions与ai_search_volume,衡量品牌在 AI 搜索生态中的可见性。 - 筛选高价值引用来源站点:分析
sources_domain,识别最常被大模型引用的网站,为外链和合作提供依据。 - 对比不同平台的提及差异:分别查询
google与chat_gpt,观察同一目标在不同 AI 平台中的表现,优化多平台策略。 - 定位重点市场与语言机会:利用
location、language聚合结果,识别提及度更高的国家和语言,为 SEO 与本地化投放提供方向。 - 监控竞品或行业词的 AI 占位:将自家品牌词与竞品词一起放
target,快速比较谁在 AI 回答与来源中更占优势。