# Amazon Deals Scraper with Smart Ranking (`amazonscraping/amazon-deals-scraper`) Actor

Scrape top-performing products from Amazon bestsellers across multiple countries and categories, based on rating, review count, price, and bestseller status to help you identify trending deals.

Key Features:
Multi-Country Support
Smart Filtering
Advanced Ranking
Hierarchy Output

- **URL**: https://apify.com/amazonscraping/amazon-deals-scraper.md
- **Developed by:** [Sara](https://apify.com/amazonscraping) (community)
- **Categories:** Automation, Agents, Other
- **Stats:** 7 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## ⭐️ What is Amazon Best Sellers Scraper?

**Amazon Best Sellers Scraper** lets you extract the top-selling products from Amazon Best Sellers pages across multiple countries and categories. It outputs structured data in JSON, CSV, Excel, or XML — ready for analysis, dashboards, or integrations.

With this scraper you can:

- **Extract from 6 Amazon domains**: Saudi Arabia (.sa), Egypt (.eg), UAE (.ae), United States (.com), United Kingdom (.co.uk), and Germany (.de).
- **Get full product details**: title, price, rating, number of reviews, URL, thumbnail image, and bestseller rank.
- **Scrape any category and its subcategories** — Beauty, Electronics, Fashion, Home, Baby Products, and many more.
- **Smart filtering & ranking** — products are automatically filtered by quality (minimum rating & reviews) and ranked by a weighted score so you get the best items first.
- **Control output size** — set `maxResults` to return exactly how many products you need (10–5,000).
- **Hierarchical output** — results are organized in a category tree structure so you can see exactly where each product sits in the Amazon taxonomy.

---

### 📚 How do I scrape Amazon Best Sellers?

This scraper is designed for an easy start — no coding required. Here's how:

1. **Create a free Apify account** using your email.
2. **Open Amazon Best Sellers Scraper** on Apify.
3. **Choose your category** — pick from the dropdown: Electronics, Beauty, Fashion, Home, or select "All" for every category.
4. **Select the Amazon country** (Saudi Arabia, Egypt, UAE, US, UK, or Germany).
5. **Set the maximum number of products** you want (default: 1,000).
6. **Click "Start"** and wait for the data to be extracted.
7. **Download your data** in JSON, CSV, Excel, XML, or HTML.

---

### 📦 How many results can I get?

You can extract up to **5,000 products per run**, ranked by quality score. The default is **1,000 products**. Results cover the selected category and all of its subcategories, giving you a comprehensive view of top sellers.

The actual number of results depends on:

- The category you choose (some have more products than others).
- The Amazon marketplace (each country has different inventory).
- Product availability and Amazon's own listings.

The best way to know for your specific use case is to do a quick test run.

---

### ⬇️ Input parameters

| Parameter | Description | Default |
|-----------|-------------|---------|
| **Category** | Product category — Electronics, Beauty, Fashion, Home, and more. Choose "All" to scrape every category. | Electronics |
| **Country** | Amazon marketplace — US, SA, EG, AE, UK, DE | United States |
| **Max Results** | Maximum number of products to return (10–5,000) | 1,000 |

---

### ⬆️ Output example

Results are saved as a structured dataset. Each product includes:

```json
[
  {
    "title": "Apple AirPods Pro (2nd Generation)",
    "price": 189.99,
    "currency": "USD",
    "rating": 4.7,
    "reviews": 98520,
    "url": "https://www.amazon.com/dp/B0D1XD1ZV3",
    "thumbnail": "https://images-na.ssl-images-amazon.com/images/I/...",
    "category_path": "Electronics > Headphones, Earbuds & Accessories > Earbuds",
    "rank": 1,
    "quality_score": 97.3
  },
  {
    "title": "Samsung Galaxy S24 Ultra Case",
    "price": 14.99,
    "currency": "USD",
    "rating": 4.5,
    "reviews": 34200,
    "url": "https://www.amazon.com/dp/B0CS5THKR7",
    "thumbnail": "https://images-na.ssl-images-amazon.com/images/I/...",
    "category_path": "Electronics > Cell Phones & Accessories > Cases",
    "rank": 2,
    "quality_score": 91.8
  }
]
````

Products are also organized in a **category hierarchy tree** (saved to Key-Value Store) so you can browse results by subcategory.

***

### ☝️ Tips and tricks

- **Start with a small test** — set `maxResults` to 50 to quickly preview results before running a full extraction.
- **Compare across countries** — run the same category on different Amazon domains to compare bestsellers across markets.
- **Use the hierarchy output** — the Key-Value Store contains the full category tree with products embedded, perfect for building dashboards or reports.
- **Quality filtering is automatic** — products with very low ratings or too few reviews are filtered out before ranking, so you only get reliable bestsellers.

***

### ❓ FAQ

#### Do I need proxies to scrape Amazon?

No setup needed on your end. This scraper uses **Apify's residential proxies** automatically to ensure reliable results without getting blocked.

#### Can I integrate this scraper with other apps?

Yes! Amazon Best Sellers Scraper can be connected with almost any cloud service or web app through Apify integrations — including **Make**, **Zapier**, **Google Sheets**, **Slack**, **LangChain**, and more.

You can also use **webhooks** to trigger actions whenever a scrape finishes (e.g., send a notification or update a spreadsheet).

#### Can I use it with an API?

Absolutely. The **Apify API** gives you programmatic access to run this scraper, schedule recurring runs, and fetch results. Use the `apify-client` package for **Node.js** or **Python**.

Check out the [Apify API reference](https://docs.apify.com/api) for full details, or click the **API tab** in the Actor page for ready-to-use code examples.

#### What can I do with Amazon Best Sellers data?

- **Market research** — identify top trends and best-selling products across categories.
- **Competitive analysis** — track what's selling best and adjust your product strategy.
- **Price monitoring** — compare prices across different Amazon marketplaces.
- **Product discovery** — find trending products and emerging categories.
- **E-commerce intelligence** — use data to inform pricing, inventory, and marketing decisions.

***

### 📬 Your feedback

We're always working on improving performance. If you have technical feedback or found a bug, please create an issue on the Actor's **Issues** tab in Apify Console.

# Actor input Schema

## `category` (type: `string`):

The product category to scrape. Choose 'All' to scrape every category.

## `country` (type: `string`):

Which Amazon marketplace to scrape from

## `maxResults` (type: `integer`):

Maximum number of products to return (ranked by quality score)

## Actor input object example

```json
{
  "category": "Electronics",
  "country": "com",
  "maxResults": 1000
}
```

# 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("amazonscraping/amazon-deals-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("amazonscraping/amazon-deals-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 amazonscraping/amazon-deals-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Amazon Deals Scraper with Smart Ranking",
        "description": "Scrape top-performing products from Amazon bestsellers across multiple countries and categories, based on rating, review count, price, and bestseller status to help you identify trending deals.\n\nKey Features:\nMulti-Country Support\nSmart Filtering\nAdvanced Ranking\nHierarchy Output",
        "version": "1.0",
        "x-build-id": "AaHUdU9dAivEsRKfk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/amazonscraping~amazon-deals-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-amazonscraping-amazon-deals-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/amazonscraping~amazon-deals-scraper/runs": {
            "post": {
                "operationId": "runs-sync-amazonscraping-amazon-deals-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/amazonscraping~amazon-deals-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-amazonscraping-amazon-deals-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": [
                    "category"
                ],
                "properties": {
                    "category": {
                        "title": "Category",
                        "enum": [
                            "All",
                            "Amazon Devices & Accessories",
                            "Automotive",
                            "Baby Products",
                            "Beauty",
                            "DIY & Tools",
                            "Electronics",
                            "Fashion",
                            "Gift Cards",
                            "Grocery",
                            "Health",
                            "Home",
                            "Office Products",
                            "Patio, Lawn & Garden",
                            "Pet Supplies",
                            "Sporting Goods",
                            "Toys",
                            "Videogames"
                        ],
                        "type": "string",
                        "description": "The product category to scrape. Choose 'All' to scrape every category.",
                        "default": "Electronics"
                    },
                    "country": {
                        "title": "Amazon Country",
                        "enum": [
                            "com",
                            "sa",
                            "eg",
                            "ae",
                            "co.uk",
                            "de"
                        ],
                        "type": "string",
                        "description": "Which Amazon marketplace to scrape from",
                        "default": "com"
                    },
                    "maxResults": {
                        "title": "Maximum Products",
                        "minimum": 10,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of products to return (ranked by quality score)",
                        "default": 1000
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
