keywordstringbắt buộc
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.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
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.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
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"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
keywordstringbắt buộcSearch keyword or ASIN to find Amazon products.
countrystringCountry code for the Amazon marketplace.
Mặc định: "US"
Giá trị có thể dùng: 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.
Mặc định: "RELEVANCE"
Giá trị có thể dùng: RELEVANCE, LOWEST_PRICE, HIGHEST_PRICE, REVIEWS, NEWEST, BEST_SELLERS
productConditionstringProduct condition filter for Amazon search results.
Mặc định: "ALL"
Giá trị có thể dùng: ALL, NEW, USED, RENEWED, COLLECTIBLE
isPrimebooleanWhether to return only Prime-eligible products.
Mặc định: false
dealsAndDiscountsstringDeals and discounts filter for Amazon search results.
Mặc định: "NONE"
Giá trị có thể dùng: NONE, ALL_DISCOUNTS, TODAYS_DEALS
pageintegerPage number for pagination.
Mặc định: 1
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Amazon Product SearchAPI này Amazon | $0.014286 mỗi lần gọi | JSON |
Amazon | Từ $0.0033 mỗi lần gọi | JSON |
Amazon | $0.00015 mỗi lần gọi | JSON bất đồng bộ |
Amazon | $0.014286 mỗi lần gọi | JSON |
Amazon | $0.014286 mỗi lần gọi | JSON |
Amazon | Từ $0.00085 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/amazon/search-products với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.014286 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: keyword (string). Tùy chọn: country (một trong số 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 (một trong số RELEVANCE, LOWEST_PRICE, HIGHEST_PRICE, REVIEWS, NEWEST, BEST_SELLERS), productCondition (một trong số ALL, NEW, USED, RENEWED, COLLECTIBLE), isPrime (boolean), dealsAndDiscounts (một trong số NONE, ALL_DISCOUNTS, TODAYS_DEALS) và page (integer). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Amazon Product Search chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Amazon.
Dùng keyword và, tùy chọn, một mã quốc gia được hỗ trợ. Endpoint Product Search này cũng chấp nhận sortBy, productCondition, isPrime, dealsAndDiscounts và page dạng số nguyên. Endpoint Amazon Search riêng biệt dùng k và amazon_domain; tên input và chế độ thực thi của nó không thể dùng thay thế cho yêu cầu này.
Tham chiếu hiện tại mô tả endpoint này là đồng bộ. Sau khi kiểm tra phản hồi HTTP và trạng thái nền tảng đã hoàn tất, hãy đọc payload nghiệp vụ từ outputs[0].data. Danh sách sản phẩm được tài liệu hóa nằm trong payload đó, không phải ở cấp cao nhất của phản hồi nền tảng. Ví dụ trong hướng dẫn chỉ kiểm tra các khóa của payload; nó không cam kết một tập sản phẩm cố định hay triển khai bộ phân tích đầy đủ.
Yêu cầu chấp nhận page dạng số nguyên, và tham chiếu mô tả một trang sản phẩm cho mỗi phản hồi. Đừng suy diễn rằng tổng số lượng là toàn bộ hàng tồn hoặc là bằng chứng rằng mọi trang đều truy xuất được. Giữ nguyên giá bị thiếu hoặc giá trước đó là không xác định thay vì thay bằng 0. Giữ currency, marketplace, query và thời điểm quan sát cho mọi so sánh sau này. Một mức giá được liệt kê không nhất thiết là giá cuối cùng đã bao gồm thuế, phí vận chuyển và coupon.