Skip to content

merchant/amazon/products/live/html ​

POST /v3/merchant/amazon/products/live/html

Live Amazon Products HTML ​

请求方法: POST
请求路径: /v3/merchant/amazon/products/live/html
完整地址: https://api.seermartech.cn/v3/merchant/amazon/products/live/html

本接口用于实时抓取 Amazon 商品搜索结果,并以 HTML 格式返回结果页面及数据。

请求说明 ​

  • 请求体使用 UTF-8 编码的 JSON 格式。
  • POST 请求体是 JSON 数组,任务参数放在数组中。
  • 每次 Live API 调用只能提交 1 个任务。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
  • 任务提交成功后,响应中的 tasks 数组会返回任务结果。

计费说明 ​

本接口按任务提交及抓取页数计费。depth过 100 时,如果 Amazon 返回 100 条结果,可能产生额外费用。

参考价约 ¥0.0360 / 个 100 条结果的 SERP。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数 ​

参数类型说明
keywordstring搜索。填。最多 700 个字符。参数中的 %## 会被解码,字符 + 会被解码为空格。如果本身需要使用 %,请编码为 %25。
urlstring搜索请求的完整 URL。可选。平台会从 URL 中解析参数。该方式处理复杂,并且要求 URL 中准确的语言和位置参数,通常不建议使用。示例:https://www.amazon.com/s/?field-keywords=shoes&language=en_US
location_namestring搜索位置的完整名称。当未指定 location_code 或 location_coordinate 时填。使用该参数后,无需再传另外两个位置参数。可通过 /v3/merchant/amazon/locations 获取可用位置。示例:HA1,England,United Kingdom
location_codeinteger搜索位置编码。当未指定 location_name 或 location_coordinate 时填。使用该参数后,无需再传另外两个位置参数。可通过 /v3/merchant/amazon/locations 获取。示例:9045969
location_coordinatestring位置 GPS 坐标。当未指定 location_name 或 location_code 时填。格式为 "纬度,经度,半径"。纬度和经度最多 7 位小数,半径最小值为 199.9。示例:53.476225,-2.243572,200
language_namestring搜索语言的完整名称。当未指定 language_code 时填。使用该参数后,无需再传 language_code。可通过 /v3/merchant/amazon/languages 获取可用语言。示例:English (United Kingdom)
language_codestring搜索语言代码。当未指定 language_name 时填。使用该参数后,无需再传 language_name。可通过 /v3/merchant/amazon/languages 获取。示例:en_GB
se_domainstringAmazon 域名。可选。平台会根据位置和语言自动选择匹的域名,也可以手动指定,例如 amazon.com、amazon.co.uk、amazon.fr。
depthinteger抓取深度,即从 Amazon 结果页获取的结果数量。可选,默认值为 100,最大值为 700。每个最多 100 条结果的 SERP 单独计费。
max_crawl_pagesinteger最大抓取页数。可选,最大值为 7。该参数与 depth合使用,用于控制需要抓取的搜索结果页数量。
departmentstringAmazon 商品分类。可选。支持以下值:Arts & Crafts、Automotive、Baby、Beauty & Personal Care、Books、Computers、Digital Music、Electronics、Kindle Store、Prime Video、Women's Fashion、Men's Fashion、Girls' Fashion、Boys' Fashion、Deals、Health & Household、Home & Kitchen、Industrial & Scientific、Luggage、Movies & TV、Music, CDs & Vinyl、Pet Supplies、Software、Sports & Outdoors、Tools & Home Improvement、Toys & Games、Video Games。
search_paramstringAmazon 搜索 URL 的附加参数。可选。例如:&low-price=52(筛选价格高于 52 的商品)、&high-price=45(筛选价格低于 45 的商品)、&sort=relevancerank(按性排序)、&sort=featured-rank(按推荐商品排序)、&sort=price-asc-rank(按价格升序排序)、&sort=price-desc-rank(按价格降序排序)、&sort=review-rank(按客户评价排序)、&sort=date-desc-rank(按最新上架时间排序)。如果同时指定 price_min、price_max 或 sort_by,该参数将被忽略。
price_mininteger返回商品的最低价格。可选。示例:5。指定后将忽略 search_param。
price_maxinteger返回商品的最高价格。可选。示例:100。指定后将忽略 search_param。
sort_bystring结果排序方式。可选。支持:relevance、price_low_to_high、price_high_to_low、featured、avg_customer_review、newest_arrival。示例:"relevance"。指定后将忽略 search_param。
tagstring用户自定义任务标识。可选,最多 255 个字符。可用于任务与结果,提交的值会原样返回在响应的 data 对象中。

请求示例 ​

cURL ​

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/merchant/amazon/products/live/html" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "location_name": "United States",
      "language_name": "English (United States)",
      "keyword": "shoes"
    }
  ]'

PHP ​

php
<?php

