Skip to content

按任务 ID 获取 Amazon 评论结果(高级版)

本接口使用 GET 方法,通过任务 ID 获取指定 Amazon 商品的评论结果:

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

接口返回指定 asin 商品的评论数据商品标题、图片、评分、评论、用户资料、评论发布时间等。结果与创建任务时提交的参数对应。

系统会尽可能准确地模拟指定参数下的搜索结果。可以通过返回的 check_url 在无痕模式下访问原始结果页面,用于核验数据性。用户偏好、搜索历史及个性化因素不会纳结果。

计费说明

  • 在创建任务时计费。
  • 任务创建后 30 天,可重复获取任务结果。
  • 任务读取接口本身不额外扣费。
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

接口通过路径参数接收任务 ID。

参数类型说明
idstring任务唯一标识符,UUID 格式。任务创建成功后返回,可在 30 天使用该 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搜索结果数组。

建议客户端根据顶层和任务级 status_codestatus_message 处理异常。

result 数组中的字段

字段类型说明
asinstring创建任务时提交的 ASIN。
typestring创建任务时提交的搜索引擎类型。
se_domainstring创建任务时提交的搜索引擎域名。
location_codeinteger创建任务时提交的地区代码。
language_codestring创建任务时提交的语言代码。
check_urlstring搜索结果页面的直接 URL,可用于核验结果准确性。
datetimestring获取结果的日期和时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。示例:2019-11-15 12:57:46 +00:00
spellobject/null搜索引擎自动纠错信息。该接口通常返回 null
titlestringAmazon 商品标题,即收集评论的商品名称。
imageobject/null商品图片信息。
ratingobject/null商品整体评分信息。
item_typesarrayAmazon 搜索结果中的结果类型,可能 amazon_review_item
items_countintegeritems 数组中的评论数量。
itemsarray获取到的评论列表。可在创建任务时增加 depth 参数以获取更多评论。

image 字段

字段类型说明
typestring素类型,固定为 images_element
altstring图片的 alt 属性。
urlstring图片 URL。
image_urlstring结果中展示的商品图片 URL。

商品 rating 字段

字段类型说明
typestring素类型,固定为 rating_element
positionstring评分在搜索结果中的对齐位置,可为 leftright
rating_typestring评分类型,可为 Max5PercentsCustomMax
valuefloat基于评论计算的平均评分。
votes_countinteger评分票数。
rating_maxinteger当前评分类型的最大值。
reviews_countinteger商品评论总数。

items 中的评论字段

字段类型说明
typestring评论类型,通常为 amazon_review_item
rank_groupinteger在相同 type 结果组中的位置。不同类型结果不会计此排名。
rank_absoluteinteger评论在评论列表中的绝对排名。
positionstring评论在搜索结果中的对齐位置,可为 right
xpathstring评论对应的 XPath。
verifiedboolean是否带有“已验证购买”标记。
subtitlestring评论副标题,通常评论地区和日期。
helpful_votesinteger/null评论获得的“有帮助”投票数。
imagesarray/null评论提交的商品图片。
videosarray/null评论提交的视频。
user_profileobject评论的用户资料。
titlestring评论标题。
urlstring评论页 URL。
review_textstring评论正文。
publication_datestring评论发布时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
ratingobject评论提交的评分。

评论 images 字段

字段类型说明
typestring素类型,固定为 images_element
altstring图片的 alt 属性。
urlstring图片 URL。
image_urlstring评论中展示的商品图片 URL。

评论 videos 字段

字段类型说明
typestring素类型,固定为 video_element
sourcestring视频源 URL。
previewstring视频预览图 URL。

user_profile 字段

字段类型说明
namestring评论名称。
avatarstring评论头像 URL。
urlstring评论个人资料页 URL。
reviews_countinteger/null评论提交的评论总数。
locationsstring/null评论所在国家或地区。

评论 rating 字段

字段类型说明
rating_typestring评分类型,通常为 Max5
valuefloat评论给出的评分值。
votes_countinteger/null该评分获得的反馈数量,此接口通常返回 null
rating_maxinteger评分最大值;Max5 类型的最大值为 5

Sandbox 测试

可使用 Sandbox 获取该接口支持的字段。Sandbox 返回的数据为模拟数据,不会产生费用:

https://sandbox.seermartech.cn/v3/merchant/amazon/reviews/task_get/advanced/00000000-0000-0000-0000-000000000000

请求示例

curl

bash
id="04011058-0696-0199-0000-2196151a15cb"

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

PHP

php
<?php

require('RestClient.php');

