采集为异步:提交 run → 轮询 → 取数。完整流程见 快速开始;统一响应信封 / run 状态机 / 计费 / 错误码见 认证与错误处理。本页只列各端点的 target 字段与输出字段。
快速说明
- Base URL:
https://api.antsdata.com/v1 - 方法与路径:提交 run 均为
POST /v1/scraper/amazon/<资源>;轮询/取数/下载走通用的GET /v1/scraper/runs/{id}(见快速开始) - 鉴权:请求头
Authorization: Bearer ants_xxx(静态 API Key) - Content-Type:
application/json - 提交体:统一
{ "deliveryMode": "async", "recordLimit": 1000, "targets": [ … ] };targets[]每个元素的字段见下方各端点「target 字段」,一个 run 可含多个 target(逐目标成败看轮询返回的tasks[])。
💡 也可用
deliveryMode: "sync"同步模式(小任务阻塞等终态,超时自动 fallback 转轮询)——详见 快速开始 · 同步模式。
端点一览
| 端点 | 路径 | 说明 |
|---|---|---|
| 商品详情 | POST /v1/scraper/amazon/product |
采集商品详情(价格 / 评分 / 卖家 / 变体 / 图片等) |
| 卖家信息 | POST /v1/scraper/amazon/sellers |
采集卖家 storefront 公开信息 |
Product — 商品详情
POST /v1/scraper/amazon/product
target 字段(targets[] 每个元素):
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
url |
string | ✅ | 商品 URL(URL 格式;须含 /dp/<ASIN> 或 /gp/product/<ASIN>) |
country |
string | — | 出口国家(ISO alpha-2,默认 us) |
输出字段(取数时 records 的 items[] 每条):
| 字段 | 类型 | 说明 |
|---|---|---|
asin |
string | 商品 ASIN |
parent_asin |
string | 父 ASIN |
title |
string | 标题 |
product_name |
string | 标题(同 title) |
brand |
string | 品牌 |
domain |
string | 站点域名 |
url |
string | canonical URL |
product_description |
string | 商品描述 |
features |
array | About this item 要点 |
initial_price |
string | 原价 |
final_price |
string | 现价 |
currency |
string | 币种(缺省回退 SGD) |
coupon |
string | 优惠券文案 |
coupon_discount_percentage |
string | 优惠券折扣百分比 |
availability |
string | 库存状态 |
max_quantity |
string | 最大可购数量 |
product_dimensions |
string | 商品尺寸 |
product_details |
object | 商品参数键值表(品牌/尺寸/榜单等) |
rating |
string | 平均星级 |
reviews_count |
string | 评论总数 |
rating_stars_distribution |
array | 星级分布 |
rating_stars_distribution.rating |
string | 星级 |
rating_stars_distribution.percentage |
string | 占比 |
top_review |
string | 首条评论 |
customer_says |
string | 评价摘要 |
category |
array | 面包屑分类 |
category.name |
string | 分类名 |
category.url |
string | 分类链接 |
sales_rank |
array | 榜单排名 |
sales_rank.rank |
string | 排名 |
sales_rank.name |
string | 榜单名 |
sales_rank.url |
string | 榜单链接 |
badge |
string | 徽章(如 Amazon's Choice) |
amazon_choice |
boolean | 是否 Amazon's Choice |
bought_past_month |
string | 上月购买量文案 |
buybox |
object | buybox 信息 |
buybox.buybox_price |
string | buybox 价格 |
buybox.bubox_availability |
string | buybox 库存(平台字段名原样) |
buybox.buybox_seller |
string | buybox 卖家 |
seller_id |
string | 卖家 ID |
seller_url |
string | 卖家链接 |
featured_merchant |
object | 精选商家 |
featured_merchant.ships_from |
string | 发货方 |
featured_merchant.sold_by |
string | 销售方 |
featured_merchant.condition |
string | 成色 |
other_sellers_prices |
array | 其它卖家首条报价(抓取失败降级空数组) |
other_sellers_prices.price |
string | 价格 |
other_sellers_prices.delivery |
string | 配送 |
other_sellers_prices.seller_name |
string | 卖家名 |
other_sellers_prices.seller_url |
string | 卖家链接 |
other_sellers_prices.ships_from |
string | 发货地 |
other_sellers_prices.num_of_ratings |
string | 评分数 |
is_prime_eligible |
boolean | 是否 Prime |
images |
array | 高清图直链 |
images_count |
number | 图片数量 |
videos |
array | 视频链接 |
video_count |
number | 视频数量 |
has_videos |
boolean | 是否有视频 |
variations |
array | 变体 |
variations.asin |
string | 变体 ASIN |
variations.selected |
boolean | 是否当前选中 |
variations.dimensions |
object | 变体维度 |
department |
string | 所属部门 |
page_type |
string | 恒为 Product |
提交示例:
curl -X POST "https://api.antsdata.com/v1/scraper/amazon/product" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deliveryMode": "async",
"recordLimit": 1000,
"targets": [
{ "url": "https://www.amazon.com/dp/B08N5WRWNW" }
]
}'
返回 HTTP 201 +
{ "id": <run 号>, "status": "queued" },随后按快速开始轮询取数。
Sellers — 卖家信息
POST /v1/scraper/amazon/sellers
target 字段(targets[] 每个元素):
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
url |
string | ✅ | 卖家 storefront URL(URL 格式;须为 /sp?...seller=<id> 形态) |
country |
string | — | 出口国家(ISO alpha-2,默认 us) |
输出字段(取数时 records 的 items[] 每条):
| 字段 | 类型 | 说明 |
|---|---|---|
seller_id |
string | 卖家 ID(从 URL seller= 取) |
url |
string | 请求的卖家 URL |
seller_name |
string | 卖家名称 |
description |
string | 卖家介绍 |
business_name |
string | 工商名称 |
business_address |
string | 工商地址 |
detailed_info |
array | 详情区标题列表 |
detailed_info.title |
string | 标题 |
stars |
string | 生涯星级文案 |
rating_positive |
string | 好评率 |
feedbacks |
array | 反馈样本 |
feedbacks.stars |
string | 星级 |
feedbacks.date |
string | 日期 |
feedbacks.text |
string | 反馈内容 |
feedbacks_percentages |
object | 各星占比 |
feedbacks_percentages.star_5 |
string | 5 星占比 |
feedbacks_percentages.star_4 |
string | 4 星占比 |
feedbacks_percentages.star_3 |
string | 3 星占比 |
feedbacks_percentages.star_2 |
string | 2 星占比 |
feedbacks_percentages.star_1 |
string | 1 星占比 |
rating_count_m1 |
number | 近 1 月评分数 |
rating_count_m3 |
number | 近 3 月评分数 |
rating_count_m12 |
number | 近 12 月评分数 |
rating_count_lifetime |
number | 生涯评分数 |
shipping_policies |
string | 配送政策 |
return_policy |
string | 退换货政策 |
privacy_security |
string | 隐私与安全 |
privacy_policy |
string | 隐私政策 |
help_content |
string | 帮助联系信息 |
products_link |
string | 卖家全部商品链接 |
提交示例:
curl -X POST "https://api.antsdata.com/v1/scraper/amazon/sellers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deliveryMode": "async",
"recordLimit": 1000,
"targets": [
{ "url": "https://www.amazon.com/sp?ie=UTF8&seller=AOY345LA7APSA" }
]
}'
返回 HTTP 201 +
{ "id": <run 号>, "status": "queued" },随后按快速开始轮询取数。
取数
提交后
GET /v1/scraper/runs/{id}轮询至succeeded,再GET /v1/scraper/runs/{id}/records?page=1&pageSize=20分页取数,或GET /v1/scraper/runs/{id}/download?format=json|csv|excel下载整份产物(端到端示例详见快速开始)。
下一步
- 平台指南:TikTok · X · Instagram · Facebook · LinkedIn · Google · YouTube
- 同步搜索:Google SERP
- 认证与错误处理 — 统一响应信封、run 状态机、计费与错误码
FAQ
Q: 一个 run 能采集多个商品 / 卖家吗?
可以。targets 是数组,一个 run 可含多个目标,逐目标成败见轮询返回的 tasks[](详见认证与错误处理)。
Q: product 的 url 有什么格式要求?
须为商品详情页链接,包含 /dp/<ASIN> 或 /gp/product/<ASIN>;sellers 的 url 须为 /sp?...seller=<id> 形态的卖家 storefront 链接。
Q: country 不传会怎样?
默认走 us 出口。需要其它站点时传对应 ISO alpha-2 国家码(如 de / uk)。
Q: 价格 / 评分为什么是字符串?
initial_price / final_price / rating / reviews_count 等按平台原样透出为字符串,需要数值请自行转换;currency 缺省时回退 SGD。
Q: other_sellers_prices 为空是什么意思?
其它卖家报价抓取失败时降级为空数组,不影响其余字段照常出数。
Q: 数据是实时的吗?
是。每个 run 都实时采集,返回目标平台当前的数据。
