keywordstring必填
Search keyword or ASIN to find Amazon products.
https://api.sandbase.ai/v1/api/amazon/search-productsSearch Amazon marketplace products by keyword or ASIN with country, sort, condition, Prime-only, deals, and page controls.
您的输出将显示在这里
完成输入,然后点击运行。
Returns a page of Amazon search results for a keyword or ASIN. Each product has its ASIN, title, rating, offer count, badges, and delivery text. The only required input is keyword.
country.dealsAndDiscounts to ALL_DISCOUNTS or TODAYS_DEALS.curl -X POST "https://api.sandbase.ai/v1/api/amazon/search-products" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "iphone"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword or ASIN to find Amazon products. |
country | string | No | Country code for the Amazon marketplace. |
dealsAndDiscounts | string | No | Deals and discounts filter for Amazon search results. |
isPrime | boolean | No | Whether to return only Prime-eligible products. |
page | integer | No | Page number for pagination. |
productCondition | string | No | Product condition filter for Amazon search results. |
sortBy | string | No | Sort order for Amazon product search results. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"country": "US",
"domain": "www.amazon.com",
"products": [
{
"asin": "B0HJHXTRFN",
"climate_pledge_friendly": false,
"currency": "USD",
"delivery": "FREE delivery Thu, Nov 5Or fastest delivery Tomorrow, Nov 4",
"has_variations": true,
"is_amazon_choice": false,
"is_best_seller": false,
"is_prime": false,
"product_minimum_offer_price": "$1,549.00",
"product_num_offers": 1,
"product_num_ratings": 13,
"product_original_price": null
}
],
"total_products": 259
}
| Field | Meaning |
|---|---|
total_products | Number of products the search matched. |
country / domain | Amazon marketplace country code and domain that served the search. |
products[].asin | Amazon product ID. Use it to look up the product elsewhere. |
products[].product_title | Listing title as shown in the search results. |
products[].product_price / products[].product_original_price | Current listed amount and the earlier amount shown before a discount, both as formatted strings with a currency symbol. The original amount is null when no discount is shown. |
products[].product_minimum_offer_price / products[].product_num_offers | Lowest amount among the offers for the product, and the number of offers listed. |
products[].currency | Currency code for the amounts on the listing, for example USD. |
products[].product_star_rating / products[].product_num_ratings | Average star rating as a string, and the count of ratings. |
products[].is_best_seller / products[].is_amazon_choice / products[].is_prime / products[].climate_pledge_friendly | Boolean flags for the badges and Prime eligibility shown on the listing. |
products[].sales_volume | Text such as 1K+ bought in past month. |
products[].product_url / products[].product_photo | Link to the product page and the main product image URL. |
For two separate Python requests—a keyword search and a manually selected ASIN lookup—see the Amazon research walkthrough. Choose this endpoint's country-code parameters rather than the other Search variant's k and amazon_domain fields.
B0DHJ896RY as keyword to search for a specific product.page to get more results. Each response holds one page of products, and total_products shows the overall match count.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/amazon/search-products" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"sortBy": "RELEVANCE",
"country": "US",
"isPrime": false,
"keyword": "iphone",
"productCondition": "ALL",
"dealsAndDiscounts": "NONE"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
keywordstring必填Search keyword or ASIN to find Amazon products.
countrystringCountry code for the Amazon marketplace.
默认值:"US"
可选值:US, AU, BR, CA, CN, FR, DE, IN, IT, MX, NL, SG, ES, TR, AE, GB, JP, SA, PL, SE, BE, EG, ZA, IE
sortBystringSort order for Amazon product search results.
默认值:"RELEVANCE"
可选值:RELEVANCE, LOWEST_PRICE, HIGHEST_PRICE, REVIEWS, NEWEST, BEST_SELLERS
productConditionstringProduct condition filter for Amazon search results.
默认值:"ALL"
可选值:ALL, NEW, USED, RENEWED, COLLECTIBLE
isPrimebooleanWhether to return only Prime-eligible products.
默认值:false
dealsAndDiscountsstringDeals and discounts filter for Amazon search results.
默认值:"NONE"
可选值:NONE, ALL_DISCOUNTS, TODAYS_DEALS
pageintegerPage number for pagination.
默认值:1
这是该 API 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 Playground 中运行 API 以查看其响应。
探索更多
| API | 价格 | 响应 |
|---|---|---|
Amazon | $0.014286 每次调用 | JSON |
Amazon | 每次调用从 $0.0033 起 | JSON |
Amazon | $0.00015 每次调用 | 异步 JSON |
Amazon | $0.014286 每次调用 | JSON |
Amazon | $0.014286 每次调用 | JSON |
Amazon | 每次调用从 $0.00085 起 | JSON |
问题
向 https://api.sandbase.ai/v1/api/amazon/search-products 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.014286,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
必填:keyword (string)。 可选:country(US, AU, BR, CA, CN, FR, DE, IN, IT, MX, NL, SG, ES, TR, AE, GB, JP, SA, PL, SE, BE, EG, ZA, IE 之一), sortBy(RELEVANCE, LOWEST_PRICE, HIGHEST_PRICE, REVIEWS, NEWEST, BEST_SELLERS 之一), productCondition(ALL, NEW, USED, RENEWED, COLLECTIBLE 之一), isPrime (boolean), dealsAndDiscounts(NONE, ALL_DISCOUNTS, TODAYS_DEALS 之一) 和 page (integer)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Amazon Product Search 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Amazon API 访问权限。
使用 keyword,并可选提供受支持的国家/地区代码。这个 Product Search endpoint 还接受 sortBy、productCondition、isPrime、dealsAndDiscounts 以及整数 page。单独的 Amazon Search endpoint 使用 k 和 amazon_domain;它的输入名称和执行模式与此请求不可互换。
当前参考文档将此 endpoint 描述为同步。检查 HTTP 响应和已完成的平台状态后,请从 outputs[0].data 读取业务负载。文档中的 products 列表位于该负载内,而不是平台响应的顶层。教程中的示例只检查了负载键;它并不保证一组固定的 products,也不会实现完整解析器。
该请求接受整数 page,参考文档将每个响应描述为一页产品。不要据此推断总数就是完整库存,也不要据此证明每一页都可获取。对于缺失的价格或更早的价格值,应保持未知,不要用 0 替换。后续比较时请保留 currency、marketplace、query 和观察时间。列表中的金额不一定就是包含税费、运费和优惠券后的最终价格。