Blog · · 4 min read
Get Amazon Best Sellers Data With an API
Read the ranked best seller list for any Amazon category as JSON: rank, ASIN, title, price, stars, reviews. Working code, the fields, and the limits.
Amazon's best seller lists show what is selling right now in every category, and they change through the day. Sellers use them to spot demand, and analysts use them to track a price band or a brand. This guide shows how to read one list with a single GET request, and what each field means.
Request a list
Send a category id. A top-level category looks like electronics, books or home-garden. Every call needs an API key. New accounts get 100 free credits and a first key is created automatically on sign-up (it is shown once on the dashboard). Sign in at scrapingrabbit.com/login, then send the key in the x-api-key header (a Bearer token also works). The code below reads it from the SCRAPINGRABBIT_API_KEY environment variable, so no key is ever written into your code.
curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/amazon/bestsellers?category_id=electronics"
A successful call costs 1 credit, as the OpenAPI file lists it. A wrong category id returns no results.
A shortened real answer, read on 3 December 2026 (three of the ranked items and three of the sub-categories):
{
"success": true,
"data": {
"bestseller_type": "bestsellers",
"category_id": "electronics",
"title": "Best Sellers in Electronics",
"domain": "com",
"categories": [
{ "name": "Accessories & Supplies", "category_id": "electronics/281407" },
{ "name": "Headphones", "category_id": "electronics/172541" },
{ "name": "Wearable Technology", "category_id": "electronics/10048700011" }
],
"results": [
{
"rank": 1,
"asin": "B08JHCVHTY",
"title": "blink plus plan with monthly auto-renewal",
"stars": 4.4,
"total_reviews": 282368,
"price": "$11.99",
"extracted_price": 11.99
},
{
"rank": 2,
"asin": "B0GJTFXNRX",
"title": "Apple AirTag (2nd Generation): Tracker for Keychain, Wallet, and More; ...",
"stars": 4.6,
"total_reviews": 13765,
"price": "$24.99",
"extracted_price": 24.99
},
{
"rank": 9,
"asin": "B09B8V1LZ3",
"title": "Amazon Echo Dot (5th gen), Vibrant sounding speaker, ...",
"stars": 4.7,
"total_reviews": 202902,
"price": "$79.99",
"extracted_price": 79.99
}
]
}
}
Each item also has a product url, an optimized_url (a short link built from the ASIN) and two image addresses. We left those out to keep the example short.
What the fields mean
| Field | Meaning |
|---|---|
title | The name of the list, such as Best Sellers in Electronics |
categories | Sub-categories you can ask for next, each with its own category_id |
results[].rank | Position in the list, 1 is the top seller |
results[].asin | Amazon's product id, the key to join with other data |
results[].title | The product name as Amazon shows it |
results[].stars | Average rating |
results[].total_reviews | Number of ratings |
results[].price and extracted_price | The price as text, and the same price as a number |
Use extracted_price for math. The price text can include a currency symbol and commas, such as $1,149.00.
Read it in code
async function bestSellers(categoryId) {
const url = `https://api.scrapingrabbit.com/v1/amazon/bestsellers?category_id=${encodeURIComponent(categoryId)}`;
const res = await fetch(url, { headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY } });
const body = await res.json();
if (!body.success) return [];
return body.data.results;
}
const items = await bestSellers("electronics");
const topCheap = items
.filter((item) => item.extracted_price < 50 && item.stars >= 4.5)
.slice(0, 5)
.map((item) => ({ rank: item.rank, asin: item.asin, price: item.extracted_price }));
console.log(topCheap);
The code keeps items under 50 dollars with a rating of at least 4.5 and prints the first five with their rank. In the first ten items we read, five cost under 50 dollars, so a price filter like this narrows the list quickly.
The same in Python:
import os
import requests
res = requests.get(
"https://api.scrapingrabbit.com/v1/amazon/bestsellers",
params={"category_id": "electronics/172541"},
headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
timeout=90,
)
body = res.json()
if body["success"]:
for item in body["data"]["results"][:5]:
print(item["rank"], item["extracted_price"], item["title"][:60])
That request asks for the Headphones sub-category, using the id taken from the categories list above.
Walk the category tree
Start with a top-level id, read its categories, and request each category_id in turn. One call per category costs one credit, so a tree of twenty sub-categories is twenty credits. Store the results with the time you read them, since ranks move during the day.
If you want to look at one product in more detail, take its asin from the list and use it with the Amazon product endpoints. Our free product search tool shows what a search for the same keyword returns.
Things to plan for
- Ranks are a snapshot. The list changes through the day, so store the time you read it.
- Not every item is a device. Plans, accessories and bundles can rank high. Filter by title if you need only one kind.
- Amazon.com only. This endpoint does not read other marketplaces.
- A wrong category id returns no results. Take ids from the
categorieslist, not from guesses. - Calls can be slow. Reading Amazon takes a few seconds, so set a generous timeout, as the Python example does.
- Rate limits and credits. Each key is limited per minute: 10 requests on the free plan, 60 on Starter, 120 on Pro and 300 on Scale. Every successful call costs credits, so cache each list.
- Always check
success. A failed request returnssuccess: false, acodesuch asRATE_LIMITEDorINVALID_API_KEY, and amessage. Failed calls are not charged.
Try it without code
The free Amazon best sellers viewer works in the browser with no key and shows these lists for a category you pick.
Try it yourself
Frequently asked questions
How do I find the id of a sub-category?
Ask for a top-level category such as electronics. The answer has a categories list, and each entry carries its own category_id, for example electronics/281407 for Accessories & Supplies. Pass that value to go one level down.
Does the list include things that are not physical products?
Yes. On the day we read it, the number one item in Electronics was a subscription plan for a camera service. The list shows what sells, so filter by title if you only want devices.
Can I read a marketplace other than amazon.com?
Not through this endpoint. It reads Amazon.com only.