主题
按任务 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。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务创建成功后返回,可在 30 天使用该 ID 获取结果。 |
响应结构
服务器返回 JSON 数据,主体 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。完整状态码列表请参考错误码文档。 |
status_message | string | 通用状态说明。 |
time | string | 接口执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 数组中的任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。 |
status_code | integer | 任务状态码,通常在 10000 至 60000 范围。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 请求 URL 路径。 |
data | object | 创建任务时提交的参数。 |
result | array | 搜索结果数组。 |
建议客户端根据顶层和任务级 status_code、status_message 处理异常。
result 数组中的字段
| 字段 | 类型 | 说明 |
|---|---|---|
asin | string | 创建任务时提交的 ASIN。 |
type | string | 创建任务时提交的搜索引擎类型。 |
se_domain | string | 创建任务时提交的搜索引擎域名。 |
location_code | integer | 创建任务时提交的地区代码。 |
language_code | string | 创建任务时提交的语言代码。 |
check_url | string | 搜索结果页面的直接 URL,可用于核验结果准确性。 |
datetime | string | 获取结果的日期和时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。示例:2019-11-15 12:57:46 +00:00。 |
spell | object/null | 搜索引擎自动纠错信息。该接口通常返回 null。 |
title | string | Amazon 商品标题,即收集评论的商品名称。 |
image | object/null | 商品图片信息。 |
rating | object/null | 商品整体评分信息。 |
item_types | array | Amazon 搜索结果中的结果类型,可能 amazon_review_item。 |
items_count | integer | items 数组中的评论数量。 |
items | array | 获取到的评论列表。可在创建任务时增加 depth 参数以获取更多评论。 |
image 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 images_element。 |
alt | string | 图片的 alt 属性。 |
url | string | 图片 URL。 |
image_url | string | 结果中展示的商品图片 URL。 |
商品 rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 rating_element。 |
position | string | 评分在搜索结果中的对齐位置,可为 left 或 right。 |
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax。 |
value | float | 基于评论计算的平均评分。 |
votes_count | integer | 评分票数。 |
rating_max | integer | 当前评分类型的最大值。 |
reviews_count | integer | 商品评论总数。 |
items 中的评论字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 评论类型,通常为 amazon_review_item。 |
rank_group | integer | 在相同 type 结果组中的位置。不同类型结果不会计此排名。 |
rank_absolute | integer | 评论在评论列表中的绝对排名。 |
position | string | 评论在搜索结果中的对齐位置,可为 right。 |
xpath | string | 评论对应的 XPath。 |
verified | boolean | 是否带有“已验证购买”标记。 |
subtitle | string | 评论副标题,通常评论地区和日期。 |
helpful_votes | integer/null | 评论获得的“有帮助”投票数。 |
images | array/null | 评论提交的商品图片。 |
videos | array/null | 评论提交的视频。 |
user_profile | object | 评论的用户资料。 |
title | string | 评论标题。 |
url | string | 评论页 URL。 |
review_text | string | 评论正文。 |
publication_date | string | 评论发布时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
rating | object | 评论提交的评分。 |
评论 images 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 images_element。 |
alt | string | 图片的 alt 属性。 |
url | string | 图片 URL。 |
image_url | string | 评论中展示的商品图片 URL。 |
评论 videos 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 video_element。 |
source | string | 视频源 URL。 |
preview | string | 视频预览图 URL。 |
user_profile 字段
| 字段 | 类型 | 说明 |
|---|---|---|
name | string | 评论名称。 |
avatar | string | 评论头像 URL。 |
url | string | 评论个人资料页 URL。 |
reviews_count | integer/null | 评论提交的评论总数。 |
locations | string/null | 评论所在国家或地区。 |
评论 rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,通常为 Max5。 |
value | float | 评论给出的评分值。 |
votes_count | integer/null | 该评分获得的反馈数量,此接口通常返回 null。 |
rating_max | integer | 评分最大值;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 的完整评论,建立商品口碑数据库,为选品、竞品研究和产品定位提供依据。
- 统计评论评分、验证购买标记和有帮助投票,识别高质量正面反馈与集中负面反馈。
- 分析评论标题与正文中的高频问题,提炼产品缺陷、功能诉求和用户满意点,指导产品迭代。
- 提取评论图片、视频及用户资料信息,评估用户生成质量,为商品页和营销提供素材。
- 按评论发布时间与排名持续抓取结果,监控商品口碑变化,及时发现评分下滑或负面舆风险。