# Amazon Bestsellers Scraper (`dainty_screw/amazon-bestsellers-scraper`) Actor

Amazon Bestsellers Scraper is a powerful Apify actor designed to efficiently extract real-time data from Amazon's Best Sellers lists. This actor is tailored for businesses, researchers, and individuals who seek to monitor and analyze market trends, product rankings, and pricing dynamics

- **URL**: https://apify.com/dainty_screw/amazon-bestsellers-scraper.md
- **Developed by:** [codemaster devops](https://apify.com/dainty_screw) (community)
- **Categories:** E-commerce, Automation
- **Features:** Full permissions
- **Stats:** 99 total users, 2 monthly users, 100.0% runs succeeded, 8 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.75 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

Extract the top 100 best-selling products from any Amazon marketplace (.com, .co.uk, .de, .fr, .es, .it). This Amazon Best Sellers scraper collects item name, price, currency, number of offers, product URL, thumbnail, review metrics and the category hierarchy so you can analyse trends or feed the data into your own dashboards. Use it as a lightweight **Amazon Best Sellers API alternative** that returns clean JSON/CSV data on autopilot.

### Why marketers and analysts love this Amazon Best Sellers scraper

- **Spot winning products fast** – track the items that Amazon pushes to the top of each bestseller chart and react before competitors.
- **Monitor pricing and offers** – export daily price, currency, and offer count data to understand how aggressive each category is.
- **Avoid manual copy/paste** – automate repetitive research with a maintained actor rather than brittle spreadsheets and browser extensions.
- **Feed business intelligence tools** – ship structured data straight into Google Sheets, Airtable, Power BI, Tableau, or your internal dashboards.

### Popular use cases

- Ecommerce sellers researching private-label opportunities or gap analysis.
- Agencies monitoring client categories to find influencer and advertising hooks.
- Marketplaces comparing Amazon catalogues with their own inventory and pricing strategy.
- Investors watching macro retail trends and building alerts for fast-moving products.
- SEO specialists building “top products” content that updates programmatically.

### How the scraper works

1. **Validate your input** – the actor checks that every provided URL belongs to an Amazon Best Sellers page and normalises your per-category item limit.
2. **Queue categories** – it opens the homepage (or your custom category URLs), follows the left-hand navigation tree, and enqueues categories up to the crawl depth you specify.
3. **Scrape detail pages** – for each category it detects whether the page uses the new or legacy layout, scrolls the content, and extracts up to 100 items (or the limit you request) from page 1 and page 2.
4. **Store results** – products are saved to the default dataset with a `position` field so you can keep the Best Seller ranking order.

The actor uses Apify’s Puppeteer infrastructure, automatic proxy rotation, session retirement, and CAPTCHA detection to stay reliable on a difficult target like Amazon.

### Input parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `proxy` | object | yes | Proxy configuration. Using Apify Proxy with the `RESIDENTIAL` group is recommended. |
| `domain` | string | no | The Best Sellers homepage to start from. Defaults to `https://www.amazon.com/Best-Sellers/zgbs`. Ignored when `categoryUrls` are provided. |
| `categoryUrls` | array of objects | no | Specific Best Seller category URLs to enqueue. Leave empty to start from the homepage navigation tree. |
| `depthOfCrawl` | integer | no | How deep to follow the category tree. Valid values are `1` (main categories only) or `2` (one more level). Default is `1`. |
| `maxItemsPerCategory` | integer | no | Caps the number of products stored per category. Set to `0` to skip saving items or omit the field to collect every product Amazon exposes. Default is `20`. |

#### Example input

```json
{
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  },
  "categoryUrls": [
    {
      "url": "https://www.amazon.com/best-sellers-books-Amazon/zgbs/books/"
    }
  ],
  "depthOfCrawl": 1,
  "maxItemsPerCategory": 20
}
```

This configuration scrapes only the Books bestseller list. Remove the `categoryUrls` array (or add more entries) when you want to crawl additional categories, and adjust `maxItemsPerCategory` for different per-category limits.

#### Running the scraper

##### From the Apify Console

1. Open the actor and click **Input**.
2. Press **Restore default input** to load the example above.
3. Adjust `maxItemsPerCategory`, `depthOfCrawl`, or add `categoryUrls` if you need specific verticals.
4. Click **Save & Start**. The run log will show which categories were enqueued and how many items were stored.

##### Via the Apify API

Use the [Run Actor endpoint](https://docs.apify.com/api/v2#/reference/actors/run-actor/runs-actor) with the JSON body shown above. Example using `curl`:

```bash
curl "https://api.apify.com/v2/acts/<ACTOR_ID>/runs?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
        "proxy": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US"},
        "domain": "https://www.amazon.com/Best-Sellers/zgbs",
        "depthOfCrawl": 1,
        "maxItemsPerCategory": 20
      }'
```

##### Locally with the Apify CLI

```bash
npm install
npx apify login
npx apify run --input-file=./input.json
```

`input.json` already contains the same configuration as the example above.

### Output dataset

Each item in the default dataset contains the fields below:

| Field | Description |
| --- | --- |
| `position` | Ranking on the Best Sellers page (starts at 1). |
| `category` | Category name taken from the page title. |
| `categoryUrl` | URL of the category that was scraped. |
| `name` | Product title. |
| `price` | Numeric price (best-effort parsing across currencies). |
| `currency` | Currency symbol or ISO code derived from the price string. |
| `numberOfOffers` | Count of seller offers if exposed by Amazon. |
| `url` | Fully-qualified product URL. |
| `thumbnail` | URL of the product thumbnail image. |

A machine-readable version of this schema is available in [`OUTPUT_SCHEMA.json`](OUTPUT_SCHEMA.json) so you can copy it straight into the Apify console or your own tooling.

```json
{
  "position": 1,
  "category": "Amazon Best Sellers: Best Books",
  "categoryUrl": "https://www.amazon.com/best-sellers-books-Amazon/zgbs/books/",
  "name": "Example Product",
  "price": 19.99,
  "currency": "$",
  "numberOfOffers": 12,
  "url": "https://www.amazon.com/dp/B000000",
  "thumbnail": "https://images-na.ssl-images-amazon.com/images/I/example.jpg"
}
```

Results are typically ready within minutes. You can export the dataset as JSON, CSV, Excel, or connect it to Google Sheets via Apify Integrations.

### Tips and limitations

- `depthOfCrawl` supports values `1` and `2`. Going deeper usually re-traverses the same tree while increasing the load on Amazon, so it is intentionally capped.
- Amazon actively blocks automated traffic. Stick to Apify residential proxies, keep the default concurrency (`10`), and avoid running many parallel tasks if you see CAPTCHAs in the logs.
- Set `maxItemsPerCategory` to a lower value (e.g., `10`) for quick smoke tests or to reduce dataset size, and to `0` when you only want to queue deeper categories without saving products.
- The actor captures up to two pages per category. If Amazon introduces more pages with content, increase `maxItemsPerCategory` to ensure they are fetched.

### Visualize the results

- **Dataset preview:** Every run produces a dataset with a built-in table and chart view—open the run in the Apify console and click **Dataset** to explore the results without exporting anything.
- **Shareable UI:** Use Apify’s “Share dataset” feature to publish a public link, then embed it in your dashboard or documentation for a zero-code viewer.
- **Custom dashboards:** Connect the dataset to Google Looker Studio, Power BI, or Tableau to build richer visuals. The dataset schema is stable, so you can schedule the actor and refresh the dashboard automatically.

### Frequently asked questions

#### How often can I run the Amazon Best Sellers scraper?

As often as you like. Many users schedule the actor hourly or daily via Apify Tasks to maintain a live Amazon Best Sellers dataset for BI dashboards.

#### Can I scrape multiple Amazon marketplaces in the same run?

Yes. Add category URLs from any supported Amazon TLD to the `categoryUrls` array. The actor detects the correct locale automatically.

#### Does this replace the official Amazon API?

For bestseller research, yes. It is a no-code Amazon Best Sellers API alternative that outputs exactly the data you need without building or maintaining scrapers yourself.

#### Can I enrich the results with review counts or ratings?

The actor currently focuses on bestseller ranking data. You can post-process the collected product URLs with another Apify actor (for example, an Amazon product details scraper) to append reviews and ratings.

### Troubleshooting

| Symptom | Suggested fix |
| --- | --- |
| Run stops after the homepage | Verify that the start URL contains `bestsellers` or `Best-Sellers`. The actor retires sessions if navigation is blocked; rerun or try different proxies. |
| Empty dataset | Check the logs for `No category links found`. Amazon occasionally tests new layouts—open the page in a browser to confirm the selector has not changed, then let us know. |
| Prices missing or `null` | Some top items are promotional bundles without clear prices. This is normal. |
| HTTP 429 / CAPTCHA warnings | Leave the default proxy configuration, reduce concurrent runs, or enable Apify’s automatic proxy rotation. |

### Legal and ethical notice

Always comply with Amazon’s Terms of Service and data protection laws (GDPR, CCPA, etc.). For a deep dive into the legal aspects of scraping, read [Is Web Scraping Legal?](https://apify.com/blog/is-web-scraping-legal).

### Stay in touch

- **YouTube**: [CodeMaster Channel](https://www.youtube.com/@CodeMaster-421)
- **Instagram**: [@quicklifesolutionsofficial](https://www.instagram.com/quicklifesolutionsofficial/)
- **AI Newsletter**: [Subscribe here](https://sendfox.com/quicklifesolutions)
- **Free Consultation**: [Book a call](https://tidycal.com/quicklifesolutions/free-consultation)
- **More Actors**: [Browse our Apify portfolio](https://apify.com/dainty_screw)

#### Support

- **Discord**: [Join and raise a ticket](https://discord.gg/2WGj2PDmHb)
- **Email**: <codemasterdevops@gmail.com>

Harness Amazon’s bestseller data to discover trends, benchmark competitors, and make faster product decisions. **Start your first Amazon Best Sellers scrape today** and turn marketplace insights into growth.

# Actor input Schema

## `domain` (type: `string`):

Select the URL of the Amazon Best Sellers page you want to extract. The value is ignored if 'categoryUrls' is specified instead

## `categoryUrls` (type: `array`):

Choose specific categories to scrape. If this field is empty, top level results are chosen.

## `depthOfCrawl` (type: `integer`):

How many subcategories would you like to visit? Minimum working value is 1, maximum is 2. Amazon Best Sellers includes 37 main categories. All of these have at least one more level of subcategorisation. Setting a crawl depth of 2 returns roughly 550 subcategories, each with 100 results. If you would like to extract more subcategories, please, get in touch.

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

Limit the number of products stored for each category. Leave empty to capture all available items.

## `proxy` (type: `object`):

Select proxies to be used by your crawler. For more information, visit https://docs.apify.com/proxy

## Actor input object example

```json
{
  "domain": "https://www.amazon.com/Best-Sellers/zgbs",
  "categoryUrls": [
    {
      "url": "https://www.amazon.com/best-sellers-books-Amazon/zgbs/books/"
    }
  ],
  "depthOfCrawl": 1,
  "maxItemsPerCategory": 20,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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 = {
    "categoryUrls": [
        {
            "url": "https://www.amazon.com/best-sellers-books-Amazon/zgbs/books/"
        }
    ],
    "depthOfCrawl": 1,
    "maxItemsPerCategory": 20,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dainty_screw/amazon-bestsellers-scraper").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 = {
    "categoryUrls": [{ "url": "https://www.amazon.com/best-sellers-books-Amazon/zgbs/books/" }],
    "depthOfCrawl": 1,
    "maxItemsPerCategory": 20,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("dainty_screw/amazon-bestsellers-scraper").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 '{
  "categoryUrls": [
    {
      "url": "https://www.amazon.com/best-sellers-books-Amazon/zgbs/books/"
    }
  ],
  "depthOfCrawl": 1,
  "maxItemsPerCategory": 20,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call dainty_screw/amazon-bestsellers-scraper --silent --output-dataset

```

## MCP server setup

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

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/5iQq315Lumg7Az01I/builds/JZaSHTzEht0xYQzDA/openapi.json
