The Mine Works
← All posts
tutorial October 8, 2026 · 7 min read Updated October 8, 2026

Pull the Top 100 Best Sellers for Every Amazon Subcategory in One Run

Walk an Amazon department with Amazon Bestsellers Scraper and get the top 100 of every subcategory in one run, with a hard cap on lists and cost.

Try the scraper

The actor referenced in this article. Pay only for results delivered.

View the scraper →

Category managers and product researchers rarely stop at a department’s top level list. The useful view sits one level down, where each subcategory of Electronics, Home or Books has its own top 100. Amazon shows those lists one at a time, two pages each, so copying a whole department by hand means opening a few dozen pages and pasting nearly 2,000 rows.

Try it live: Amazon Bestsellers Scraper: Top 100 Best Sellers, 10 Countries. Pay per result delivered. Failed and empty results are never charged.

The Amazon Bestsellers Scraper can follow Amazon’s own category menu down from the categories you give it and read the top 100 of every subcategory it finds, all in one run, with a cap you set on how many lists that can be.

What you get and who it is for

FieldUse when mapping a department
category_nameThe list’s name as Amazon shows it
category_pathPath of the list, unique per list, the key to group by
category_node_idAmazon’s node id, on subcategory rows
category_breadcrumbParent categories and the category, joined with >
category_urlThe list’s page on Amazon
rank, asin, titleThe ranked product
price, currencyPrice shown on the list, in the site’s own currency
rating, review_countWhen the list shows them
byline, formatAuthor and format, on books and media

This is for sellers deciding which subcategory to enter, sourcing teams scanning a department for price bands, agencies building category reports, and analysts who want the whole tree in one table instead of one list at a time. A ranking says what sells, not what buyers complain about, so the 1-star reviews under those products are worth a read before you commit to a subcategory.

The input

{
  "categories": ["electronics"],
  "marketplace": "amazon.com",
  "listType": "bestsellers",
  "maxItemsPerList": 100,
  "subcategoryDepth": 1,
  "maxCategoryLists": 20
}
  • categories: ["electronics"] is a category path, read on the marketplace you pick. Paths differ by site: Electronics is ce-de on amazon.de. When unsure, paste the Best Sellers link instead.
  • subcategoryDepth: 1 reads Electronics plus every subcategory in Amazon’s menu under it. Levels 2 and 3 go further down, and each level multiplies the number of lists.
  • maxCategoryLists: 20 caps the lists one run reads, the department and its subcategories together. Electronics on amazon.com had 18 subcategories in the actor’s test, so 19 lists fit with one to spare.
  • maxItemsPerList: 100 reads the full list. Set 50 to halve the item count.

What the output looks like

[
  {
    "marketplace": "amazon.com",
    "list_type": "bestsellers",
    "category_name": "Electronics",
    "category_path": "electronics",
    "category_breadcrumb": "Electronics",
    "category_url": "https://www.amazon.com/gp/bestsellers/electronics/",
    "rank": 2,
    "asin": "B0FQFB8FMG",
    "title": "Apple AirPods Pro 3 Wireless Earbuds with Active Noise Cancellation...",
    "price": 165,
    "currency": "USD",
    "rating": 4.4,
    "review_count": 16026,
    "page": 1,
    "scraped_at": "2026-10-05T18:09:14.120Z"
  },
  {
    "marketplace": "amazon.co.uk",
    "list_type": "bestsellers",
    "category_name": "Books",
    "category_path": "books",
    "category_breadcrumb": "Books",
    "category_url": "https://www.amazon.co.uk/gp/bestsellers/books/",
    "rank": 1,
    "asin": "1035065517",
    "title": "Gruffalo Granny: The brand new Gruffalo picture book adventure: 3 (The Gruffalo, 3)",
    "price": 7.48,
    "currency": "GBP",
    "rating": 4.5,
    "review_count": 655,
    "byline": "Julia Donaldson",
    "format": "Hardcover",
    "page": 1,
    "scraped_at": "2026-10-05T18:09:14.121Z"
  }
]

These rows come from our run on October 5, 2026 that read two top level lists, amazon.com Electronics and amazon.co.uk Books, 50 items each, without the subcategory walk. Rows from a walk have the same shape plus category_node_id, and the breadcrumb then shows the parent, as in the actor’s amazon.de sample Camera & Photo > Camcorders. In that run, 49 of the 50 Electronics items had a price, with a median of $22.78. On the Books list, 45 of 50 rows carried an author and 38 of 50 had a rating, which is why a per list summary should count missing values rather than assume them.

Run it in Apify Console

  1. Open https://apify.com/themineworks/amazon-bestsellers-scraper and click Try for free.
  2. In Categories (Best Sellers links or category paths), enter electronics.
  3. Set Marketplace (for category paths) to amazon.com and List to Best Sellers.
  4. Set Items per list to 100, Subcategory levels to 1 and Maximum lists per run to 20.
  5. Click Start. Rows arrive in the Output tab list by list.
  6. Click Export and download CSV, JSON or Excel. Filter or pivot on category_path to split the lists.

Run it from Python