$endpoint = 'https://api.seermartech.cn/v3/merchant/amazon/products/live/html';

$payload = [
    [
        'location_name' => 'United States',
        'language_name' => 'English (United States)',
        'keyword' => 'shoes'
    ]
];

$ch = curl_init($endpoint);

curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer smt_live_YOUR_KEY',
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode($payload, JSON_UNESCAPED_UNICODE)
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

TypeScript ​

typescript
import axios from "axios";

const response = await axios.post(
  "https://api.seermartech.cn/v3/merchant/amazon/products/live/html",
  [
    {
      location_name: "United States",
      language_name: "English (United States)",
      keyword: "shoes",
    },
  ],
  {
    headers: {
      Authorization: "Bearer smt_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
  }
);

console.log(response.data);

Python ​

python
import requests

url = "https://api.seermartech.cn/v3/merchant/amazon/products/live/html"

payload = [
    {
        "location_name": "United States",
        "language_name": "English (United States)",
        "keyword": "shoes"
    }
]

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 200:
    print(response.json())
else:
    print(f"请求失败:HTTP {response.status_code},{response.text}")

C# ​

csharp
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;

var httpClient = new HttpClient();

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

var payload = new[]
{
    new
    {
        location_name = "United States",
        language_name = "English (United States)",
        keyword = "shoes"
    }
};

var content = new StringContent(
    JsonSerializer.Serialize(payload),
    Encoding.UTF8,
    "application/json"
);

var response = await httpClient.PostAsync(
    "https://api.seermartech.cn/v3/merchant/amazon/products/live/html",
    content
);

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);

响应结构 ​

服务端返回 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任务状态码,通常位于 10000 至 60000 范围。
status_messagestring任务状态说明。
timestring任务执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量。
patharray请求 URL 路径信息。
dataobject提交任务时使用的参数。
resultarray结果数组。

result 数组字段 ​

字段类型说明
keywordstring请求中的。返回时 %## 已解码,字符 + 会解码为空格。
typestring请求中的搜索引擎类型。
se_domainstring使用的 Amazon 域名。
location_codeinteger位置编码。
language_codestring语言代码。
datetimestring获取结果的日期和时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。示例:2019-11-15 12:57:46 +00:00。
items_countintegeritems 数组中的结果数量。
itemsarrayHTML 页面及数据。

items 数组字段 ​

字段类型说明
pageinteger返回 HTML 页面的序号。
datestringHTML 页面扫描时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。
htmlstring抓取到的 HTML 页面。

响应示例 ​

json
{
  "version": "0.1.20260520",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "15.1520 sec.",
  "cost": 0.036,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01234567-89ab-cdef-0123-456789abcdef",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "15.1520 sec.",
      "cost": 0.036,
      "result_count": 1,
      "path": [
        "v3",
        "merchant",
        "amazon",
        "products",
        "live",
        "html"
      ],
      "data": {
        "api": "merchant",
        "function": "products",
        "se": "amazon",
        "language_code": "en_US",
        "location_code": 2840,
        "keyword": "shoes",
        "se_type": "products",
        "device": "desktop",
        "os": "windows"
      },
      "result": [
        {
          "keyword": "shoes",
          "type": "products",
          "se_domain": "amazon.com",
          "location_code": 2840,
          "language_code": "en_US",
          "datetime": "2019-11-15 12:57:46 +00:00",
          "items_count": 1,
          "items": [
            {
              "page": 1,
              "date": "2019-11-15 12:57:46 +00:00",
              "html": "<html>...</html>"
            }
          ]
        }
      ]
    }
  ]
}

状态码与错误处理 ​

请根据响应中的 status_code 和 status_message 判断请求及任务是否成功:

  • 20000:请求成功。
  • 顶层 status_code:表示整个 API 请求的处理状态。
  • 任务级 status_code:表示对应任务的执行状态。
  • 当 tasks_error 大于 0 时,应逐项检查 tasks 数组中的任务状态。

建议在业务系统中对网络错误、HTTP 错误、顶层状态码错误以及单个任务执行错误分别处理,因部分任务失败而影响整体结果。

实用场景 ​

  • 抓取 Amazon 结果页 HTML:保存指定在不同国家、语言和域名下的原始页面,用于构建商品搜索结果归档和复盘系统。
  • 监测商品排序与页面变化:定期抓取目标的结果页,分析商品排序、推荐位和页面结构变化,支持竞品与排名监控。
  • 筛选指定价格区间的商品:结合 price_min 和 price_max 获取目标价格带商品,选品、价格带分析和市场机会评估。
  • 按商品分类分析搜索结果:使用 department 分析不同 Amazon 商品部门的结果,支持垂直品类 SEO 和商品运营决策。
  • 获取多页搜索结果原始:结合 depth 与 max_crawl_pages 抓取多页结果,评估长尾覆盖范围和商品分布。

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