# Amazon Products and Bestsellers Scraper ✅ $0.1 per 1000 results (`curious_coder/amazon-scraper`) Actor

Scrape products from amazon category pages, search results, best sellers, etc  and extract complete details such as description, price, rating, bestsellers ranks, badges, photos etc

- **URL**: https://apify.com/curious\_coder/amazon-scraper.md
- **Developed by:** [Curious Coder](https://apify.com/curious_coder) (community)
- **Categories:** E-commerce
- **Stats:** 975 total users, 5 monthly users, 99.8% runs succeeded, 22 bookmarks
- **User rating**: 4.67 out of 5 stars

## Pricing

$25.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

Extract product listings and product data seamlessly from [Amazon](https://www.amazon.com) using any product listing URLs. Get critical information like ratings, bestseller ranks, pricing, variations, etc.

This scraper supports several types of product listings pages like best selling products page, gifts page, and regular search results pages. 



Here are some examples of URLs supported:

- https://www.amazon.com/s?i=specialty-aps&bbn=16225007011&rh=n%3A16225007011%2Cn%3A1292115011

- https://www.amazon.in/s?k=redmi&rh=n%3A1389401031&ref=nb_sb_noss

- https://www.amazon.com/Best-Sellers-Toys-Games/zgbs/toys-and-games/ref=zg_bs_nav_toys-and-games_0

You can also scrape data directly through an API, eliminating the need to access the Apify platform.

### Benefits of Scraping Amazon
- Gain insights into category and subcategory performance.
- Benchmark your products by analyzing emerging brands and their metrics like views and reviews.
- Refine your advertising strategies.
- Leverage Amazon data for competitive advantage.
- Affiliate marketing

### Amazon Product Scraper's Capacity
While the scraper can fetch over 100,000 results on average, various factors might affect the output. The actual number of results can be influenced by the input's complexity, the website's internal constraints, and geographical considerations. For accurate results tailored to your needs, consider a test run.

### Cost Implications
Scraping costs can vary based on the data volume and complexity. For a clear estimate, initiate a test scrape with minimal input. This will give you a price-per-scrape which can be scaled as per your requirements. Consider premium plans for cost savings.

### Input Guidelines for the Scraper
When initializing the Amazon Product Scraper, configure your preferences. Inputs can be provided as JSON or directly on the Apify platform. Be mindful of certain nuances while using the scraper, such as potential price variations based on proxy locations.

### Sample of amazon products scraper
```json
 {
    "asin": "B0B5B6R5JN",
    "badges": "",
    "image": "https://m.media-amazon.com/images/I/61ECeMoaOKL._AC_UY218_.jpg",
    "link": "https://www.amazon.com/Prodentim-Advanced-Formula-Probiotic-Supplement/dp/B0B5B6R5JN/ref=sr_1_10?m=A5T7BUI9KCCPB&qid=1693035039&s=merchant-items&sr=1-10",
    "title": "Prodentim Advanced Formula Probiotic Supplement Pills (1 Pack)",
    "stars": 3.4,
    "ratingsCount": 800,
    "priceCurrency": "$",
    "priceAmount": 28,
    "isPrime": false,
    "isSponsored": false,
    "seller": {
      "url": "https://www.amazon.com/S-O-Labs/b/ref=bl_dp_s_web_23450631011?ie=UTF8&node=23450631011&field-lbr_brands_browse-bin=S.O+Labs",
      "name": "S.O Labs"
    },
    "questionsCount": "10",
    "amazonsChoiceKeywords": [],
    "productOverview": [],
    "features": [],
    "bestSellersRank": [
      {
        "rank": "23668",
        "categoryName": "Health & Household",
        "link": "/gp/bestsellers/hpc/ref=pd_zg_ts_hpc"
      },
      {
        "rank": "958",
        "categoryName": "Blended Vitamin & Mineral Supplements",
        "link": "/gp/bestsellers/hpc/3773931/ref=pd_zg_hrsr_hpc"
      }
    ],
    "technicalDetails": [],
    "productDetails": [
      {
        "name": "PackageDimensions‏",
        "value": "4.13 x 1.97 x 1.93 inches; 1.76 Ounces"
      },
      {
        "name": "DateFirstAvailable‏",
        "value": "July 7, 2022"
      },
      {
        "name": "Manufacturer‏",
        "value": "Lightning Labs"
      },
      {
        "name": "ASIN‏",
        "value": "B0B5B6R5JN"
      }
    ],
    "variationValues": {
      "size_name": [
        "30.0 Servings (Pack of 3)",
        "60.0 Servings (Pack of 2)",
        "60 Count (Pack of 5)",
        "60.0 Servings (Pack of 120)"
      ]
    },
    "variationAsins": [
      {
        "size_name": "0",
        "ASIN": "B0B5B9K4R4"
      },
      {
        "size_name": "2",
        "ASIN": "B0B5B7ZXW2"
      },
      {
        "size_name": "1",
        "ASIN": "B0B5B6ZV9R"
      },
      {
        "size_name": "3",
        "ASIN": "B0B5B6R5JN"
      }
    ]
  },
````

### Integrate Amazon Product Scraper

Easily connect the Amazon Product Scraper with cloud services or web apps via Apify platform integrations. Options include Make, Zapier, Slack, Google Sheets, and more. Use webhooks for instant notifications or actions on specific events.

### Amazon Product Scraper API

The Apify API offers extensive control over the Apify platform with RESTful HTTP endpoints. Manage, schedule, and run Apify actors, access datasets, monitor performances, and much more.

### Feedback & Support

Your input helps us enhance our tools. For technical feedback or to report issues, please visit the Issues section on the Apify Console.

# Actor input Schema

## `urls` (type: `array`):

Enter urls to scrape. Search urls, product urls, bestsellers urls, etc.

## `deepScrape` (type: `boolean`):

If enabled, Actor will add each product url obtained from product listing pages to the request queue to scrape product details. Otherwise it will scrape only top level URLs

## `startPage` (type: `integer`):

Page number to start scraping, only used for product listing page urls

## `count` (type: `integer`):

Leave this field empty if you want to scrape all items.

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

You can use custom proxy urls if you want but we don't guarantee it will work smoothly, by default Actor will use recommended proxy config

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.amazon.com/s?i=specialty-aps&bbn=16225009011&rh=n%3A%2116225009011%2Cn%3A2811119011&ref=nav_em__nav_desktop_sa_intl_cell_phones_and_accessories_0_2_5_5"
    }
  ],
  "deepScrape": false,
  "startPage": 1,
  "count": 50
}
```

# 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 = {
    "urls": [
        {
            "url": "https://www.amazon.com/s?i=specialty-aps&bbn=16225009011&rh=n%3A%2116225009011%2Cn%3A2811119011&ref=nav_em__nav_desktop_sa_intl_cell_phones_and_accessories_0_2_5_5"
        }
    ],
    "startPage": 1,
    "count": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("curious_coder/amazon-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 = {
    "urls": [{ "url": "https://www.amazon.com/s?i=specialty-aps&bbn=16225009011&rh=n%3A%2116225009011%2Cn%3A2811119011&ref=nav_em__nav_desktop_sa_intl_cell_phones_and_accessories_0_2_5_5" }],
    "startPage": 1,
    "count": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("curious_coder/amazon-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 '{
  "urls": [
    {
      "url": "https://www.amazon.com/s?i=specialty-aps&bbn=16225009011&rh=n%3A%2116225009011%2Cn%3A2811119011&ref=nav_em__nav_desktop_sa_intl_cell_phones_and_accessories_0_2_5_5"
    }
  ],
  "startPage": 1,
  "count": 50
}' |
apify call curious_coder/amazon-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Amazon Products and Bestsellers Scraper ✅ $0.1 per 1000 results",
        "description": "Scrape products from amazon category pages, search results, best sellers, etc  and extract complete details such as description, price, rating, bestsellers ranks, badges, photos etc",
        "version": "1.0",
        "x-build-id": "S7H6WsACtUtoD6cuR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/curious_coder~amazon-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-curious_coder-amazon-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/curious_coder~amazon-scraper/runs": {
            "post": {
                "operationId": "runs-sync-curious_coder-amazon-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/curious_coder~amazon-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-curious_coder-amazon-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": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "🔗 URLs",
                        "type": "array",
                        "description": "Enter urls to scrape. Search urls, product urls, bestsellers urls, etc.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "deepScrape": {
                        "title": "Deep scrape",
                        "type": "boolean",
                        "description": "If enabled, Actor will add each product url obtained from product listing pages to the request queue to scrape product details. Otherwise it will scrape only top level URLs",
                        "default": false
                    },
                    "startPage": {
                        "title": "Start page",
                        "type": "integer",
                        "description": "Page number to start scraping, only used for product listing page urls",
                        "default": 1
                    },
                    "count": {
                        "title": "#️⃣ Total number of records required",
                        "type": "integer",
                        "description": "Leave this field empty if you want to scrape all items."
                    },
                    "proxy": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "You can use custom proxy urls if you want but we don't guarantee it will work smoothly, by default Actor will use recommended proxy config"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
