Skip to content

Amazon 商品实时 HTML 结果接口

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

接口说明

该接口用于实时获取 Amazon 商品搜索结果页的 HTML 原始

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

该接口返回 JSON 响应 result.items[].html含抓取到的页面 HTML。

计费与调用限制

  • 在成功创建任务时计费
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准
  • 参考价约 ¥0.0800 / 次
  • 所有 POST 数据使用 JSON(UTF-8)
  • 请求体格式为 JSON 数组[{ ... }]
  • 每分钟最多可发送 2000 次 API 调用
  • 每次 Live 请求 只能 1 个任务

请求参数

以下为任务对象可用字段说明。

字段名类型说明
keywordstring。搜索。最长 700 个字符。所有 %## 会被解码,字符 + 会被解码为空格。如果中需要保留 %,请写为 %25
urlstring可选。搜索查询的直接 URL。本接口会尝试从 URL 中解析参数。该方式处理难度较高,且要求 URL 中准确的语言和地区信息,通常不建议优使用。示例:https://www.amazon.com/s/?field-keywords=shoes&language=en_US
location_namestring当未提供 location_codelocation_coordinate 时填。搜索地区完整名称。使用该字段时,无需再传 location_codelocation_coordinate。可通过 /v3/merchant/amazon/locations 获取可用地区。示例:HA1,England,United Kingdom
location_codeinteger当未提供 location_namelocation_coordinate 时填。搜索地区代码。使用该字段时,无需再传 location_namelocation_coordinate。可通过 /v3/merchant/amazon/locations 获取可用地区。示例:9045969
location_coordinatestring当未提供 location_namelocation_code 时填。GPS 坐标,格式为 "latitude,longitude,radius"latitudelongitude 最多 7 位小数,radius 最小值为 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_domainstring可选。搜索引擎域名。通常系统会根据地区和语言自动选择,也可手动指定,如 amazon.comamazon.co.ukamazon.fr
depthinteger可选。解析深度,即要提取的结果数量。默认值:100,最大值:700。按每个最多 100 条结果的 SERP 计费;若 depth 大于 100,且搜索引擎返回 100 条结果,可能产生额外费用。
max_crawl_pagesinteger可选。最大抓取页数。最大值:7。该参数与 depth 决定抓取范围。
departmentstring可选。Amazon 商品部门筛选。支持值:Arts & CraftsAutomotiveBabyBeauty & Personal CareBooksComputersDigital MusicElectronicsKindle StorePrime VideoWomen's FashionMen's FashionGirls' FashionBoys' FashionDealsHealth & HouseholdHome & KitchenIndustrial & ScientificLuggageMovies & TVMusic, CDs & VinylPet SuppliesSoftwareSports & OutdoorsTools & Home ImprovementToys & GamesVideo Games
search_paramstring可选。附加搜索参数,可用于自定义 Amazon 搜索 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_minprice_maxsort_by,则会忽略 search_param
price_mininteger可选。返回商品的最低价格。示例:5。如果传该字段,将忽略 search_param
price_maxinteger可选。返回商品的最高价格。示例:100。如果传该字段,将忽略 search_param
sort_bystring可选。排序规则。支持:relevanceprice_low_to_highprice_high_to_lowfeaturedavg_customer_reviewnewest_arrival。示例:relevance。如果传该字段,将忽略 search_param
tagstring可选。用户自定义任务标识,最长 255 个字符。可用于请求与结果的业务,返回时会原样出现在响应的 data 对象中。

响应结构

接口返回 JSON 编码结果,顶层 tasks 数组。

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码。完整错误码请参考 /v3/appendix/errors
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次请求总成本,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger返回错误的任务数量
tasksarray任务结果数组

tasks[] 字段

字段名类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000
status_messagestring任务状态说明
timestring任务执行耗时
costfloat任务成本,单位 USD
result_countintegerresult 数组中的结果数量
patharrayURL 路径
dataobject原样返回请求中提交的任务参数
resultarray结果数组

result[] 字段

字段名类型说明
keywordstring请求中的。返回时 %## 会被解码,+ 会被转为空格
typestring请求中的搜索类型
se_domainstring请求中的搜索域名
location_codeinteger请求中的地区代码
language_codestring请求中的语言代码
datetimestring结果获取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
items_countintegeritems 数组中的结果数量
itemsarrayHTML 页面及数据

items[] 字段

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

请求示例

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"
 }
]'

Python

python
import requests

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

response = requests.post(url, headers=headers, json=data)
print(response.json)

TypeScript

typescript
import axios from "axios";

async function fetchAmazonProductsHtml {
 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);
}

fetchAmazonProductsHtml;

响应示例

json
{
 "version": "0.1.20260520",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "15.1520 sec.",
 "cost": 0.005,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "merchant",
 "function": "products",
 "se": "amazon",
 "language_code": "en_US",
 "location_code": 2840,
 "keyword": "shoes",
 "se_type": "products",
 "device": "desktop",
 "os": "windows"
 },
 "result": [
 {
 }
 ]
 }
 ]
}

错误处理

  • 顶层 status_code 表示整个请求的执行状态
  • tasks[].status_code 表示单个任务的执行状态
  • 建议同时处理顶层状态与任务状态,确保在批处理、参数错误、额不足或数据抓取异常时能够正确降级
  • 完整错误码与状态说明请参考 /v3/appendix/errors

使用建议

  1. 优使用结构化参数 建议优传 keyword + location + language,而不是直接传 url,这样稳定性更高。

  2. 合理控制抓取范围 若只需首屏或前几页结果,可使用较小的 depthmax_crawl_pages,以控制成本与响应时间。

  3. 价格与排序优级 如果已经使用 price_minprice_maxsort_by,不要再依赖 search_param 中的同类控制项,因为会被忽略。

  4. 适合页面级解析场景 该接口返回的是 HTML 原文,更适合需要自定义解析规则、提取页面模块、复刻页面结构或做 DOM 级分析的场景。

实用场景

  • 抓取商品搜索结果页原始 HTML:用于自建解析器,提取标题、价格、评分、评论数、徽章、广告位等细粒度信息。
  • 监控竞品在 Amazon 搜索中的展示变化:按定期抓取 HTML,对比排序、促销标签和页面模块变化,竞品监测。
  • 验证特定筛选与排序条件下的页面表现:结合价格区间、部门、排序规则抓取结果页,检查不同策略下商品差异。
  • 构建类目级搜索样本库:按 department 批量获取不同品类的搜索结果页面,为选品分析和类目研究提供基础数据。
  • 复核结构化结果接口未覆盖的页面:当需要识别目标页面中的特殊组件、实验样式或动态区块时,可直接基于 HTML 做补分析。

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