Skip to content

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
  }
]

任务参数

参数类型说明
targetarray目标实体数组,最多 10 个实体。每个实体只能一个 domain 或一个 keyword。请求至少需要一个 search_filterincludedomain_entitykeyword_entity
location_namestring搜索地域的完整名称。使用该参数时无需传 location_code。未指定时默认使用 location_code: 2840
location_codeinteger搜索地域代码。使用该参数时无需传 location_name,默认值为 2840
language_namestring搜索语言的完整名称。使用该参数时无需传 language_code
language_codestring搜索语言代码,默认值为 en
platformstring目标平台,可选值:chat_gptgoogle。默认值为 google
filtersarray在聚合结果上执行过滤。最多设置 8 个过滤条件。
initial_dataset_filtersarray在聚合前对原始提及数据进行过滤,用于限制参与聚合的数据行。最多设置 8 个过滤条件。
limitintegeritems 数组最多返回的结果数,范围为 11000,默认值为 100
internal_list_limitinteger限制数组的最大数,适用于 sources_domainsearch_results_domainbrand_entities_titlebrand_entities_category。范围为 110,默认值为 5
order_byarray结果排序规则,最多设置 3 个排序条件。
offsetinteger结果偏移量,默认值为 0,最大值为 1000000
include_brandsarray返回指定品牌。
exclude_brandsarray排除指定品牌。
tagstring用户自定义任务标识,最长 255 个字符。该值会原样返回在响应任务的 data 对象中。

地域和语言限制

platformchat_gpt 时支持以下组合:

  • location_name: United States
  • location_code: 2840
  • language_name: English
  • language_code: en

可通过以下接口获取支持的地域和语言列表:

/v3/ai_optimization/llm_mentions/locations_and_languages

target 参数

target 是目标实体数组,最多 10 个对象。每个对象可使用域名实体或实体。

域名实体:domain_entity

参数类型说明
domainstring条件填目标域名。当实体中未指定 keyword 时填,最长 63 个字符。域名不得 https://www.
search_filterstring域名过滤方式:includeexclude。默认值为 include
search_scopearray搜索范围,可选值:anysourcessearch_results。默认值为 any
include_subdomainsboolean是否将目标域名的子域名纳搜索。默认值为 false

示例:

json
{
  "domain": "example.com",
  "search_filter": "include",
  "search_scope": ["sources"],
  "include_subdomains": true
}

实体:keyword_entity

参数类型说明
keywordstring条件填目标。当实体中未指定 domain 时填,最长 250 个字符。
search_filterstring过滤方式:includeexclude。默认值为 include
search_scopearray搜索范围,可选值:anyquestionanswerbrand_entitiesfan_out_queries。默认值为 any
match_typestring匹方式:word_matchpartial_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 个过滤条件,多个条件之间需要使用逻辑运算符 andor

支持的运算符:

=<>innot_inlikenot_likeilikenot_ilikematchnot_match

likenot_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
              }
            }
          ]
        }
      ]
    }
  ]
}

顶层响应字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger请求整体状态码。
status_messagestring请求整体状态信息。
timestring请求执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorinteger执行失败的任务数。
tasksarray任务结果数组。

tasks 字段

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

result 字段

字段类型说明
total_countinteger结果总数。
offsetinteger返回结果的偏移量,与请求中的 offset 对应。
items_countintegeritems 数组中的数量。
aggregated_metricsobject / null所有匹域名的整体聚合指标。本精简接口中该字段通常为 null
itemsarray品牌提及数据列表。

items 字段

字段类型说明
brandstring品牌名称,也是聚合指标对应的品牌标识。
locationinteger聚合指标对应的地域代码。
languagestring聚合指标对应的语言代码。
platformstring聚合指标对应的 LLM 平台。
metricsobject按指定条件聚合后的 LLM 指标。

metrics 字段

字段类型说明
mentionsinteger目标品牌被 LLM 提及的总次数。
ai_search_volumeinteger当前的 AI 搜索量指标。

状态码与错误处理

请根据响应中的以下字段判断请求是否成功:

  • status_code
  • status_message
  • tasks_error

status_code 不等于 20000,或任务级 status_code 不等于 20000 时,应记录错误信息并执行重试、告警或人工处理。

实用场景

  • 统计品牌在 ChatGPT 中的提及次数,识别品牌在生成式搜索结果中的可见度,制定 GEO 和优化策略。
  • 对比多个竞争品牌的 LLM 提及表现,定位品牌声量差距,为竞品分析和市场定位提供依据。
  • 按问题和答案范围筛选提及数据,区分品牌在哪类用户问题中更容易被推荐,优化 FAQ、产品页和知识。
  • 使用 initial_dataset_filters 排除低价值数据,聚合达到指定 AI 搜索量阈值的,提升分析结果的有效性。
  • 通过 include_brandsexclude_brands 定向查看品牌集合,构建品牌监测名单,降低批量分析和日报生成的处理成本。

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