Skip to content

实时 LLM 提及搜索

POST /v3/ai_optimization/llm_mentions/search_mentions/live

本接口用于实时获取 AI 搜索中的品牌、域名或提及数据,以及搜索结果和指标。结果会根据目标平台、搜索位置和语言返回:

  • google:Google AI Overview 数据
  • chat_gpt:ChatGPT 数据

请求方法与路径:POST /v3/ai_optimization/llm_mentions/search_mentions/live

请求使用 UTF-8 编码的 JSON 格式。平台限流以认证说明中的 30/60/120 次/分钟规则为准。单个任务最多 10 个目标实体。

> 任务执行时间最长约为 120 秒。

计费说明

原始文档未提供固定单价。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

请求体是 JSON 数组,任务参数放在数组中:

json
[
  {
    "target": [
      {
        "domain": "example.com",
        "search_filter": "exclude"
      },
      {
        "keyword": "bmw",
        "search_scope": ["answer"]
      }
    ],
    "language_name": "English",
    "location_code": 2840,
    "platform": "google",
    "filters": [
      ["ai_search_volume", ">", 1000]
    ],
    "order_by": [
      "ai_search_volume,desc"
    ],
    "offset": 0,
    "limit": 3,
    "tag": "brand-monitoring-demo"
  }
]

顶层参数

参数类型说明
targetarray目标实体数组,最多 10 个实体对象。每个实体只能指定一个 domain 或一个 keyword。请求至少需要一个 search_filterinclude 的域名实体或实体。
location_namestring搜索位置的完整名称。指定后无需指定 location_code。未指定时默认使用 location_code=2840
location_codeinteger搜索位置代码。指定后无需指定 location_name。默认值为 2840
language_namestring搜索语言的完整名称。指定后无需指定 language_code。未指定时默认使用 language_code=en
language_codestring搜索语言代码。指定后无需指定 language_name。默认值为 en
platformstring目标平台。可选值:googlechat_gpt。未指定时返回两个平台的数据。
filtersarray结果过滤条件,最多同时设置 8 个过滤条件。
order_byarray结果排序规则,最多设置 3 条。
offsetinteger结果偏移量,默认值为 0,最大值为 1000000
search_after_tokenstring分页令牌,用于获取后续结果。使用该参数时,请求参数与上一次请求一致。
limitinteger最多返回的结果对象数量,默认值为 100,最大值为 1000
tagstring用户自定义任务标识,最长 255 个字符。该值会原样返回在响应的 data 对象中。

平台、位置和语言限制

chat_gpt 数据目前支持:

  • 位置:United States,位置代码 2840
  • 语言:English,语言代码 en

可通过以下接口查询可用的位置和语言:

text
GET /v3/ai_optimization/llm_mentions/locations_and_languages

target 参数

target 是目标实体的数组。每个实体是以下两种类型之一:

  • 域名实体:domain_entity
  • 实体:keyword_entity

域名实体

json
{
  "domain": "example.com",
  "search_filter": "exclude",
  "search_scope": ["any"],
  "include_subdomains": false
}
参数类型说明
domainstring条件填目标域名。不指定 keyword 时填,最长 63 个字符。域名中不要 https://www.
search_filterstring域名过滤方式。可选值:includeexclude。默认值为 include
search_scopearray域名搜索范围。可选值:anysourcessearch_results。默认值为 any。使用 search_resultschat_gpt 平台支持。
include_subdomainsboolean是否目标域名的子域名。默认值为 false

实体

json
{
  "keyword": "bmw",
  "search_filter": "include",
  "search_scope": ["answer"],
  "match_type": "partial_match"
}
参数类型说明
keywordstring条件填目标。不指定 domain 时填,最长 250 个字符。
search_filterstring过滤方式。可选值:includeexclude。默认值为 include
search_scopearray搜索范围。可选值:anyquestionanswerbrand_entitiesfan_out_queries。默认值为 any
match_typestring匹方式。可选值:word_matchpartial_match。默认值为 word_match

match_type 匹方式

  • word_match:匹,可匹前后或短语单词的结果。例如搜索 light,可返回 light bulblight switch
  • partial_match:子字符串匹,只要结果指定字符序列即可。例如搜索 light,可返回 lightinghighlight

过滤与排序

filters

过滤条件使用数组表示:

json
[
  ["ai_search_volume", ">", 1000]
]

