Skip to content

content_analysis/summary/live

POST /v3/content_analysis/summary/live

#分析摘要实时接口

本接口通过 POST /v3/content_analysis/summary/live 获取目标的引用数据摘要引用来源域名、感倾向、文本类别、页面类别、页面类型、国家和语言分布等信息。

每次请求最多提交 1 个任务。平台限流以认证说明中的 30/60/120 次/分钟规则为准,同时进行的请求数最多为 30。所有 POST 请求体使用 UTF-8 编码的 JSON 数组格式。

计费说明

本接口按请求计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

请求体是 JSON 数组:

json
[
  {
    "keyword": "logitech",
    "page_type": [
      "ecommerce",
      "news",
      "blogs",
      "message-boards",
      "organization"
    ],
    "internal_list_limit": 8,
    "positive_connotation_threshold": 0.5
  }
]

任务参数

参数类型说明
keywordstring目标。使用 UTF-8 编码。平台会将转换为小写格式。<br><br>如需匹完整短语,而不是独立,请使用双引号和反斜杠,例如:"keyword": "\"tesla palo alto\""
keyword_fieldsobject指定需要匹的字段,用于按过滤数据。支持的字段:titlemain_titleprevious_titlesnippet。<br><br>可同时指定多个字段。例如:<br>{"snippet": "\"logitech mouse\"", "main_title": "sale"}
page_typearray按页面类型过滤数据。可选值:ecommercenewsblogsmessage-boardsorganization
internal_list_limitinteger限制数组中的最大数量。适用于:top_domainstext_categoriespage_categoriescountrieslanguages。<br><br>默认值:1;最大值:20
positive_connotation_thresholdfloat正面感概率阈值,取值范围为 01。设置后,响应中的 connotation_types 只统计正面感概率大于或等于该阈值的引用。<br><br>默认值:0.4
sentiments_connotation_thresholdfloat感细分类别的概率阈值,取值范围为 01。设置后,响应中的 sentiment_connotations 只统计每种感概率大于或等于该阈值的引用。<br><br>默认值:0.4
initial_dataset_filtersarray在初始数据集阶段应用的过滤条件。过滤字段与 /v3/content_analysis/search/live 接口一致。<br><br>最多可同时设置 8 个过滤条件,并需要在条件之间指定逻辑运算符 andor。支持的运算符:regexnot_regex<<=>>==<>innot_inlikenot_likehashas_not。<br><br>likenot_like 支持使用 % 匹零个或多个字符。
rank_scalestring指定 rank 字段的计算和展示范围。<br><br>one_hundred:按 0–100 展示;<br>one_thousand:按 0–1000 展示。<br><br>默认值:one_thousand
tagstring用户自定义的任务标识,最长 255 个字符。可用于识别任务并与响应结果。提交的值会原样返回在响应的 data 对象中。

keyword_fields 示例

json
{
  "keyword_fields": {
    "snippet": "\"logitech mouse\"",
    "main_title": "sale"
  }
}

initial_dataset_filters 示例

过滤条件的字段应符合分析搜索接口支持的字段定义。示例:

json
{
  "initial_dataset_filters": [
    ["page_type", "=", "news"],
    "and",
    ["title", "like", "%logitech%"]
  ]
}

响应字段

接口返回 JSON 对象 tasks 数组。

顶层响应字段

字段类型说明
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请求 URL 路径。
dataobject本次请求中提交的任务参数。
resultarray任务结果数组。

result 字段

字段类型说明
typestring结果类型,固定为 content_analysis_summary
total_countinteger数据库中与请求条件的结果总数。
rankinteger引用目标的 URL 的排名汇总值,即所有引用目标 URL 的排名归一化总和。
top_domainsarray引用目标的主要域名及每个域名对应的引用数量。
sentiment_connotationsobject感细分类别及对应的引用数量。可能:anger(愤怒)、happiness(喜悦)、love(喜爱)、sadness(悲伤)、share(分享)、fun(趣味)。
connotation_typesobject感极性类别及对应的引用数量。可能:positive(正面)、negative(负面)、neutral(中性)。
text_categoriesarray文本类别及每个类别中的引用数量。完整类别列表可参考 /v3/content_analysis/categories/
page_categoriesarray页面类别及每个类别中的引用数量。完整类别列表可参考 /v3/content_analysis/categories/
page_typesobject页面类型及每种类型对应的引用数量。
countriesobject国家或地区代码及对应的引用数量。完整国家或地区列表可参考 /v3/content_analysis/locations/
languagesobject语言代码及对应的引用数量。完整语言列表可参考 /v3/content_analysis/languages/

