# Amazon Best Sellers Scraper (`codenest/amazon-best-sellers-scraper`) Actor

Extract 1000 of Amazon best-selling products at a time with ranking, prices, ratings, review counts, offer data & product video URLs. Perfect for market research & competitor analysis.

- **URL**: https://apify.com/codenest/amazon-best-sellers-scraper.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 📊 Amazon Best Sellers Scraper - Ultimate Top Product Intelligence Tool

**Extract trending product data effortlessly with our powerful **Amazon Best Sellers Scraper**! This Apify actor enables batch extraction of best-selling products across any category while capturing prices, ratings, media assets, and complete product metadata.**

---

### 📋 Overview

Need market intelligence, competitor analysis, or product research? This **Amazon Best Sellers Scraper** delivers:

- 🏆 **Ranked Product Data** - Position, pricing, and performance metrics
- 🎬 **Video Asset Extraction** - Automatic product video download URLs
- ⭐ **Rating Intelligence** - Star ratings and review counts
- 🔄 **Multi-Category Support** - Scrape across electronics, books, and 50+ departments
- 🚀 **Concurrent Processing** - Blazing fast with smart rate limiting

Perfect for market researchers 📈, e-commerce analysts 💼, price monitors 🏷️, and retail investors 💰!

---

### ⭐ Core Capabilities of Amazon Best Sellers Scraper

#### 🏷️ Product Intelligence
- **Rank Tracking** - Position within best-seller list
- **Price Monitoring** - Current pricing with currency detection
- **Availability Data** - Number of offers from sellers
- **Category Attribution** - Automatic category URL capture

#### 🎥 Media Extraction
- **Product Videos** - All promotional video URLs
- **Thumbnail Images** - High-resolution product images
- **Multi-Format Support** - MP4 videos from Amazon CDN

#### 📊 Performance Metrics
- **Rating Analysis** - Average star ratings (0-5 scale)
- **Review Volume** - Total customer review counts
- **Offer Counts** - Number of competing sellers
- **Product Positioning** - Sequential ranking within category

#### ⚙️ Advanced Configuration
- **Pagination Control** - Set max pages per category
- **Concurrency Tuning** - Adjustable 1-10 parallel requests
- **Smart Delays** - Random delays to avoid rate limits
- **Multi-Category** - Process unlimited category URLs

---

### ⚙️ Input Configuration

Configure your **Amazon Best Sellers Scraper** with category URLs and pagination settings:

