主题
根据任务 ID 获取 Amazon ASIN 高级结果
本接口使用 GET 方法,通过任务 ID 获取 Amazon 商品及所有变体 ASIN 的详细结果。
接口路径:
text
GET https://api.seermartech.cn/v3/merchant/amazon/asin/task_get/advanced/$id$id 为提交任务时返回的唯一任务标识。任务结果可在任务提交后的 30 天重复获取,获取结果本身不额外收费。
计费说明
本接口对提交任务的操作计费,查询已提交任务的结果不重复计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
接口通过 URL 路径接收参数,无需请求体。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务提交后 30 天可使用该 ID 查询结果。 |
请求示例
curl
bash
id="04171455-0696-0192-0000-4c69cc29b945"
curl --location --request GET \
"https://api.seermartech.cn/v3/merchant/amazon/asin/task_get/advanced/${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/asin/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 = "04171455-0696-0192-0000-4c69cc29b945"
url = (
"https://api.seermartech.cn/v3/merchant/amazon/asin/"
f"task_get/advanced/{task_id}"
)
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
if data.get("status_code") == 20000:
print(data)
else:
print(
"请求失败,错误码:",
data.get("status_code"),
"消息:",
data.get("status_message"),
)响应结构
服务端返回 JSON 对象 tasks 为任务结果数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。20000 表示请求成功。 |
status_message | string | 通用状态说明。 |
time | string | 接口执行耗时,例如 0.0749 sec.。 |
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 | 任务结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
asin | string | 请求中提交的 ASIN,Amazon 商品唯一标识。 |
type | string | 搜索类型,固定为 asin。 |
se_domain | string | Amazon 站点域名。 |
location_code | integer | 地理位置代码。 |
language_code | string | 语言代码。 |
check_url | string | Amazon 结果页的直接 URL,可用于核验结果。 |
datetime | string | 获取结果的 UTC 时间,格式为 yyyy-MM-dd HH:mm:ss +00:00。 |
spell | object | 搜索引擎自动纠错信息。 |
item_types | array | 结果中的搜索结果类型,通常 amazon_product_info。 |
items_count | integer | items 数组中的结果数量。 |
items | array | Amazon 商品信息数组。 |
top_local_reviews | array | 目标地区的优质评论。 |
top_global_reviews | array | 地区的优质评论。 |
spell 对象
当 Amazon 对请求执行自动纠错时,该对象会纠正后的及纠错类型。未发生纠错时可能为 null 或空对象。
items 商品信息字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 amazon_product_info。 |
rank_group | integer | 在相同 type素组中的排名。不同类型之间不会计该排名。 |
rank_absolute | integer | 在结果中的绝对排名。 |
position | string | 素在 Amazon 结果页中的位置,可为 left 或 right。 |
xpath | string | 素对应的 XPath。 |
title | string | 商品标题。 |
details | string | 商品规格及。 |
image_url | string | 商品主图 URL。 |
author | string | 商品品牌或店铺名称。 |
data_asin | string | 商品 ASIN。 |
parent_asin | string | 父 ASIN。 |
product_asins | array | 所有已发现商品变体的 ASIN 列表。 |
price_from | float | 商品价格区间下限。 |
price_to | float | 商品价格区间上限。 |
percentage_discount | float | 折扣百分比。 |
currency | string | ISO 4217 货币代码,例如 USD。 |
is_amazon_choice | boolean | 是否带有 Amazon's Choice 标记。 |
rating | object | 商品评分信息。 |
is_newer_model_available | boolean | 是否存在更新型号。 |
is_prime_video | boolean | 是否带有 Prime Video 标记。 |
applicable_vouchers | array | 适用优惠券列表。 |
newer_model | object | 更新型号信息。 |
categories | array | 商品分类。 |
product_information | array | 商品页中的扩展信息。 |
product_images_list | array | 商品页展示的图片 URL 列表。 |
product_videos_list | array | 商品页展示的视频 URL 列表。 |
description | string | 商品描述。 |
is_available | boolean | 商品是否可购买。true 表示可下单。 |
rating 商品评分字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 rating_element。 |
position | string | 评分位置,可为 left 或 right。 |
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax。 |
value | string/float | 评分值。 |
votes_count | integer | 商品反馈或评分数量。 |
rating_max | string/integer | 当前评分类型的最大值。 |
applicable_vouchers 优惠券字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 amazon_applicable_vouchers_item。 |
text | string | 优惠券文案。 |
fixed_discount | float | 固定金额优惠。 |
fixed_discount_currency | string | 固定金额优惠使用的货币代码。 |
percentage_discount | float | 百分比折扣。固定金额优惠时该字段为 null。 |
important_details | string | 优惠券使用条件及重要说明。 |
newer_model 更新型号字段
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 更新型号商品标题。 |
newer_model_asin | string | 更新型号的 ASIN。 |
categories 分类字段
| 字段 | 类型 | 说明 |
|---|---|---|
category | string | 商品分类名称。 |
url | string | 商品分类 URL,通常对应 Amazon 的浏览路径及分类节点。 |
product_information 商品扩展信息
product_information 是商品页信息的集合,可能以下。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,可为 product_information_extended_item、product_information_rows、product_information_text_row、product_information_image_row、product_information_video_row 或 product_information_details_item。 |
section_name | string | 商品信息所属区块名称。 |
contents | array | 区块的商品信息。 |
title | string | 商品信息标题。 |
rows | array | 商品信息行列表。 |
text | string | 指定标题下的文本。 |
alt | string | 商品图片的替代文本。 |
url | string | 图片或视频 URL。 |
preview | string | 视频预览图 URL。 |
body | object | 商品区块的主体。 |
body 可能以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
product_images_list | array | 商品主图区域左侧展示的图片 URL。 |
product_videos_list | array | 商品主视频区域右侧展示的视频 URL。 |
description | string | 商品描述文本。 |
评论字段
top_local_reviews 和 top_global_reviews 均由评论对象组成,字段结构相同。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 评论类型,固定为 amazon_review_item。 |
rank_group | integer | 在相同类型评论中的组排名。 |
rank_absolute | integer | 在评论列表中的绝对排名。 |
position | string | 评论在结果页中的位置,通常为 right 或 left。 |
xpath | string | 评论对应的 XPath。 |
verified | boolean | 是否带有“已验证购买”标记。 |
subtitle | string | 评论副标题,通常评论地区和日期。 |
helpful_votes | integer | “有帮助”投票数量。 |
images | array | 评论提交的商品图片。 |
videos | array | 评论提交的商品视频。 |
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 | 评论评分。 |
评论图片字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 图片类型,固定为 images_element。 |
alt | string | 图片替代文本。 |
url | string | 图片 URL。 |
image_url | string | 评论中展示的商品图片 URL。 |
评论视频字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 视频类型,固定为 video_element。 |
source | string | 视频源 URL。 |
preview | string | 视频预览图 URL。 |
user_profile 评论资料字段
| 字段 | 类型 | 说明 |
|---|---|---|
name | string | 评论名称。 |
avatar | string | 评论头像 URL。 |
url | string | 评论资料页 URL。 |
reviews_count | integer | 评论评论数量。 |
locations | string | 评论所在国家或地区代码。 |
rating 评论评分字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,通常为 Max5。 |
value | float | 评分值。 |
votes_count | integer | 评分反馈数量;评论评分场景下通常为 null。 |
rating_max | integer | 评分最大值,Max5 类型通常为 5。 |
响应示例
以下为响应结构示例,部分数组已使用简化数据表示:
json
{
"version": "0.1.20241101",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0749 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04171455-0696-0192-0000-4c69cc29b945",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0749 sec.",
"cost": 0,
"result_count": 1,
"path": [
"/v3/merchant/amazon/asin/task_get/advanced/04171455-0696-0192-0000-4c69cc29b945"
],
"data": {
"se_type": "asin",
"api": "merchant",
"function": "asin",
"se": "amazon",
"language_code": "en_US",
"location_code": 2840,
"asin": "B016MAK38U",
"device": "desktop",
"os": "windows"
},
"result": [
{
"asin": "B016MAK38U",
"type": "asin",
"se_domain": "amazon.com",
"location_code": 2840,
"language_code": "en_US",
"check_url": "https://www.amazon.com/dp/B016MAK38U",
"datetime": "2024-11-15 12:57:46 +00:00",
"spell": null,
"item_types": [
"amazon_product_info"
],
"items_count": 1,
"items": [
{
"type": "amazon_product_info",
"rank_group": 1,
"rank_absolute": 1,
"position": "left",
"xpath": "/html/body/div",
"title": "Redragon K552 Mechanical Gaming Keyboard",
"details": null,
"image_url": "https://m.media-amazon.com/images/I/71FSIp+tDNL._AC_SY300_SX300_.jpg",
"author": "Visit the Redragon Store",
"data_asin": "B016MAK38U",
"parent_asin": null,
"product_asins": [],
"price_from": 29.59,
"price_to": null,
"percentage_discount": null,
"currency": "USD",
"is_amazon_choice": true,
"rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": 4.5,
"votes_count": 53477,
"rating_max": 5
},
"is_newer_model_available": true,
"is_prime_video": false,
"applicable_vouchers": [],
"newer_model": {
"title": "Redragon Mechanical Keyboard Wireless",
"newer_model_asin": "B0CX8ZHJFT"
},
"categories": [],
"product_information": [],
"product_images_list": [],
"product_videos_list": [],
"description": "About this item ...",
"is_available": true
}
],
"top_local_reviews": [
{
"type": "amazon_review_item",
"rank_group": 1,
"rank_absolute": 1,
"position": "left",
"xpath": "/html/body/div/div/div",
"verified": true,
"subtitle": "Reviewed in the United States on November 21, 2024",
"helpful_votes": null,
"images": null,
"videos": null,
"user_profile": {
"name": "Cristiann Lozano",
"avatar": "https://images-na.ssl-images-amazon.com/images/S/amazon-avatars-global/default._CR0,0,1024,1024_SX48_.png",
"url": "https://amazon.com/gp/profile/example",
"reviews_count": null,
"locations": "US"
},
"title": "SIN EMPAQUE DE ENVIO",
"url": "https://amazon.com/gp/customer-reviews/example?ASIN=B016MAK38U",
"review_text": "评论正文",
"publication_date": "2024-11-21 00:00:00 +00:00",
"rating": {
"rating_type": "Max5",
"value": 3,
"votes_count": null,
"rating_max": 5
}
}
],
"top_global_reviews": []
}
]
}
]
}响应状态码
| 状态码 | 说明 |
|---|---|
20000 | 请求成功。 |
40000 及以上 | 任务处理失败或发生错误,请结合 status_message 排查。 |
建议客户端同时检查顶层 status_code、任务级 status_code 以及 result 是否存在,并针对异常状态实现重试、告警和错误记录机制。
实用场景
- 获取商品与变体 ASIN:批量读取商品标题、价格、分类和变体,支持竞品库建设与商品数据归档。
- 监控商品价格与折扣:定期查询
price_from、price_to和percentage_discount,识别竞品调价及促销变化。 - 分析商品评分与评论反馈:提取本地及评论、评分和验证购买信息,挖掘产品质量、和功能等用户反馈。
- 发现更新型号与商品替代:通过
is_newer_model_available和newer_model识别新品替代机会,竞品生命周期分析。 - 评估商品搜索展示表现:结合
rank_absolute、position、item_types和is_amazon_choice,分析商品在 Amazon 结果页中的展示特征。