$api_url = 'https://api.seermartech.cn/';
$client = new RestClient($api_url, [
    'Authorization' => 'Bearer smt_live_YOUR_KEY',
    'Content-Type' => 'application/json'
]);

try {
    // 使用任务创建接口返回的任务 ID 获取结果
    $id = '06141103-2692-0309-1000-980b778b6d25';

    $result = $client->get(
        '/v3/merchant/amazon/reviews/task_get/advanced/' . $id
    );

    print_r($result);
    // 在此处处理返回结果
} catch (RestClientException $e) {
    echo "HTTP code: {$e->getHttpCode()}\n";
    echo "Error code: {$e->getCode()}\n";
    echo "Message: {$e->getMessage()}\n";
}

$client = null;
?>

TypeScript

typescript
import axios from 'axios';

const taskId = '02231934-2604-0066-2000-570459f04879';

axios({
  method: 'get',
  url: `https://api.seermartech.cn/v3/merchant/amazon/reviews/task_get/advanced/${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 = "06141103-2692-0309-1000-980b778b6d25"

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

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

data = response.json()

if data.get("status_code") == 20000:
    print(data)
    # 在此处处理评论结果
else:
    print(
        "请求失败。状态码:%s,消息:%s"
        % (data.get("status_code"), data.get("status_message"))
    )

C#

csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

public static class Demos
{
    public static async Task GetAmazonReviewsById()
    {
        using var httpClient = new HttpClient();

        httpClient.DefaultRequestHeaders.Authorization =
            new AuthenticationHeaderValue(
                "Bearer",
                "smt_live_YOUR_KEY"
            );

        string taskId = "06141103-2692-0309-1000-980b778b6d25";

        string url =
            "https://api.seermartech.cn/v3/merchant/amazon/reviews/" +
            "task_get/advanced/" + taskId;

        var response = await httpClient.GetAsync(url);
        string responseBody = await response.Content.ReadAsStringAsync();

        Console.WriteLine(responseBody);
        // 在此处解析并处理 JSON 结果
    }
}

响应示例

以下示例展示主要字段,评论列表中的结构相同:

json
{
  "version": "0.1.20220407",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1642 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "04011058-0696-0199-0000-2196151a15cb",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1200 sec.",
      "cost": 0,
      "result_count": 1,
      "path": [
        "v3",
        "merchant",
        "amazon",
        "reviews",
        "task_get",
        "advanced"
      ],
      "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": [
        {
          "asin": "B0773ZY26F",
          "type": "reviews",
          "se_domain": "amazon.com",
          "location_code": 2840,
          "language_code": "en_US",
          "check_url": "https://www.amazon.com/",
          "datetime": "2021-08-09 00:00:00 +00:00",
          "spell": null,
          "title": "商品标题",
          "image": {
            "type": "images_element",
            "alt": "商品图片",
            "url": "https://www.amazon.com/",
            "image_url": "https://images.example.com/product.jpg"
          },
          "rating": {
            "type": "rating_element",
            "position": "right",
            "rating_type": "Max5",
            "value": 4.2,
            "votes_count": 1200,
            "rating_max": 5,
            "reviews_count": 1500
          },
          "item_types": [
            "amazon_review_item"
          ],
          "items_count": 1,
          "items": [
            {
              "type": "amazon_review_item",
              "rank_group": 1,
              "rank_absolute": 1,
              "position": "right",
              "xpath": "/html/body/div/div/div",
              "verified": true,
              "subtitle": "Reviewed in the United States on August 9, 2021",
              "helpful_votes": 10,
              "images": null,
              "videos": null,
              "user_profile": {
                "name": "评论",
                "avatar": "https://images.example.com/avatar.jpg",
                "url": "https://www.amazon.com/",
                "reviews_count": null,
                "locations": null
              },
              "title": "评论标题",
              "url": "https://www.amazon.com/",
              "review_text": "评论正文",
              "publication_date": "2021-08-09 00:00:00 +00:00",
              "rating": {
                "rating_type": "Max5",
                "value": 5,
                "votes_count": null,
                "rating_max": 5
              }
            }
          ]
        }
      ]
    }
  ]
}

实用场景

  • 采集指定 ASIN 的完整评论,建立商品口碑数据库,为选品、竞品研究和产品定位提供依据。
  • 统计评论评分、验证购买标记和有帮助投票,识别高质量正面反馈与集中负面反馈。
  • 分析评论标题与正文中的高频问题,提炼产品缺陷、功能诉求和用户满意点,指导产品迭代。
  • 提取评论图片、视频及用户资料信息,评估用户生成质量,为商品页和营销提供素材。
  • 按评论发布时间与排名持续抓取结果,监控商品口碑变化,及时发现评分下滑或负面舆风险。

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