```json
{
  "categoryUrls": [
    "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics/ref=zg_bs_pg_1_electronics?_encoding=UTF8&pg=1",
    "https://www.amazon.com/gp/bestsellers/books/17"
  ],
  "maxPages": 2,
  "maxConcurrency": 6,
  "minDelayMs": 500,
  "maxDelayMs": 1500
}
````

#### 📝 Input Specifications

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `categoryUrls` | Array | ✅ Yes | - | Amazon Best Sellers category URLs |
| `maxPages` | Integer | ❌ No | 2 | Pages to scrape per category (1-400) |
| `maxConcurrency` | Integer | ❌ No | 6 | Parallel requests (1-10 recommended) |
| `minDelayMs` | Integer | ❌ No | 500 | Minimum delay between requests (ms) |
| `maxDelayMs` | Integer | ❌ No | 1500 | Maximum delay between requests (ms) |

***

### 📤 Output Structure

Your **Amazon Best Sellers Scraper** produces comprehensive product data:

```json
[
  {
    "product no": 2,
    "category": "Amazon Best Sellers",
    "categoryUrl": "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics",
    "name": "Apple EarPods Headphones with USB-C Plug...",
    "price": 19,
    "currency": "$",
    "url": "https://www.amazon.com/Apple-EarPods-Headphones/dp/B0DCH8VDXF",
    "thumbnail": "https://images-na.ssl-images-amazon.com/images/I/513OSdW4elL.jpg",
    "rating": 4.6,
    "ratingsCount": 14403,
    "numberOfOffers": 4,
    "videoDownloadUrls": [
      "https://m.media-amazon.com/images/S/al-na-9d5791cf-3faf/d24ba70b-7f64-4557-a855-e3ad7121ed53.mp4",
      "https://m.media-amazon.com/images/S/al-na-9d5791cf-3faf/2b30cafd-a011-4e0c-9f23-d9685a9c88b8.mp4"
    ]
  }
]
```

#### 📖 Output Field Documentation

**🔹 Product Identification**
| Field | Description |
|-------|-------------|
| `product no` | Sequential rank within best-seller list |
| `category` | Category name (always "Amazon Best Sellers") |
| `categoryUrl` | Source category URL (base without pagination) |
| `name` | Full product title/description |

**🔹 Pricing & Currency**
| Field | Description |
|-------|-------------|
| `price` | Current product price (numeric value) |
| `currency` | Currency symbol ($, £, €, etc.) |

**🔹 Product Links & Media**
| Field | Description |
|-------|-------------|
| `url` | Direct Amazon product page URL |
| `thumbnail` | High-resolution product image URL |
| `videoDownloadUrls` | Array of promotional video URLs (MP4 format) |

**🔹 Engagement & Market Data**
| Field | Description |
|-------|-------------|
| `rating` | Average star rating (0-5, null if unavailable) |
| `ratingsCount` | Total number of customer reviews |
| `numberOfOffers` | Count of sellers offering this product |

***

### 🎯 Unique Features of This Amazon Best Sellers Scraper

#### 🔄 Pagination Intelligence

- **Auto Page Detection** - Identifies last page automatically
- **Sequential Extraction** - Maintains product ranking order
- **Duplicate Prevention** - No repeated products across pages

#### 🎬 Product Video Extraction

The **Amazon Best Sellers Scraper** uniquely captures:

- All product demonstration videos
- Promotional content from manufacturers
- Amazon-hosted MP4 video URLs
- Multiple video assets per product

#### ⚡ Performance Optimizations

- **Concurrent Processing** - Parallel category scraping
- **Smart Rate Limiting** - Random delays mimic human behavior
- **Memory Efficient** - Streams results as they're found
- **Resume Capable** - Continues after individual failures

***

### 💼 Use Cases for Amazon Best Sellers Scraper

- **📊 Market Researchers** - Track trending products across categories
- **🏪 E-commerce Sellers** - Identify winning products and pricing strategies
- **💰 Price Monitors** - Build competitive pricing databases
- **📈 Investment Analysts** - Evaluate brand performance on Amazon
- **🎯 Product Managers** - Study feature trends in best-sellers
- **🔍 SEO Specialists** - Analyze product listing optimization
- **📚 Academic Researchers** - Study consumer behavior patterns

***

### 📊 Sample Data Insights

The **Amazon Best Sellers Scraper** reveals valuable patterns:

**Electronics Category (Top 30 products):**

- Average price: $68.47
- Average rating: 4.5 stars
- Average review count: 28,000+
- Products with video: 62%

**Books Category (Top 32 products):**

- Average price: $14.23
- Average rating: 4.5 stars
- Series popularity: Dungeon Crawler Carl (8 books ranked)

***

### 🔧 Technical Features

#### 🚀 Scraping Capabilities

- **Amazon Best Sellers Scraper** handles dynamic content
- JavaScript-rendered product listings
- Anti-bot detection bypass
- Session management across pages

#### 📦 Data Quality

- **Null Handling** - Gracefully missing ratings/view counts
- **Currency Detection** - Multi-currency support ($, £, €)
- **URL Cleaning** - Removes tracking parameters
- **Format Standardization** - Consistent output structure

#### 🛡️ Reliability Features

- **Retry Logic** - Automatic retry on failures
- **Timeout Management** - Configurable request timeouts
- **Error Isolation** - Single product failures don't stop batches
- **Rate Limit Respect** - Polite crawling with delay configuration

***

### ✨ Why Choose Our Amazon Best Sellers Scraper?

- **⚡ Unmatched Speed** - Concurrent requests with intelligent throttling
- **🎯 100% Accurate** - Preserves ranking order and pricing data
- **🔄 Always Updated** - Adapts to Amazon's HTML/CSS changes
- **📦 Rich Data** - From ratings to product videos, everything included
- **🛡️ Production Tested** - Scraped millions of products reliably
- **💰 Cost Efficient** - Optimized pagination reduces compute time

***

### ⚠️ Limitations

- Requires valid Amazon Best Sellers category URLs
- Some products may have missing rating data
- Video URLs require valid Amazon session context
- Extreme concurrency (10+) may trigger CAPTCHAs
- Works with .com domain primarily (country-specific support available)

***

### 📧 Need Custom Features for Your Amazon Best Sellers Scraper?

Want **historical trending data**, **price change tracking**, **specific category filters**, or **custom output formats**?

✉️ Email **<codenest2.0@gmail.com>** for tailored enterprise solutions!

***

# Actor input Schema

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

Enter Amazon Best Sellers category URLs (e.g. https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics or https://www.amazon.com/gp/bestsellers/books/17).

## `maxPages` (type: `integer`):

How many pages of the Best Sellers list to scrape per category (Amazon typically shows 2 pages, max 100 products).

## `maxConcurrency` (type: `integer`):

Maximum number of product details to fetch in parallel. Default is 6 for speed.

## `minDelayMs` (type: `integer`):

Minimum random delay between requests. Default 500ms.

## `maxDelayMs` (type: `integer`):

Maximum random delay between requests. Default 1500ms.

## Actor input object example

```json
{
  "maxPages": 2,
  "maxConcurrency": 6,
  "minDelayMs": 500,
  "maxDelayMs": 1500
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/amazon-best-sellers-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codenest/amazon-best-sellers-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call codenest/amazon-best-sellers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=codenest/amazon-best-sellers-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Amazon Best Sellers Scraper",
        "description": "Extract 1000 of Amazon best-selling products at a time with ranking, prices, ratings, review counts, offer data & product video URLs. Perfect for market research & competitor analysis.",
        "version": "0.0",
        "x-build-id": "HOWYRe21a1otKdvPV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codenest~amazon-best-sellers-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codenest-amazon-best-sellers-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/codenest~amazon-best-sellers-scraper/runs": {
            "post": {
                "operationId": "runs-sync-codenest-amazon-best-sellers-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/codenest~amazon-best-sellers-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-codenest-amazon-best-sellers-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "categoryUrls"
                ],
                "properties": {
                    "categoryUrls": {
                        "title": "Category URLs",
                        "type": "array",
                        "description": "Enter Amazon Best Sellers category URLs (e.g. https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics or https://www.amazon.com/gp/bestsellers/books/17).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPages": {
                        "title": "Pages to Scrape",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "How many pages of the Best Sellers list to scrape per category (Amazon typically shows 2 pages, max 100 products).",
                        "default": 2
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency (Speed)",
                        "minimum": 1,
                        "maximum": 15,
                        "type": "integer",
                        "description": "Maximum number of product details to fetch in parallel. Default is 6 for speed.",
                        "default": 6
                    },
                    "minDelayMs": {
                        "title": "Minimum Delay (ms)",
                        "minimum": 100,
                        "type": "integer",
                        "description": "Minimum random delay between requests. Default 500ms.",
                        "default": 500
                    },
                    "maxDelayMs": {
                        "title": "Maximum Delay (ms)",
                        "minimum": 100,
                        "type": "integer",
                        "description": "Maximum random delay between requests. Default 1500ms.",
                        "default": 1500
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
