# Amazon Best Sellers Scraper - Full Top 100 per Category (`apex_capricorn/amazon-bestsellers`) Actor

Scrape the Amazon.com Best Sellers list for any category: all 100 ranks (both pages, lazy-loaded items included) with ASIN, title, price, rating, review count and image. Fails loudly on captchas or layout changes instead of returning partial data. $1.50 per 1,000 products, no start fee.

- **URL**: https://apify.com/apex_capricorn/amazon-bestsellers.md
- **Developed by:** [Capricorn Data](https://apify.com/apex_capricorn) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Amazon Best Sellers Scraper – full Top 100 per category

> Built and maintained by an AI agent (Grok Bot) on behalf of the publisher, **Capricorn Data**. The code,
> tests and this README were written by the agent.

Get the **Amazon.com Best Sellers list for the categories you choose**: rank, ASIN, title, price, star
rating, number of ratings and thumbnail for **every rank from #1 to #100** (both list pages, including the
products Amazon only loads while you scroll).

### What you get

- Up to 100 products per category: page 1 (#1–50) and page 2 (#51–100). Each page is scrolled until all
  50 entries are loaded, and the rank sequence is checked for gaps before anything is saved.
- Category URLs **or** short slugs (`kitchen`, `electronics`, `toys-and-games`, sub-categories like `kitchen/289668`).
- Clean product URLs (`https://www.amazon.com/dp/<ASIN>`), no tracking or session parameters.
- Images, fonts, video and ad / metrics requests are not downloaded (only the thumbnail URL is returned),
  to keep traffic low.
- **Reports every problem, never hides it:**
  - A captcha / robot check, an Amazon error page, an empty list or a page that did not finish loading
    is retried with a new proxy session (default 3 attempts, exponential backoff). Pages are never
    delivered half-loaded.
  - A page that still fails is logged in the run log and listed in the **`ERRORS`** record of the run's
    key-value store (with `errorType`, `errorMessage`, the category, the missing `ranks` and the number of
    attempts), free of charge. The dataset contains only real products. The status message counts the
    errors, e.g. `Done: 150 products from 1 of 2 categories; 1 error(s): 1x BLOCKED; see ERRORS record`.
  - If Amazon changes the page layout (unrecognized rank, price or rating), that page is reported as
    `PARSE_ERROR` instead of guessing.
  - The run ends as **FAILED** only if no product at all could be delivered.
  - The run watches its own timeout and stops cleanly (with `TIME_BUDGET_EXHAUSTED` rows for what was not
    loaded) instead of being cut off.
  - A run summary (`RUN_SUMMARY`) lists every category's status, and the HTML of failed pages is kept
    for diagnosis.
- Only amazon.com (US, USD) in this version.

### Pricing (pay per product, no start fee)

You pay **only for products delivered to the dataset**: $0.0015 per product (**$1.50 per 1,000**).
There is no charge per run start, and **nothing is charged for blocked or failed pages**: a page's products
are saved and charged only after the whole page loaded and passed the checks.

Set *Maximum cost per run* in Apify: the Actor stops loading new pages once the budget is used.

| Example | Cost |
|---|---|
| 1 category, Top 100 | $0.15 |
| 10 categories, Top 100 | $1.50 |
| 25 categories, Top 50 | $1.88 |

### Input

| Field | Default | Description |
|---|---|---|
| `categories` | (required) | Best Sellers URLs or slugs, up to 50 per run |
| `maxItemsPerCategory` | 100 | 1–100; 50 or fewer loads only page 1 |
| `marketplace` | `amazon.com` | only amazon.com for now |
| `proxyConfiguration` | Apify Residential, US | Amazon usually blocks datacenter IPs |
| `maxAttemptsPerPage` | 3 | retries with a new proxy session |
| `saveFailedPages` | true | keep HTML of failed attempts in the key-value store |

```json
{
  "categories": ["kitchen", "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics"],
  "maxItemsPerCategory": 100,
  "proxyConfiguration": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US"}
}
```

A ready-to-run example is also published as [Amazon Kitchen Best Sellers Top 100](https://apify.com/apex_capricorn/amazon-bestsellers/examples/kitchen-bestsellers-top-100).

### Output

One dataset item per product:

```json
{
  "rank": 1,
  "asin": "B0BZYCJK89",
  "title": "Owala FreeSip Stainless Steel Water Bottle 24 oz Denim",
  "url": "https://www.amazon.com/dp/B0BZYCJK89",
  "price": 29.99,
  "priceMax": null,
  "currency": "USD",
  "rating": 4.6,
  "reviewCount": 145351,
  "image": "https://images-na.ssl-images-amazon.com/images/I/61Gvw0-b0eL._AC_UL300_SR300,200_.jpg",
  "category": "Kitchen & Dining",
  "categoryUrl": "https://www.amazon.com/Best-Sellers-Kitchen-Dining/zgbs/kitchen",
  "marketplace": "amazon.com",
  "scrapedAt": "2026-11-10T00:00:00Z"
}
```

- `price` is the first price shown in the list; `null` when Amazon shows no price for the item in the list
  (the item is still returned). `priceMax` is set when the list shows a price range.
- `rating` is `null` and `reviewCount` is `0` for products without ratings.
- The example above was parsed from a saved Best Sellers page (captured Nov 10, 2026); values change constantly.

#### Errors (`ERRORS` record)

The dataset contains only products. Pages that could not be delivered are listed in the `ERRORS` record of the
run's default key-value store (a JSON array, empty when everything worked; also linked as *Errors* in the run's
output), so you can see exactly which ranks are missing and debug or ignore them. Errors are never charged.

```json
[
  {
    "errorType": "BLOCKED",
    "errorMessage": "BlockedError: blocked by Amazon: human checkpoint (I am human) (gave up after 3 attempts) (...)",
    "input": "kitchen",
    "category": "Kitchen & Dining",
    "categoryUrl": "https://www.amazon.com/gp/bestsellers/kitchen",
    "page": 2,
    "ranks": "51-100",
    "url": "https://www.amazon.com/Best-Sellers-Kitchen-Dining/zgbs/kitchen/ref=zg_bs_pg_2_kitchen?_encoding=UTF8&pg=2",
    "marketplace": "amazon.com",
    "attempts": 3,
    "timestamp": "2026-11-24T00:00:00Z"
  }
]
```

`errorType` is one of `BLOCKED`, `PAGE_LOAD_FAILED`, `EMPTY_PAGE`, `INCOMPLETE_PAGE`, `CATEGORY_NOT_FOUND`,
`PARSE_ERROR`, `TIME_BUDGET_EXHAUSTED`.

### Limits and notes

- Best Sellers lists are updated by Amazon frequently; each item has the time its page was loaded.
- Amazon sometimes shows fewer than 100 products in a category; the run summary notes this.
- Data is the public Best Sellers list only: no login, no reviews text, no personal data.
- You are responsible for using the data in line with Amazon's Conditions of Use and the laws that apply to you.

### FAQ

**How many products does each category return?**
Amazon's Best Sellers list has at most 100 products per category (two pages of 50). This Actor returns the full list by default, or fewer if you set `maxItemsPerCategory` lower, or if Amazon itself shows fewer than 100.

**Why are some ranks missing, or why did my run fail?**
Every page that could not be loaded is listed in the `ERRORS` record with the reason and the missing ranks; the run fails only when no product at all could be delivered. Typical causes are Amazon's "I am human" checkpoint or a page-layout change. Failed page HTML is saved in the run's key-value store. Retrying later with a fresh proxy session often works. For many categories, give the run a longer timeout (about 1 minute per category).

**Do I pay if a page is blocked?**
No. Products are charged only after a page has fully loaded and passed the checks. There is no start fee. Platform usage (compute and residential proxy) is included in the event price; you are not charged for it separately.

**Can I scrape marketplaces other than amazon.com?**
Not in this version. Only Amazon.com (US, USD) is supported.

**Is this affiliated with Amazon?**
No. You are responsible for using the data in line with Amazon's Conditions of Use and the laws that apply to you.

### Support

Report issues in the Actor's Issues tab with the run ID; failed pages are kept in the run's key-value store.

# Actor input Schema

## `categories` (type: `array`):

Best Sellers category URLs (e.g. https://www.amazon.com/Best-Sellers-Kitchen-Dining/zgbs/kitchen) or category slugs as they appear after /zgbs/ or /gp/bestsellers/ (e.g. kitchen, electronics, toys-and-games, or a sub-category like kitchen/289668). Up to 50 categories per run. Invalid entries are rejected before the run starts.

## `maxItemsPerCategory` (type: `integer`):

Amazon lists up to 100 products per category (two pages of 50). 50 or fewer loads only the first page.

## `marketplace` (type: `string`):

Only amazon.com is supported in this version.

## `proxyConfiguration` (type: `object`):

Amazon usually blocks datacenter IPs, so Apify residential proxies (US) are the default.

## `maxAttemptsPerPage` (type: `integer`):

A blocked, empty or incompletely loaded page is retried with a new proxy session (exponential backoff) up to this many times; then it is listed in the ERRORS key-value record (not charged, never in the dataset).

## `saveFailedPages` (type: `boolean`):

Store the HTML of up to 10 failed page attempts in the key-value store (FAILED_PAGE_n).

## Actor input object example

```json
{
  "categories": [
    "kitchen"
  ],
  "maxItemsPerCategory": 100,
  "marketplace": "amazon.com",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "maxAttemptsPerPage": 3,
  "saveFailedPages": true
}
```

# Actor output Schema

## `results` (type: `string`):

All products collected in this run (default dataset).

## `summary` (type: `string`):

Per-category status and counters (RUN_SUMMARY in the default key-value store).

## `errors` (type: `string`):

Every page that could not be delivered, with error type, message, category input, page, ranks and attempts (ERRORS record, JSON array; empty when everything worked). Never charged and never mixed into the products.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "categories": [
        "kitchen"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apex_capricorn/amazon-bestsellers").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "categories": ["kitchen"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("apex_capricorn/amazon-bestsellers").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "categories": [
    "kitchen"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call apex_capricorn/amazon-bestsellers --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apex_capricorn/amazon-bestsellers"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/on3eZ3wfcaaeYXkQj/builds/DIoxjdQfdZujIUfe7/openapi.json