请求示例

curl

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/content_analysis/summary/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "keyword": "logitech",
      "page_type": [
        "ecommerce",
        "news",
        "blogs",
        "message-boards",
        "organization"
      ],
      "internal_list_limit": 8,
      "positive_connotation_threshold": 0.5
    }
  ]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/content_analysis/summary/live"

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

payload = [
    {
        "keyword": "logitech",
        "page_type": [
            "ecommerce",
            "news",
            "blogs",
            "message-boards",
            "organization",
        ],
        "internal_list_limit": 8,
        "positive_connotation_threshold": 0.5,
    }
]

response = requests.post(url, headers=headers, json=payload)
result = response.json()

if result.get("status_code") == 20000:
    print(result)
else:
    print(
        "请求失败,状态码:%s,说明:%s"
        % (result.get("status_code"), result.get("status_message"))
    )

TypeScript

typescript
import axios from "axios";

const payload = [
  {
    keyword: "logitech",
    page_type: [
      "ecommerce",
      "news",
      "blogs",
      "message-boards",
      "organization",
    ],
    internal_list_limit: 8,
    positive_connotation_threshold: 0.5,
  },
];

axios
  .post(
    "https://api.seermartech.cn/v3/content_analysis/summary/live",
    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
{
  "version": "0.1.20220913",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "1.0290 sec.",
  "cost": 0.02003,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.9500 sec.",
      "cost": 0.02003,
      "result_count": 1,
      "path": [
        "v3",
        "content_analysis",
        "summary",
        "live"
      ],
      "data": {
        "api": "content_analysis",
        "function": "summary",
        "keyword": "logitech",
        "page_type": [
          "ecommerce",
          "news",
          "blogs",
          "message-boards",
          "organization"
        ],
        "internal_list_limit": 8,
        "positive_connotation_threshold": 0.5
      },
      "result": [
        {
          "type": "content_analysis_summary",
          "total_count": 1,
          "rank": 0,
          "top_domains": [],
          "sentiment_connotations": {
            "anger": 0,
            "happiness": 22868,
            "love": 175266,
            "sadness": 12076,
            "share": 0,
            "fun": 1309
          },
          "connotation_types": {
            "positive": 261992,
            "negative": 68043,
            "neutral": 108682
          },
          "text_categories": [
            {
              "category": "technology",
              "count": 66122
            },
            {
              "category": "business",
              "count": 62107
            }
          ],
          "page_categories": [
            {
              "category": "computer_hardware",
              "count": 14463
            },
            {
              "category": "consumer_electronics",
              "count": 14017
            }
          ],
          "page_types": {
            "blogs": 60789,
            "organization": 27201,
            "news": 270865,
            "message-boards": 33883,
            "ecommerce": 314434
          },
          "countries": {
            "US": 88807,
            "UA": 58655,
            "UN": 40394,
            "DE": 30334,
            "FR": 27221,
            "JP": 24619,
            "VN": 20387,
            "PL": 19671
          },
          "languages": {
            "en": 351137,
            "ja": 97085,
            "ru": 83271,
            "vi": 54182,
            "de": 53040,
            "fr": 45802,
            "es": 43180,
            "pl": 21421
          }
        }
      ]
    }
  ]
}

错误处理

请根据顶层或任务级别的 status_codestatus_message 判断请求是否成功。建议为以下设计异常处理机制:

  • HTTP 请求失败;
  • 顶层 status_code 不等于 20000
  • tasks_error 大于 0
  • 单个任务的 status_code 不等于 20000
  • 响应缺少 tasksresult 字段。

完整错误码列表请参考 /v3/appendix/errors

实用场景

  • 分析品牌的感分布,统计正面、负面和中性引用数量,为品牌口碑监测和提供依据。
  • 识别主要引用来源域名,定位高频提及目标的网站,为外链拓展、媒体合作和品牌评估提供线索。
  • 拆分在不同页面类型中的引用占比,比较新闻、博客、电商和论坛等渠道的表现,优化投放策略。
  • 对比不同国家和语言市场的引用,发现本地化 SEO 的重点市场和语言机会。
  • 按文本类别与页面类别聚合引用数据,判断的主题领域,选题、专题规划和搜索意图分析。

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