Amazon Search API
Overview
The Amazon Search Results API allows you to extract product details and pricing based on specific keywords, brands, or a combination of these from Amazon programmatically. This API provides real-time access to search results, making it an essential tool for market research, competitor analysis, and e-commerce platforms.
Authentication
Visit our Authentication Docs on learning how to get started on integrating this API in your application.
Endpoint
GET https://get.scrapehero.com/amz/keyword-search/?x-api-key=XXXXXXXXXXXXXX&keyword=Sanitizer&country_code=US
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyword | string | Yes | search term |
url | string | Yes | listing page url |
page | string | No | Review page number |
country_code | string | No | ISO Aplha2 Country Code |
search term or listing page url must be present. API supports country_code's US, UK and CA
Response Format
The API returns data in JSON format. Here's an example of the response structure:
{
"query": {
"domain": "com",
"country_code": "US",
"keyword": "smart phones",
"page": 1
},
"search_results": [
{
"name": "Moto G Play 2023 3-Day Battery Unlocked Made for US 3/32GB 16MP Camera Navy Blue",
"sale_price": "98.14",
"regular_price": "169.99",
"currency": "USD",
"asin": "B0BQ118F2T",
"review_count": "1211",
"rating": "4.0",
"badge": "Overall Pick",
"image_url": "https://m.media-amazon.com/images/I/61K1Fz5LxvL._AC_UY218_.jpg",
"product_url": "https://www.amazon.com/Moto-3-Day-Battery-Unlocked-Camera/dp/B0BQ118F2T/ref=sr_1_1?qid=1725342272&sr=8-1",
"rank": "1",
"search_url": "https://www.amazon.com/s?k=smart+phones",
"monthly_sales_volume": "4K+ bought in past month",
"weekly_sales_volume": null
},
{
"name": "SAMSUNG Galaxy A15 5G A Series Cell Phone, 128GB Unlocked Android Smartphone, AMOLED Display, Expandable Storage, Knox Security, Super Fast Charging, US Version, 2024, Blue Black",
"sale_price": "199.99",
"regular_price": null,
"currency": "USD",
"asin": "B0CN1QSH8Q",
"review_count": "545",
"rating": "4.1",
"badge": null,
"image_url": "https://m.media-amazon.com/images/I/41vU1u8DZXL._AC_UY218_.jpg",
"product_url": "https://www.amazon.com/SAMSUNG-Unlocked-Smartphone-Expandable-Security/dp/B0CN1QSH8Q/ref=sr_1_2?qid=1725342272&sr=8-2",
"rank": "2",
"search_url": "https://www.amazon.com/s?k=smart+phones",
"monthly_sales_volume": "2K+ bought in past month",
"weekly_sales_volume": null
},
{
"name": "SAMSUNG Galaxy A13 LTE, Factory Unlocked Smartphone, Android Cell Phone, Water Resistant, 50MP Camera, US Version, 32GB, Black (Renewed)",
"sale_price": "94.00",
"regular_price": null,
"currency": "USD",
"asin": "B09Z8P34NM",
"review_count": "533",
"rating": "4.0",
"badge": null,
"image_url": "https://m.media-amazon.com/images/I/61IX+1qw35L._AC_UY218_.jpg",
"product_url": "https://www.amazon.com/SAMSUNG-Galaxy-A13-LTE-32GB/dp/B09Z8P34NM/ref=sr_1_3?qid=1725342272&sr=8-3",
"rank": "3",
"search_url": "https://www.amazon.com/s?k=smart+phones",
"monthly_sales_volume": "2K+ bought in past month",
"weekly_sales_volume": null
}
],
"next_page": "https://get.scrapehero.com/amz/keyword-search/?keyword=smart phones&country_code=US&page=2"
}
Response Fields
Field | Type | Description |
---|---|---|
name | string | product name |
sale_price | string | disconted price |
regular_price | string | regular price |
currency | string | currency |
asin | string | product asin |
review_count | string | product review count |
rating | string | product rating |
badge | string | badge like bestseller or Overall pick |
image_url | string | image url |
product_url | string | product url |
rank | string | product listing rank |
search_url | string | search url |
monthly_sales_volume | string | monthly sales volume |
weekly_sales_volume | string | weekly sales volume |
next_page | string | pagination url |
Usage Example
Here's an example of how to use the API with Python:
- Node.js
- Python
- Java
- Ruby
const http = require("https");
const options = {
"method": "GET",
"hostname": "get.scrapehero.com",
"port": null,
"path": "/amz/keyword-search/?x-api-key=XXXXXXXXXXXXXX&keyword=Sanitizer&country_code=US",
"headers": {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
import http.client
conn = http.client.HTTPSConnection("get.scrapehero.com")
conn.request("GET", "/amz/keyword-search/?x-api-key=XXXXXXXXXXXXXX&keyword=Sanitizer&country_code=US")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse<String> response = Unirest.get("https://get.scrapehero.com/amz/keyword-search/?x-api-key=<YOUR_API_KEY>&keyword=Sanitizer&country_code=US")
.asString();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://get.scrapehero.com/amz/keyword-search/?x-api-key=XXXXXXXXXXXXXX&keyword=Sanitizer&country_code=US")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
This API uses 10 data credit per API call. Learn more about data credits.
Rate Limits
Rate limits are based off the plan that you have subscribed to. To learn more about the plan specification vist our Plans page.
Response Codes
Check out the response codes here.
Best Practices
- Use appropriate error handling in your code.
- Implement exponential backoff for rate limiting.
- Cache results when possible to minimize API calls.
Support
If you encounter any issues or have questions, please contact our API support team at cloud-support@scrapehero.com or visit our API documentation at https://app.scrapehero.com/docs/api_intro.