主题
按任务 ID 获取 Amazon 商品高级搜索结果
GET /v3/merchant/amazon/products/tasks_ready
GET /v3/merchant/amazon/products/task_get/advanced/$id
通过已提交任务的唯一标识符获取 Amazon 商品搜索高级结果。任务结果自创建起保留 30 天,在有效期可重复查询;费用在提交任务时产生。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
id | string | 是 | 任务唯一标识符,采用 UUID 格式。例如:04170913-0696-0179-0000-707d6a06f64b。可在任务提交后的 30 天用于查询结果。 |
请求示例
curl
bash
task_id="04170913-0696-0179-0000-707d6a06f64b"
curl --location --request GET \
"https://api.seermartech.cn/v3/merchant/amazon/products/task_get/advanced/${task_id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "04170913-0696-0179-0000-707d6a06f64b"
url = (
"https://api.seermartech.cn/"
f"v3/merchant/amazon/products/task_get/advanced/{task_id}"
)
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
timeout=60,
)
response.raise_for_status()
result = response.json()
# 检查接口及任务状态
if result["status_code"] == 20000:
task = result["tasks"][0]
if task["status_code"] < 40000:
print(task["result"])
else:
print(f"任务错误:{task['status_code']} - {task['status_message']}")
else:
print(f"请求错误:{result['status_code']} - {result['status_message']}")TypeScript
typescript
import axios from "axios";
const taskId = "04170913-0696-0179-0000-707d6a06f64b";
async function getAmazonProductsResult() {
const response = await axios.get(
`https://api.seermartech.cn/v3/merchant/amazon/products/task_get/advanced/${taskId}`,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
},
);
const data = response.data;
// 检查接口状态及任务执行状态
if (data.status_code === 20000 && data.tasks?.[0]?.status_code < 40000) {
console.log(data.tasks[0].result);
} else {
console.error(data.status_message);
}
}
getAmazonProductsResult().catch(console.error);响应结构
接口返回 JSON 对象,顶层 tasks 数组。每个任务对象对应一个已提交的商品搜索任务。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 接口通用状态码。20000 表示请求成功。建议针对异常和错误状态建立处理机制。 |
status_message | string | 接口通用状态说明。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | 返回错误的任务数量。 |
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 | 用于获取该任务结果的 API 路径。 |
data | object | 创建任务时提交的原始参数。 |
result | array | 商品搜索结果数组。 |
tasks[].result[] 搜索结果字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 提交任务时使用的。URL 编码会被解码,+ 会还原为空格。 |
type | string | 创建任务时指定的搜索引擎类型。 |
se_domain | string | 创建任务时指定的搜索域名。 |
location_code | integer | 创建任务时指定的地区代码。 |
language_code | string | 创建任务时指定的语言代码。 |
check_url | string | Amazon 搜索结果页直达链接,可用于人工核验结果。 |
datetime | string | 获取结果的 UTC 时间,格式为 yyyy-mm-dd hh-mm-ss +00:00。 |
spell | object | 搜索引擎自动纠错信息;未发生纠错时可能为 null。 |
spell.keyword | string | 自动纠正后的。结果基于该返回。 |
spell.type | string | 自动纠错类型:did_you_mean、showing_results_for、no_results_found_for 或 including_results_for。 |
item_types | array | 本次 SERP 中发现的结果类型集合。 |
se_results_count | integer | 搜索引擎返回的结果总数。 |
categories | array | Amazon 商品部门及子分类信息。 |
items_count | integer | items 数组中的结果数量。 |
items | array | Amazon SERP素数组。 |
item_types 可能以下值:
amazon_serp:自然商品结果;amazon_paid:推广商品结果;editorial_recommendations:编辑推荐模块;top_rated_from_our_brands:高评分自有品牌模块;related_searches:搜索模块。
SERP素类型
items[] 中的通过 type 字段区分模块类型。不同模块的排名字段如下。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | SERP素类型。 |
rank_group | integer | 同类型组的位置;不计类型。 |
rank_absolute | integer | 在 Amazon SERP素中的绝对位置。 |
position | string | 素在页面中的布局位置,可为 left 或 right。 |
xpath | string | 素在页面中的 XPath 路径。 |
amazon_serp:自然商品结果
type 为 amazon_serp 的表示常规商品搜索结果。
amazon_paid:推广商品结果
type 为 amazon_paid 的表示 Amazon 赞助或付费商品结果。
商品字段
amazon_serp、amazon_paid 以及推荐模块中的商品均可能以下字段。
| 字段 | 类型 | 说明 |
|---|---|---|
domain | string | Amazon 域名,例如 www.amazon.com。 |
title | string | 商品标题。 |
url | string | 商品页 URL。 |
image_url | string | 搜索结果中展示的商品图片 URL。 |
bought_past_month | integer | 最近一个月的商品购买量;无数据时为 null。 |
price_from | float | 商品常规价格或价格区间下限,例如 49.98。 |
price_to | float | 商品价格区间上限;非价格区间时通常为 null。 |
currency | string | 货币代码,采用 ISO 4217 格式,例如 USD。 |
special_offers | array | 特惠信息优惠券、订省折扣等;无数据时为 null。 |
data_asin | string | Amazon 商品唯一标识符(ASIN),例如 B07G82D89J。该字段由 Amazon 动态分。 |
rating | object | 商品评分信息。 |
is_amazon_choice | boolean | 是否带有 Amazon's Choice 标签。 |
is_best_seller | boolean | 是否带有 Best Seller 标签。 |
delivery_info | object | 送信息时间和运费。 |
labels | array | 商品标签信息;没有标签时为 null。 |
rating 评分字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 rating_element。 |
position | string | 评分布局位置,可为 left 或 right。 |
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax。 |
value | float | 当前评分值。 |
votes_count | integer | 商品评价数量。 |
rating_max | integer | 对应评分类型的最大值。 |
delivery_info送字段
| 字段 | 类型 | 说明 |
|---|---|---|
delivery_message | string | 商品页展示的说明,例如预计送达日期或提示。 |
delivery_price | object | 送费用信息;支持时为 null。 |
delivery_price 运费字段
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格。 |
regular | float | 未折扣的常规价格。 |
max_value | float | 未折扣价格的最大值。 |
currency | string | 运费货币代码,采用 ISO 4217 格式。 |
is_price_range | boolean | 是否为运费区间。 |
displayed_price | string | Amazon 页面展示的原始运费文本。 |
labels 商品标签字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 amazon_label_element。 |
title | string | 标签标题,例如 Audiobook。 |
url | string | 标签商品链接的 URL。 |
domain | string | 标签链接中的域名;Amazon 标签通常为 null。 |
editorial_recommendations:编辑推荐模块
type 为 editorial_recommendations 的表示搜索结果页中的编辑推荐区域。
| 字段 | 类型 | 说明 |
|---|---|---|
items | array | 编辑推荐模块的商品列表。 |
items[].type | string | 固定为 amazon_serp_element。 |
items[].xpath | string | 商品的 XPath 路径。 |
余商品属性请参见“商品字段”。
top_rated_from_our_brands:高评分自有品牌模块
type 为 top_rated_from_our_brands 的表示高评分自有品牌区域。该模块中的商品来自 Amazon 自有品牌,通常在站展示。
| 字段 | 类型 | 说明 |
|---|---|---|
items | array | 该模块的商品列表。 |
items[].type | string | 商品类型,通常为 amazon_serp_element。 |
items[].xpath | string | 商品的 XPath 路径。 |
余商品属性请参见“商品字段”。
related_searches:搜索模块
type 为 related_searches 的表示搜索推荐区域。
| 字段 | 类型 | 说明 |
|---|---|---|
items | array | 搜索项列表。 |
items[].type | string | 固定为 related_searches_element。 |
items[].title | string | 搜索词或推荐项标题。 |
items[].url | string | 对应搜索或商品页面 URL。 |
items[].image_alt | string | 图片 alt 属性文本。 |
items[].image_url | string | 搜索项图片 URL。 |
响应示例
json
{
"version": "0.1.20200923",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1189 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04170913-0696-0179-0000-707d6a06f64b",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1023 sec.",
"cost": 0,
"result_count": 1,
"path": [
"/v3/merchant/amazon/products/task_get/advanced/04170913-0696-0179-0000-707d6a06f64b"
],
"data": {
"se_type": "organic",
"se": "amazon",
"api": "merchant",
"function": "products",
"priority": 2,
"language_code": "en_US",
"location_code": 2840,
"keyword": "gaming keyboard",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "gaming keyboard",
"type": "organic",
"se_domain": "amazon.com",
"location_code": 2840,
"language_code": "en_US",
"check_url": "https://www.amazon.com/s?k=gaming+keyboard",
"datetime": "2025-02-05 12:57:46 +00:00",
"spell": null,
"item_types": [
"amazon_paid",
"amazon_serp",
"editorial_recommendations",
"related_searches"
],
"se_results_count": 50544,
"categories": [],
"items_count": 3,
"items": [
{
"type": "amazon_paid",
"rank_group": 1,
"rank_absolute": 1,
"xpath": "/html/body/div/div/div/div/div/span/div/div",
"domain": "www.amazon.com",
"title": "REGAL Premiere Movie Ticket – Digital Ticket",
"url": "https://www.amazon.com/dp/B0F3RQY7CH",
"image_url": "https://m.media-amazon.com/images/I/61lcBjAMlLL._AC_UY218_.jpg",
"bought_past_month": null,
"price_from": 12.5,
"price_to": null,
"currency": "USD",
"special_offers": null,
"data_asin": "B0F3RQY7CH",
"rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": 4.3,
"votes_count": 25,
"rating_max": 5
},
"is_amazon_choice": false,
"is_best_seller": false,
"delivery_info": null,
"labels": null
},
{
"type": "amazon_serp",
"rank_group": 1,
"rank_absolute": 3,
"xpath": "/html/body/div/div/div/div/div/span/div/div",
"domain": "www.amazon.com",
"title": "Redragon S101 Wired Gaming Keyboard and Mouse Combo",
"url": "https://www.amazon.com/dp/B00NLZUM36",
"image_url": "https://m.media-amazon.com/images/I/71kr3WAj1FL._AC_UY218_.jpg",
"bought_past_month": 100,
"price_from": 36.98,
"price_to": null,
"currency": "USD",
"special_offers": null,
"data_asin": "B00NLZUM36",
"rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": 4.5,
"votes_count": 12162,
"rating_max": 5
},
"is_amazon_choice": false,
"is_best_seller": true,
"delivery_info": {
"delivery_message": "Get it as soon as Tue, Sep 28 FREE Shipping by Amazon",
"delivery_price": null
},
"labels": null
},
{
"type": "editorial_recommendations",
"rank_group": 1,
"rank_absolute": 5,
"position": "left",
"xpath": "/html/body/div/div/div/div/div/span/div/div",
"items": [
{
"type": "amazon_serp_element",
"xpath": "/html/body/div/div/div/div/div/span/div/div/ol/li",
"domain": "www.amazon.com",
"title": "NPET K10 Gaming Keyboard USB Wired",
"url": "https://www.amazon.com/dp/B01ALLT2W4",
"image_url": "https://m.media-amazon.com/images/I/61w0BypBzrL._AC_UL320_.jpg",
"bought_past_month": 100,
"price_from": 21.99,
"price_to": null,
"currency": "USD",
"special_offers": null,
"data_asin": "B01ALLT2W4",
"rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": 4.5,
"votes_count": 4223,
"rating_max": 5
},
"is_amazon_choice": false,
"is_best_seller": false,
"delivery_info": {
"delivery_message": "Fast Delivery To Your Door",
"delivery_price": null
},
"labels": null
}
]
}
]
}
]
}
]
}使用说明
- 请通过商品搜索任务提交接口创建任务,再使用创建任务时返回的
id查询结果。 - 若任务尚未完成,建议调用
/v3/merchant/amazon/products/tasks_ready获取已完成任务列表,随后使用的高级结果地址或任务 ID 拉取结果。 status_code为20000表示接口请求成功;还应检查tasks[].status_code,确认任务执行成功。- 当
tasks[].status_code大于或等于40000时,应根据status_message记录错误并执行重试、告警或降级处理。 - 可使用沙箱接口查看完整字段结构,沙箱请求不计费:
text
https://sandbox.seermartech.cn/v3/merchant/amazon/products/task_get/advanced/00000000-0000-0000-0000-000000000000实用场景
- 监控商品排名:按目标定期获取自然结果与推广结果的绝对排名,追踪自有 ASIN 及竞品的变化。
- 识别竞品广告投放:筛选
amazon_paid类型结果,发现特定下持续投放的竞品商品,为广告竞价和选词提供依据。 - 评估商品竞争强度:结合价格、评分、评价数、月购买量和 Best Seller 标签,量化细分品类中的头部竞品门槛。
- 挖掘搜索词:提取
related_searches模块中的推荐词,扩展站 SEO、广告投放和商品标题优化的长尾库。 - 优化履约与定价策略:分析竞品文案、运费、优惠及价格区间,制定更竞争力的和促销方案。