Skip to content

根据任务 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 路径接收参数,无需请求体。

参数类型说明
idstring任务唯一标识,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 为任务结果数组。

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用响应状态码。20000 表示请求成功。
status_messagestring通用状态说明。
timestring接口执行耗时,例如 0.0749 sec.
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任务结果数组。

result 字段

字段类型说明
asinstring请求中提交的 ASIN,Amazon 商品唯一标识。
typestring搜索类型,固定为 asin
se_domainstringAmazon 站点域名。
location_codeinteger地理位置代码。
language_codestring语言代码。
check_urlstringAmazon 结果页的直接 URL,可用于核验结果。
datetimestring获取结果的 UTC 时间,格式为 yyyy-MM-dd HH:mm:ss +00:00
spellobject搜索引擎自动纠错信息。
item_typesarray结果中的搜索结果类型,通常 amazon_product_info
items_countintegeritems 数组中的结果数量。
itemsarrayAmazon 商品信息数组。
top_local_reviewsarray目标地区的优质评论。
top_global_reviewsarray地区的优质评论。

spell 对象

当 Amazon 对请求执行自动纠错时,该对象会纠正后的及纠错类型。未发生纠错时可能为 null 或空对象。

items 商品信息字段

字段类型说明
typestring素类型,固定为 amazon_product_info
rank_groupinteger在相同 type素组中的排名。不同类型之间不会计该排名。
rank_absoluteinteger在结果中的绝对排名。
positionstring素在 Amazon 结果页中的位置,可为 leftright
xpathstring素对应的 XPath。
titlestring商品标题。
detailsstring商品规格及。
image_urlstring商品主图 URL。
authorstring商品品牌或店铺名称。
data_asinstring商品 ASIN。
parent_asinstring父 ASIN。
product_asinsarray所有已发现商品变体的 ASIN 列表。
price_fromfloat商品价格区间下限。
price_tofloat商品价格区间上限。
percentage_discountfloat折扣百分比。
currencystringISO 4217 货币代码,例如 USD
is_amazon_choiceboolean是否带有 Amazon's Choice 标记。
ratingobject商品评分信息。
is_newer_model_availableboolean是否存在更新型号。
is_prime_videoboolean是否带有 Prime Video 标记。
applicable_vouchersarray适用优惠券列表。
newer_modelobject更新型号信息。
categoriesarray商品分类。
product_informationarray商品页中的扩展信息。
product_images_listarray商品页展示的图片 URL 列表。
product_videos_listarray商品页展示的视频 URL 列表。
descriptionstring商品描述。
is_availableboolean商品是否可购买。true 表示可下单。

rating 商品评分字段

字段类型说明
typestring素类型,固定为 rating_element
positionstring评分位置,可为 leftright
rating_typestring评分类型,可为 Max5PercentsCustomMax
valuestring/float评分值。
votes_countinteger商品反馈或评分数量。
rating_maxstring/integer当前评分类型的最大值。

applicable_vouchers 优惠券字段

字段类型说明
typestring素类型,固定为 amazon_applicable_vouchers_item
textstring优惠券文案。
fixed_discountfloat固定金额优惠。
fixed_discount_currencystring固定金额优惠使用的货币代码。
percentage_discountfloat百分比折扣。固定金额优惠时该字段为 null
important_detailsstring优惠券使用条件及重要说明。

newer_model 更新型号字段

字段类型说明
titlestring更新型号商品标题。
newer_model_asinstring更新型号的 ASIN。

categories 分类字段

字段类型说明
categorystring商品分类名称。
urlstring商品分类 URL,通常对应 Amazon 的浏览路径及分类节点。

product_information 商品扩展信息

product_information 是商品页信息的集合,可能以下。

字段类型说明
typestring素类型,可为 product_information_extended_itemproduct_information_rowsproduct_information_text_rowproduct_information_image_rowproduct_information_video_rowproduct_information_details_item
section_namestring商品信息所属区块名称。
contentsarray区块的商品信息。
titlestring商品信息标题。
rowsarray商品信息行列表。
textstring指定标题下的文本。
altstring商品图片的替代文本。
urlstring图片或视频 URL。
previewstring视频预览图 URL。
bodyobject商品区块的主体。

body 可能以下字段:

字段类型说明
product_images_listarray商品主图区域左侧展示的图片 URL。
product_videos_listarray商品主视频区域右侧展示的视频 URL。
descriptionstring商品描述文本。

评论字段

top_local_reviewstop_global_reviews 均由评论对象组成,字段结构相同。

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

评论图片字段

字段类型说明
typestring图片类型,固定为 images_element
altstring图片替代文本。
urlstring图片 URL。
image_urlstring评论中展示的商品图片 URL。

评论视频字段

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

user_profile 评论资料字段

字段类型说明
namestring评论名称。
avatarstring评论头像 URL。
urlstring评论资料页 URL。
reviews_countinteger评论评论数量。
locationsstring评论所在国家或地区代码。

rating 评论评分字段

字段类型说明
rating_typestring评分类型,通常为 Max5
valuefloat评分值。
votes_countinteger评分反馈数量;评论评分场景下通常为 null
rating_maxinteger评分最大值,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_fromprice_topercentage_discount,识别竞品调价及促销变化。
  • 分析商品评分与评论反馈:提取本地及评论、评分和验证购买信息,挖掘产品质量、和功能等用户反馈。
  • 发现更新型号与商品替代:通过 is_newer_model_availablenewer_model 识别新品替代机会,竞品生命周期分析。
  • 评估商品搜索展示表现:结合 rank_absolutepositionitem_typesis_amazon_choice,分析商品在 Amazon 结果页中的展示特征。

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