支持的运算符:

  • =
  • <>
  • in
  • not_in
  • like
  • not_like
  • ilike
  • not_ilike
  • match
  • not_match

多个过滤条件之间使用逻辑运算符 andorlikenot_like 支持使用 % 匹任意长度的字符串。

示例:

json
[
  ["platform", "=", "google"],
  "and",
  ["ai_search_volume", ">", 1000]
]

order_by

排序规则使用“字段名,排序方向”的格式:

json
[
  "ai_search_volume,desc",
  "rank,asc"
]

排序方向支持:

  • asc:升序
  • desc:降序

单个请求最多设置 3 条排序规则,多个排序规则使用数组分隔。

分页参数

使用 offset

offset 用于跳过指定数量的结果。例如:

json
{
  "offset": 10,
  "limit": 100
}

表示跳过前 10 条结果,从后续结果开始返回。offset 最大值为 1000000。如果需要获取更多结果,建议使用 search_after_token,以减少请求时风险。

使用 search_after_token

响应中会返回 search_after_token。将该令牌用于下一次请求即可获取当前任务的后续结果:

json
{
  "search_after_token": "eyJzZWFyY2h..."
}

使用令牌时确保以下参数与上一次请求保持一致:

  • target
  • 位置参数
  • 语言参数
  • platform
  • filters
  • order_by
  • 任务设置

每个后续任务都会生成唯一的 search_after_token

请求示例

cURL

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/search_mentions/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "language_name": "English",
      "location_code": 2840,
      "target": [
        {
          "domain": "example.com",
          "search_filter": "exclude"
        },
        {
          "keyword": "bmw",
          "search_scope": ["answer"]
        }
      ],
      "platform": "google",
      "filters": [
        ["ai_search_volume", ">", 1000]
      ],
      "order_by": [
        "ai_search_volume,desc"
      ],
      "limit": 3
    }
  ]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/search_mentions/live"

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
}

post_data = [
    {
        "language_name": "English",
        "location_code": 2840,
        "target": [
            {
                "domain": "example.com",
                "search_filter": "exclude",
            },
            {
                "keyword": "bmw",
                "search_scope": ["answer"],
            },
        ],
        "platform": "google",
        "filters": [
            ["ai_search_volume", ">", 1000],
        ],
        "order_by": [
            "ai_search_volume,desc",
        ],
        "limit": 3,
    }
]

response = requests.post(url, headers=headers, json=post_data, timeout=150)
response.raise_for_status()

result = response.json()
print(result)

TypeScript

typescript
import axios from "axios";

const response = await axios.post(
  "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/search_mentions/live",
  [
    {
      language_name: "English",
      location_code: 2840,
      target: [
        {
          domain: "example.com",
          search_filter: "exclude",
        },
        {
          keyword: "bmw",
          search_scope: ["answer"],
        },
      ],
      platform: "google",
      filters: [["ai_search_volume", ">", 1000]],
      order_by: ["ai_search_volume,desc"],
      limit: 3,
    },
  ],
  {
    headers: {
      Authorization: "Bearer smt_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
    timeout: 150000,
  }
);

console.log(response.data);

响应结构

接口返回 JSON 数据,顶层 tasks 数组。

json
{
  "version": "0.1.20260610",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "1.5075 sec.",
  "cost": 0.103,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "1.5070 sec.",
      "cost": 0.103,
      "result_count": 1,
      "path": [
        "v3",
        "ai_optimization",
        "llm_mentions",
        "search_mentions",
        "live"
      ],
      "data": {
        "api": "ai_optimization",
        "function": "search_mentions",
        "language_name": "English",
        "location_code": 2840,
        "target": [
          {
            "keyword": "bmw",
            "search_filter": "include"
          }
        ],
        "platform": "google",
        "limit": 3
      },
      "result": [
        {
          "total_count": 3,
          "current_offset": 0,
          "search_after_token": "eyJzZWFyY2h...",
          "items_count": 3,
          "items": [
            {
              "platform": "google",
              "model_name": "google_ai_overview",
              "location_code": 2840,
              "language_code": "en",
              "question": "bmw",
              "answer": "AI 搜索生成的回答,使用 Markdown 格式返回。",
              "sources": [],
              "search_results": null,
              "ai_search_volume": 1500000,
              "monthly_searches": [],
              "first_response_at": "2025-11-09 04:05:50 +00:00",
              "last_response_at": "2026-05-14 18:17:26 +00:00",
              "brand_entities": null,
              "fan_out_queries": null,
              "is_web_search_based": true
            }
          ]
        }
      ]
    }
  ]
}

