Skip to content

merchant/amazon/reviews/task_get/html

获取 Amazon Reviews HTML 结果

接口方法与路径:

http
GET https://api.seermartech.cn/v3/merchant/amazon/reviews/task_get/html/$id

根据任务 ID 获取 Amazon 商品评论页面的 HTML 结果及数据。

计费说明

  • 在提交任务时计费。
  • 任务完成后,可在 7 天获取结果
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
  • 任务 ID须在有效期使用。

请求参数

该接口通过 URL 路径传任务 ID,不需要请求体。

参数类型说明
idstring任务唯一标识,UUID 格式。任务提交后可在 7 天使用该 ID 获取结果。

响应结构

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

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用响应状态码。可参考错误码文档。
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任务结果数组。

data 字段

data含提交任务时使用的参数,例如:

字段类型说明
se_typestring搜索引擎类型,例如 reviews
apistringAPI 类型,例如 merchant
functionstring功能名称,例如 reviews
sestring搜索引擎名称,例如 amazon
language_codestring语言代码。
location_codeinteger地区代码。
asinstringAmazon 商品 ASIN。
priorityinteger任务优级。
depthinteger抓取深度或页数。
devicestring设备类型,例如 desktop
osstring操作系统,例如 windows

result 数组中的字段

字段类型说明
product_idstringPOST 请求中提交的 ASIN。
typestringPOST 请求中提交的搜索引擎类型。
se_domainstringPOST 请求中提交的搜索引擎域名。
location_codeintegerPOST 请求中提交的地区代码。
language_codestringPOST 请求中提交的语言代码。
datetimestring获取结果的日期和时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
items_countintegeritems 数组中的结果数量。
itemsarrayHTML 页面及数据。

items 数组中的字段

字段类型说明
pageinteger返回的 HTML 页面序号。
datestringHTML 页面扫描时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。例如:2019-11-15 12:57:46 +00:00
htmlstringAmazon 评论页面的 HTML。

请求示例

cURL

bash
id="04171455-0696-0192-0000-4c69cc29b945"

curl --location --request GET \
  "https://api.seermartech.cn/v3/merchant/amazon/reviews/task_get/html/${id}" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json"

TypeScript

typescript
import axios from "axios";

const taskId = "02201115-0001-0066-0000-c06c8f23fce5";

axios
  .get(
    `https://api.seermartech.cn/v3/merchant/amazon/reviews/task_get/html/${taskId}`,
    {
      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);
  });

Python

python
import requests

task_id = "04171455-0696-0192-0000-4c69cc29b945"

url = (
    "https://api.seermartech.cn"
    f"/v3/merchant/amazon/reviews/task_get/html/{task_id}"
)

response = requests.get(
    url,
    headers={
        "Authorization": "Bearer smt_live_YOUR_KEY",
        "Content-Type": "application/json",
    },
    timeout=60,
)

if response.ok:
    data = response.json()
    print(data)
else:
    print(f"请求失败:HTTP {response.status_code}{response.text}")

响应示例

json
{
  "version": "0.1.20220407",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1455 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "04171455-0696-0192-0000-4c69cc29b945",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1200 sec.",
      "cost": 0,
      "result_count": 1,
      "path": [
        "/v3/merchant/amazon/reviews/task_get/html/04171455-0696-0192-0000-4c69cc29b945"
      ],
      "data": {
        "se_type": "reviews",
        "api": "merchant",
        "function": "reviews",
        "se": "amazon",
        "language_code": "en_US",
        "location_code": 2840,
        "asin": "B0773ZY26F",
        "priority": 2,
        "depth": 10,
        "device": "desktop",
        "os": "windows"
      },
      "result": [
        {
          "product_id": "B0773ZY26F",
          "type": "reviews",
          "se_domain": "amazon.com",
          "location_code": 2840,
          "language_code": "en_US",
          "datetime": "2019-11-15 12:57:46 +00:00",
          "items_count": 1,
          "items": [
            {
              "page": 1,
              "date": "2019-11-15 12:57:46 +00:00",
              "html": "<html>...</html>"
            }
          ]
        }
      ]
    }
  ]
}

状态码与异常处理

建议客户端对以下字段进行判断:

  1. 检查顶层 status_code 是否为 20000
  2. 再检查 tasks 中每个任务的 status_code
  3. 当任务状态码表示错误,或 result 为空时,应读取对应的 status_message
  4. 对网络时、HTTP 错误、任务过期和结果为空等进行重试或异常记录。

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

实用场景

  • 抓取商品评论 HTML:获取指定 ASIN 的评论页面原始,为评论文本解析、评分统计和主题抽取提供数据基础。
  • 监控竞品口碑变化:定期获取竞品商品评论页面,比较评分、评论数量和用户反馈变化,竞品分析。
  • 提取用户需求与痛点:解析 HTML 中的评论,识别高频问题和购买动机,支持产品优化与策划。
  • 构建评论数据仓库:按商品、地区、语言和页面保存 HTML 结果,形成可追溯的评论历史数据。
  • 验证评论采集结果:通过 datetimepageitems_count 检查页面抓取时间、分页完整性及返回数量,提升数据质量。

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