pip install apify-client
import csv
from collections import defaultdict
from statistics import median
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("themineworks/amazon-bestsellers-scraper").call(run_input={
    "categories": ["electronics"],
    "marketplace": "amazon.com",
    "listType": "bestsellers",
    "maxItemsPerList": 100,
    "subcategoryDepth": 1,
    "maxCategoryLists": 20,
})

rows = []
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item.get("_type") == "info":
        continue  # the run summary row, never billed
    rows.append(item)

fields = ["category_breadcrumb", "category_path", "category_node_id", "rank", "asin",
          "title", "price", "currency", "rating", "review_count", "product_url"]
with open("electronics_by_subcategory.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.DictWriter(f, fieldnames=fields, extrasaction="ignore")
    writer.writeheader()
    writer.writerows(sorted(rows, key=lambda r: (r["category_path"], r["rank"])))

lists = defaultdict(list)
for r in rows:
    lists[r["category_path"]].append(r)

print(f"{len(rows)} items from {len(lists)} lists")
for path, items in sorted(lists.items()):
    prices = [r["price"] for r in items if "price" in r]
    rated = sum(1 for r in items if "rating" in r)
    mid = f"median {median(prices):,.2f} {items[0].get('currency', '')}" if prices else "no prices"
    print(f"{items[0]['category_breadcrumb']}: {len(items)} items, {mid}, {rated} rated")

# products that lead several subcategories at once
lists_per_asin = defaultdict(set)
for r in rows:
    lists_per_asin[r["asin"]].add(r["category_path"])
spread = sorted(lists_per_asin.items(), key=lambda kv: len(kv[1]), reverse=True)
for asin, paths in spread[:10]:
    if len(paths) > 1:
        print(asin, "ranks in", len(paths), "lists")

The script writes every row to one CSV sorted by list and rank, prints a line per subcategory with its item count, median price and how many items have a rating, and lists the products that rank in more than one list. Those cross listed products are worth knowing about before you add up totals, since each appearance is its own row.

Refresh the map every week

Save the input as a task in Apify Console, open Schedules, and create a schedule with the cron expression 0 6 * * 1 (Mondays at 06:00) for that task. Each run reads every list fresh, so comparing the #1 product per category_path week over week shows which subcategories have a new leader. The actor has no “only new” option; every run returns the full lists. Send each run to a Google Sheet with Apify’s integration, or have a webhook start your own script when the run succeeds and post a summary to Slack.

What it costs

You pay per ranked product delivered: $3.49 per 1,000 on the Bronze plan, $2.99 on Silver, and $2.49 on Gold, Platinum and Diamond, plus a flat $0.005 per run start.

The worst case for a run is maxCategoryLists times maxItemsPerList times the per item price. For the input above, the 19 lists Electronics had in the actor’s test come to at most 1,900 items: $6.63 on Bronze, $5.68 on Silver, $4.73 on Gold. Weekly, that is up to 7,600 items a month, about $26.52 on Bronze plus $0.02 in start fees.

Ways to keep it in check:

  • Set maxCategoryLists before raising the depth. At level 2 or 3 the tree can outgrow your budget fast, and the cap is the hard stop.
  • Use 50 items per list when the top half is enough. It halves every number above.
  • Leave listType on Best Sellers. Both adds the New Releases list for every category you give, so it adds lists and items to the run.
  • Set a maximum cost per run in the run options. The actor stops delivering when the limit is reached.

Limits worth knowing

  • The walk follows Amazon’s menu. Subcategories are the ones listed in Amazon’s category menu under each category the run reads, and nothing else.
  • The cap cuts the walk. If the tree has more lists than maxCategoryLists, some subcategories are not read. The run’s OUTPUT record lists every list’s status and the subcategories found, so check it before you treat the result as the full department.
  • Duplicates across lists are charged. A product that ranks in the department list and in two subcategories gives three rows and three charges.
  • Paths are per site. A path a site does not have comes back as not_found in the run summary, with no charge. Links avoid the guesswork.
  • Fields vary by list. Books and media carry byline and format; new items often have no rating yet; a few items show no price on the list.
Related Actor

Explore the scraper referenced in this article: inputs, outputs, and pricing, then run it on Apify.

Frequently asked questions

How many subcategories does a department have? +

It depends on Amazon's category menu for that department and site. Electronics on amazon.com listed 18 in the actor's own test. The run's OUTPUT record shows the subcategories found, so check it after the first run and set your cap from that.

What is the most one run can cost? +

maxCategoryLists times maxItemsPerList times the per item price. At the default of 50 lists of 100, that is 5,000 items, or $17.45 on the Bronze plan, plus the $0.005 run start fee.

Can I start the walk from a subcategory instead of a whole department? +

Yes. Give a subcategory link or a path with a node id, such as electronics/281407, and set subcategoryDepth to 1 to read that list plus the subcategories under it.

Is a product charged twice if it ranks in two subcategories? +

Yes. Each list is read on its own, so the same product in two lists gives two rows with two ranks, and each row is charged. Only a second copy within the same list is free.

Apify Store

Find a ready-made scraper for your job

Apify has over 80,000 scrapers and automations, ours included. Start free with $5 of platform credit every month.