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.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก 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.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform 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 key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ 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 นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Amazon Product SearchAPI นี้ Amazon | $0.014286 ต่อการเรียก | JSON |
Amazon | เริ่มต้นที่ $0.0033 ต่อครั้ง | JSON |
Amazon | $0.00015 ต่อการเรียก | Async JSON |
Amazon | $0.014286 ต่อการเรียก | JSON |
Amazon | $0.014286 ต่อการเรียก | JSON |
Amazon | เริ่มต้นที่ $0.00085 ต่อครั้ง | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/amazon/search-products โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน 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 ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Amazon Product Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Amazon API แยกต่างหาก
ใช้ keyword และ country code ที่รองรับตามต้องการ เอ็นด์พอยต์ Product Search นี้ยังรองรับ sortBy, productCondition, isPrime, dealsAndDiscounts และ page แบบจำนวนเต็มด้วย เอ็นด์พอยต์ Amazon Search แยกต่างหากใช้ k และ amazon_domain; ชื่อฟิลด์และโหมดการทำงานไม่สามารถใช้แทนกันได้กับคำขอนี้
เอกสารอ้างอิงปัจจุบันระบุว่าเอ็นด์พอยต์นี้เป็นแบบ synchronous หลังจากตรวจสอบ HTTP response และสถานะ platform ที่เสร็จสมบูรณ์แล้ว ให้อ่าน payload ทางธุรกิจจาก outputs[0].data รายการ products ที่เอกสารระบุอยู่ภายใน payload นั้น ไม่ได้อยู่ที่ระดับบนสุดของ platform response ตัวอย่างใน tutorial ตรวจสอบเพียงคีย์ของ payload; ไม่ได้สัญญาว่าจะมีชุด products คงที่หรือทำ parser แบบเต็ม
คำขอนี้รับ page แบบจำนวนเต็ม และเอกสารอ้างอิงอธิบายว่าให้ผลลัพธ์เป็น products หนึ่งหน้าต่อหนึ่ง response อย่าสรุปว่า total count คือสินค้าคงคลังทั้งหมด หรือเป็นหลักฐานว่าดึงได้ทุกหน้า ควรเก็บราคาที่หายไปหรือค่า earlier-price ไว้เป็น unknown แทนการแทนด้วย 0 เก็บ currency, marketplace, query และ observation time ไว้เมื่อเปรียบเทียบภายหลัง จำนวนเงินที่แสดงไม่จำเป็นต้องเป็นราคาสุดท้ายที่รวมภาษี ค่าจัดส่ง และคูปองแล้ว