响应字段

顶层响应字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用状态码。成功时通常为 20000
status_messagestring通用状态信息。
timestring请求执行时间,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorintegertasks 数组中返回错误的任务数。
tasksarray任务结果数组。

tasks 字段

字段类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger任务状态码,通常位于 1000060000 范围。
status_messagestring任务状态信息。
timestring任务执行时间,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量。
patharray请求 API 路径。
dataobject本次 POST 请求中提交的任务参数。
resultarray结果数组。

result 字段

字段类型说明
total_countinteger与请求条件匹的结果总数。
current_offsetintegeritems 数组之前被跳过的提及对象数量。
search_after_tokenstring获取后续结果的分页令牌。
items_countinteger本次 items 数组返回的结果数量。
itemsarray提及数据数组。

items 字段

字段类型说明
platformstring返回数据所属平台。
model_namestring生成数据的 AI 模型名称。对于 google 平台,固定为 google_ai_overview
location_codeinteger请求中指定的位置代码。
language_codestring请求中指定的语言代码。
questionstring问题或搜索。
answerstringAI 生成的回答,使用 Markdown 格式。
sourcesarray模型在最终回答中引用或依赖的来源。
search_resultsarray/null模型检索到的网页搜索结果重复结果和未使用结果。 chat_gpt 支持。
ai_search_volumeinteger当前的 AI 搜索量指标。
monthly_searchesarray按月份统计的 AI 搜索量。
first_response_atstring首次记录响应数据的时间,UTC 格式。
last_response_atstring最近更新响应数据的时间,UTC 格式。
brand_entitiesarray/null回答中提及的品牌实体。 chat_gpt 支持。
fan_out_queriesarray/null根据主查询扩展出的搜索查询。 chat_gpt 支持。
is_web_search_basedboolean是否基于网页搜索生成回答。true 表示模型检索了实时网页结果,false 表示回答基于模型知识。

sources 字段

sources含模型引用或依赖的来源页面。

字段类型说明
snippetstring来源页面摘要。
source_namestring来源名称。
thumbnailstring/null来源缩略图地址。
markdownstring/null来源的 Markdown 表示。
rankinteger来源在结果中的排名。
titlestring来源标题。
domainstring来源域名。
urlstring来源 URL。
publication_datestring/null发布时间,格式为 YYYY-MM-DD HH:MM:SS +UTC偏移,例如 2019-11-15 12:57:46 +00:00

search_results 字段

该字段适用于 chat_gpt,表示模型为生成回答而检索到的网页搜索输出。

字段类型说明
descriptionstring搜索结果描述。
breadcrumbstring页面面屑。
rankinteger搜索结果排名。
titlestring搜索结果标题。
domainstring搜索结果域名。
urlstring搜索结果 URL。
publication_datestring/null搜索结果发布时间,格式为 YYYY-MM-DD HH:MM:SS +UTC偏移

monthly_searches 字段

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger对应月份的 AI 搜索量。

brand_entities 字段

该字段适用于 chat_gpt,用于返回回答中识别到的品牌实体。

字段类型说明
rankinteger品牌实体排名。
titlestring品牌名称。
categorystring品牌所属类别。

fan_out_queries 字段

该字段适用于 chat_gpt,从主查询扩展出的查询,用于帮助模型生成更的回答。字段结构以响应为准。

状态码与异常处理

请根据顶层和任务级别的 status_code 判断请求是否成功:

  • 20000:请求成功
  • 状态码:请求或任务执行异常

建议同时检查:

  • 顶层 status_code
  • 任务级 tasks[].status_code
  • tasks_error
  • status_message

完整错误码请参考错误码文档。

实用场景

  • 监测品牌在 Google AI Overview 和 ChatGPT 中的提及,评估品牌在生成式搜索中的可见度。
  • 对比竞争品牌的回答引用来源,识别可争取的外部权威页面和缺口。
  • 筛选 AI 搜索量较高的,优优化高潜力问题页、产品页和知识库。
  • 分析 questionanswerfan_out_queries,扩展 SEO主题和长尾问题覆盖范围。
  • 结合 first_response_atlast_response_at 跟踪 AI 回答及引用来源的变化,支持生成式搜索效果复盘。

统一入口:官网 · LLM API · 控制台