Skip to main content

Amazon Best Seller API

Overview​

The Amazon Best Seller API retrieves product listings of top-selling items from any category on Amazon. It provides real-time product details, including best seller rank, pricing, review count, ratings, and more.

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/best-sellers/?url=<Encoded-URL>&x-api-key=YOUR-API-KEY

Request Parameters​

ParameterTypeRequiredDescription
product_urlstringYesProduct URL from walmart

Response Format​

The API returns data in JSON format. Here's an example of the response structure:

{
"category": "Packaged Tomato Soups",
"category_hierarchy": [
{
"name": "Any Department",
"link": "https://amazon.com/Best-Sellers/zgbs/ref=zg_bs_unv_grocery_0_16319751_5"
},
{
"name": "Grocery & Gourmet Food",
"link": "https://amazon.com/Best-Sellers-Grocery-Gourmet-Food/zgbs/grocery/ref=zg_bs_unv_grocery_1_16319751_4"
},
{
"name": "Pantry Staples",
"link": "https://amazon.com/Best-Sellers-Grocery-Gourmet-Food-Pantry-Staples/zgbs/grocery/18787303011/ref=zg_bs_unv_grocery_2_16319751_3"
},
{
"name": "Soups, Stocks & Broths",
"link": "https://amazon.com/Best-Sellers-Grocery-Gourmet-Food-Soups-Stocks-Broths/zgbs/grocery/16319621/ref=zg_bs_unv_grocery_3_16319751_2"
},
{
"name": "Tomato Soups",
"url": "https://www.amazon.com/gp/bestsellers/grocery/16319751?pg=1"
}
],
"child_categories": [],
"next": "https://get.scrapehero.com/amz/best-sellers/?url=https%3A//www.amazon.com/Best-Sellers-Grocery-Gourmet-Food-Packaged-Tomato-Soups/zgbs/grocery/16319751/ref%3Dzg_bs_pg_2_grocery%3F_encoding%3DUTF8%26pg%3D2",
"url": "https://www.amazon.com/gp/bestsellers/grocery/16319751?pg=1",
"product_listings": [
{
"rank": 1,
"asin": "B009LJO3R2",
"name": "Campbell's Condensed Tomato Soup, 10.75 oz Can (4 Pack)",
"ratings_count": 103122,
"rating": "4.6",
"sale_price": "$4.49",
"image": "https://images-na.ssl-images-amazon.com/images/I/71br7uwjCyL._AC_UL300_SR300,200_.jpg",
"is_prime": false,
"product_url": "https://www.amazon.com/Campbells-Condensed-Tomato-Soup-10-75/dp/B009LJO3R2/ref=zg_bs_g_16319751_d_sccl_1/136-3892723-7878042?psc=1"
},
{
"rank": 2,
"asin": "B089B65L9N",
"name": "Campbell's Tomato Soup Less Sodium, Condensed, 10.75 oz Can, Pack of 6",
"ratings_count": 234,
"rating": "4.5",
"sale_price": "$17.99",
"image": "https://images-na.ssl-images-amazon.com/images/I/81dT6A7Q5KL._AC_UL300_SR300,200_.jpg",
"is_prime": false,
"product_url": "https://www.amazon.com/Campbells-Tomato-Sodium-Condensed-10-75/dp/B089B65L9N/ref=zg_bs_g_16319751_d_sccl_49/142-2028693-0699125?psc=1"
},
{
"rank": 3,
"asin": "B0BDZXVL7F",
"name": "Pacific Foods Organic Tomato Bisque Soup, 16.3 oz Can (12 Pack)",
"ratings_count": 7,
"rating": "4.1",
"sale_price": "$35.76",
"image": "https://images-na.ssl-images-amazon.com/images/I/812-ZWjw3KL._AC_UL300_SR300,200_.jpg",
"is_prime": false,
"product_url": "https://www.amazon.com/Pacific-Foods-Organic-Tomato-Certified/dp/B0BDZXVL7F/ref=zg_bs_g_16319751_d_sccl_50/142-2028693-0699125?psc=1"
}
]
}

Response Fields​

FieldTypeDescription
categorystringproduct category
category_hierarchydictproduct category hierarchy
namestringproduct name
rankstringproduct rank
asinstringasin value
sale_pricestringdiscounted price
imagestringproduct image
is_primeboolprime or not
product_urlstringproduct link from amazon
nextstringpagination url
urlstringinput url

Usage Example​

Here's an example of how to use the API with Python:

const http = require("https");

const options = {
"method": "GET",
"hostname": "get.scrapehero.com",
"port": null,
"path": "/amz/best-sellers/?x-api-key=XXXXXXXXXXXXXX&url=https%253A%2F%2Fwww.amazon.com%2FBest-Sellers-Appstore-Android%2Fzgbs%2Fmobile-apps%2Fref%253Dzg_bs_nav_0&page=1",
"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();

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​

  1. Use appropriate error handling in your code.
  2. Implement exponential backoff for rate limiting.
  3. 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.