# Amazon Bestseller Scraper (`ilborso/amazon-bestseller-scraper`) Actor

Scrape Amazon's Best Sellers and New Releases charts across different marketplaces and categories.

- **URL**: https://apify.com/ilborso/amazon-bestseller-scraper.md
- **Developed by:** [Fabio Borsotti](https://apify.com/ilborso) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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 — Apify Actor

Scrape Amazon's **Best Sellers** and **New Releases** charts across different marketplaces and categories.

This actor extracts detailed product listings from Amazon chart pages and returns a clean list of product items pushed directly to your Apify Dataset.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `category` | string | **Yes** | — | **Category Slug.** Amazon category slug (e.g., `electronics`, `ce-de`). Slugs are marketplace-specific. |
| `geocode` | string | **Yes** | — | **Geocode / Marketplace.** Amazon marketplace country code (e.g., `us`, `gb`, `de`, `jp`) or domain (`amazon.de`). |
| `type` | string | No | `bestsellers` | **Chart Type.** Accepted values: `bestsellers` (default) or `new-releases`. |
| `node` | string | No | — | **Category Node ID.** Narrows the chart to a specific sub-category of the category slug. |
| `page` | integer | No | `1` | **Page Number.** `1` (ranks 1–50) or `2` (ranks 51–100). |
| `zipcode` | string | No | — | Postal / ZIP code formatted according to country requirements to localize prices. |
| `countryName` | string | No | — | Country-level location for marketplaces without ZIP-level delivery. |
| `language` | string | No | — | Display language as an ISO 639-1 code (e.g. `en`, `de`, `it`) or `ZH-TW`. |
| `currency` | string | No | — | ISO 4217 display currency code (e.g. `USD`, `EUR`, `GBP`). |

> **Note:** The `device` parameter is not supported because Amazon's mobile chart page does not render product cards server-side.

#### Example Input

```json
{
    "category": "electronics",
    "geocode": "it",
    "type": "new-releases",
    "page": 1
}
```

***

### Output Structure

The actor returns a list of **Product Objects** pushed directly to the default Apify Dataset.

#### Product Object Fields

| Field | Type | Description |
|---|---|---|
| `rank` | integer | Absolute position in the chart (1–50 on page 1, 51–100 on page 2). |
| `asin` | string | Amazon Standard Identification Number. |
| `title` | string | Product name exactly as rendered on the Amazon chart card. |
| `url` | string | Direct URL to the product detail page. |
| `imageUrl` | string | Product thumbnail image URL. |
| `price_currencyCode` | string | ISO 4217 currency code (e.g. `EUR`, `USD`). |
| `price_amount` | float | Numeric price amount. |
| `rating_value` | float | Score out of 5. |
| `rating_count` | integer | Review count as a number. |
| `rating_stars` | integer | Star rating integer. |
| `reviewCount` | string | Localized rating count text as displayed on Amazon (e.g., `"4,324"` or `"106,039"`). |

***

### Example Output

![output image](https://raw.githubusercontent.com/ilborso/resources/8abd7eed63e531974aca595622bc624766c0f639/amazon_bestseller.png)

Below is an example of the product dataset output:

```json
[
    {
        "rank": 1,
        "asin": "B0DJGCX6Q2",
        "title": "Amazon Fire TV Stick HD (newest gen), free & live TV, Alexa Voice Remote, powered by the TV, effortless setup",
        "url": "https://www.amazon.it/dp/B0DJGCX6Q2",
        "imageUrl": "https://images-eu.ssl-images-amazon.com/images/I/6144U2SSnRL._AC_UL300_SR300,200_.jpg",
        "price_currencyCode": "EUR",
        "price_amount": 25.99,
        "rating_value": 4.2,
        "rating_count": 4324,
        "rating_stars": 4,
        "reviewCount": "4,324"
    },
    {
        "rank": 2,
        "asin": "B0HBVLSLVQ",
        "title": "JETech Privacy Screen Protector for iPhone 18 Pro, Pack of 2 | Anti-Spy, 9H + Tempered Glass, Easy Installation, Scratch Resistant, Anti-fingerprint",
        "url": "https://www.amazon.it/dp/B0HBVLSLVQ",
        "imageUrl": "https://images-eu.ssl-images-amazon.com/images/I/71OsFRMm9kL._AC_UL300_SR300,200_.jpg",
        "price_currencyCode": "EUR",
        "price_amount": 11.99,
        "rating_value": 4.3,
        "rating_count": 106039,
        "rating_stars": 4,
        "reviewCount": "106,039"
    },
    {
        "rank": 3,
        "asin": "B091FS79T8",
        "title": "UnionSine External Hard Drive 2.5 Inches 500 GB Ultra Slim Portable USB3.0 | Storage for PC, Macbook, PS4, Xbox series, Wii u, TV (Black) HD2510",
        "url": "https://www.amazon.it/dp/B091FS79T8",
        "imageUrl": "https://images-eu.ssl-images-amazon.com/images/I/61XbnUE8ipL._AC_UL300_SR300,200_.jpg",
        "price_currencyCode": "EUR",
        "price_amount": 35.74,
        "rating_value": 4.5,
        "rating_count": 52489,
        "rating_stars": 5,
        "reviewCount": "52,489"
    }
]
```

***

### Error Handling

The actor fails with a clear status message in the following cases:

| Condition | Actor Behavior |
|---|---|
| Missing `category` or `geocode` | Fails immediately with input validation error. |
| Invalid `type` or `page` | Fails immediately with validation error. |
| Upstream service failure | Fails with HTTP status code and error details. |
| Timeout / Network failure | Fails with network error details. |

# Actor input Schema

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

Amazon category slug (e.g. 'electronics', 'ce-de'). Slugs are marketplace-specific.

## `geocode` (type: `string`):

Geographic code (e.g. 'it' for Italy, 'en' for USA)

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

Chart type: 'bestsellers' (default) or 'new-releases'.

## `node` (type: `string`):

Category node ID to narrow the chart to a specific sub-category.

## `page` (type: `integer`):

Page number: 1 (positions 1-50) or 2 (positions 51-100).

## `zipcode` (type: `string`):

Postal code formatted according to country requirements to localize prices.

## `countryName` (type: `string`):

Country-level location for marketplaces without ZIP-level delivery.

## `language` (type: `string`):

Display language as an ISO 639-1 code, or 'ZH-TW' for Traditional Chinese.

## `currency` (type: `string`):

ISO 4217 display currency code (e.g. 'USD', 'EUR', 'GBP').

## Actor input object example

```json
{
  "category": "electronics",
  "geocode": "it",
  "type": "bestsellers",
  "page": 1
}
```

# Actor output Schema

## `bestsellerProducts` (type: `string`):

No description

# 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 = {
    "category": "electronics",
    "geocode": "it"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ilborso/amazon-bestseller-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 = {
    "category": "electronics",
    "geocode": "it",
}

# Run the Actor and wait for it to finish
run = client.actor("ilborso/amazon-bestseller-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 '{
  "category": "electronics",
  "geocode": "it"
}' |
apify call ilborso/amazon-bestseller-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ilborso/amazon-bestseller-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/39tUHBVaxNluv5sem/builds/s1QcQaD4SQdiVSqz2/openapi.json
