Skip to content

Live LLM 提及次数最高页面

POST /v3/ai_optimization/llm_mentions/top_mentioned_pages/live

本接口通过大语言模型(LLM)提及数据,按指定 target 统计被提及次数最高的页面,并返回页面级及多维度聚合指标。数据结果受平台、地区和语言参数影响。

  • 请求方法: POST
  • 接口路径: /v3/ai_optimization/llm_mentions/top_mentioned_pages/live
  • 完整 URL: https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_pages/live

本接口支持 google(Google AI 概览)和 chat_gpt(ChatGPT)平台。每次请求只能 1 个任务,单个任务最多设置 10 个目标实体。接口当前最长执行时间约为 120 秒。

所有 POST 请求使用 UTF-8 编码的 JSON 格式,并将任务参数放顶层 JSON 数组中。平台限流以认证说明中的 30/60/120 次/分钟规则为准。

计费说明

本接口按任务计费。示例响应中的 cost 为容字段,人民币扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

目标参数

参数类型说明
targetarray目标实体数组,最多 10 个对象。每个对象只能一个 domain 或一个 keyword。至少需要一个 search_filterinclude 的域名实体或实体。
domain_entityobject目标域名实体。
domainstring条件填目标域名。未指定 keyword 时填。最多 63 个字符;不得 https://www.
search_filterstring目标筛选方式,可选值:includeexclude。默认值:include
search_scopearray域名搜索范围,可选值:anysourcessearch_results。默认值:any。设置为 search_resultschat_gpt 平台提供数据。
include_subdomainsboolean是否目标域名的子域名。默认值:false
keyword_entityobject目标实体。
keywordstring条件填目标。未指定 domain 时填,最多 250 个字符。
match_typestring匹类型,可选值:word_matchpartial_match。默认值:word_match

match_type 说明:

  • word_match:匹与种子对应的词组,可前后或的词。
  • partial_match:匹中出现的或片段。

地区、语言和平台参数

参数类型说明
location_namestring搜索地区称。指定后无需指定 location_code。默认地区代码为 2840
location_codeinteger搜索地区代码。指定后无需指定 location_name。默认值:2840
language_namestring搜索语言称。指定后无需指定 language_code。默认语言代码为 en
language_codestring搜索语言代码。指定后无需指定 language_name。默认值:en
platformstring目标平台,可选值:chat_gptgoogle。未指定时返回两个平台的数据。

平台限制:

  • chat_gpt 支持美国(United States2840)。
  • chat_gpt 支持英语(Englishen)。
  • search_results 搜索范围适用于 chat_gpt

聚合和筛选参数

参数类型说明
links_scopestring链接来源范围,用于提取域名并进行聚合。可选值:sourcessearch_results。默认值:sources。设置为 search_resultschat_gpt 平台提供数据。
filtersarray聚合后的结果筛选条件,最多 8 个。多个条件之间使用逻辑运算符 andor
initial_dataset_filtersarray聚合前应用于原始提及数据的筛选条件,最多 8 个,可减少参与聚合的数据行。
limitintegeritems 数组最多返回的结果数。取值范围:11000,默认值:100
internal_list_limitinteger部数组最多返回的数,适用于 sources_domainsearch_results_domainbrand_entities_titlebrand_entities_category。取值范围:110,默认值:5
order_byarray结果排序规则,最多设置 3 条。排序字段可使用与 filters 相同的字段,并以逗号指定排序方式:ascdesc
offsetinteger结果偏移量。默认值:0,最大值:1000000。例如设置为 10 时,前 10 条结果将被跳过。
include_pagesarray返回指定页面。
exclude_pagesarray排除指定页面,不在 items 中返回。
tagstring自定义任务标识,最多 255 个字符。该值会原样返回在响应任务的 data 对象中。

支持的筛选和排序运算符:

=<>innot_inlikenot_likeilikenot_ilikematchnot_match

likenot_like 支持使用 % 匹任意长度的字符串。

筛选条件示例:

json
[
  ["ai_search_volume", ">", 10],
  "and",
  ["mentions", ">=", 5]
]

请求示例

curl

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_pages/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"
        }
      ],
      "links_scope": "sources",
      "initial_dataset_filters": [
        ["ai_search_volume", ">", 10]
      ],
      "limit": 5,
      "internal_list_limit": 2,
      "tag": "auto-llm-pages"
    }
  ]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_pages/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",
            },
        ],
        "links_scope": "sources",
        "initial_dataset_filters": [
            ["ai_search_volume", ">", 10],
        ],
        "limit": 5,
        "internal_list_limit": 2,
    }
]

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

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 response = await axios.post(
  "https://api.seermartech.cn/v3/ai_optimization/llm_mentions/top_mentioned_pages/live",
  [
    {
      language_code: "en",
      location_code: 2840,
      platform: "chat_gpt",
      target: [
        {
          keyword: "bmw",
          search_scope: ["answer"],
        },
        {
          keyword: "auto",
          search_scope: ["question"],
          match_type: "partial_match",
        },
      ],
      links_scope: "sources",
      initial_dataset_filters: [
        ["ai_search_volume", ">", 10],
      ],
      limit: 5,
      internal_list_limit: 2,
    },
  ],
  {
    headers: {
      Authorization: "Bearer smt_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
    timeout: 150000,
  }
);

if (response.data.status_code === 20000) {
  console.log(response.data);
} else {
  console.error(
    response.data.status_code,
    response.data.status_message
  );
}

响应结构

接口返回 JSON 对象 tasks 数组。

顶层响应字段

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

任务字段

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

结果字段

字段类型说明
total_countinteger与请求条件匹的结果总数。
offsetintegeritems 中被跳过的结果数量。
items_countinteger本次 items 数组返回的结果数。
aggregated_metricsobject所有页面的聚合提及指标。
itemsarray被提及次数最高的页面明细。

aggregated_metrics 字段

aggregated_metrics 按不同维度汇总所有

实用场景

  • 待补充具体业务场景

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