# Amazon Product Scraper (`shahidirfan/amazon-product-scraper`) Actor

Extract Amazon product listings, prices, ASINs, titles, brands, ratings, reviews, availability, images, and seller details. Ideal for Amazon price monitoring, competitor analysis, eCommerce market research, product tracking, and retail data extraction.

- **URL**: https://apify.com/shahidirfan/amazon-product-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

### What does Amazon Product Scraper do?

Amazon Product Scraper collects ranked product data from Amazon.com search results. Enter a keyword or paste an Amazon search or product URL, and the Actor returns a clean dataset with product titles, ASINs, prices, ratings, review counts, images, and ranking. It is built for price monitoring, competitor research, catalog enrichment, and AI or RAG datasets that need fresh Amazon product data without manual copy-paste.

### Why use Amazon Product Scraper?

- **Ranked search data** - Capture which products appear for a keyword, in what order, and where sponsored placements sit.
- **Rich product fields** - Get titles, prices with numeric values, ratings, review counts, images, and availability, not just IDs.
- **Flexible input** - Start from a keyword, a search-results URL, or a single product URL.
- **Automation-ready** - Export to JSON, CSV, Excel, or XML, connect webhooks, or schedule repeat runs for monitoring.
- **Resilient collection** - Retries, multiple request paths, and verification recovery keep runs completing when Amazon changes responses.
- **Marketplace metadata** - Each record includes the search query, total result count, and marketplace identifiers for traceability.

### What data can you extract from Amazon?

| Field | Description |
|-------|-------------|
| `asin` | Amazon Standard Identification Number |
| `product_url` | Canonical Amazon product URL |
| `title` | Product title |
| `price` | Displayed price with currency, for example `$25.99` |
| `price_value` | Numeric price value for calculations |
| `currency` | Currency code or symbol |
| `rating` | Average customer rating out of 5 |
| `reviews_count` | Number of customer ratings |
| `image_url` | Product image URL |
| `is_sponsored` | Whether the listing is a sponsored placement |
| `position` | Ranking position on the returned page |
| `page` | Amazon results page number |
| `keyword` | Search keyword that produced the record |
| `total_results` | Approximate total result count reported by Amazon |
| `availability` | Stock text when a product URL is used |
| `marketplace` | Amazon marketplace domain |
| `scraped_at` | ISO timestamp for when the record was collected |

### How to use Amazon Product Scraper

1. Open the Actor on Apify Store.
2. Enter a keyword, or paste an Amazon search or product URL.
3. Optionally choose a sorting order and set a result limit.
4. Run the Actor.
5. Download the dataset or connect it to your workflow.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `keyword` | String | No | `led lights` | Keyword to search on Amazon.com. Used when `startUrl` is empty. |
| `startUrl` | String | No | - | Amazon search-results URL or product URL. Takes priority over `keyword` when supplied. |
| `sorting` | String | No | `relevance` | Sorting order: `relevance`, `price_low_to_high`, `price_high_to_low`, `average_customer_review`, `newest_arrivals`, or `best_sellers`. |
| `results_wanted` | Integer | No | `20` | Number of unique products to save. Set any value; there is no preset upper limit. |
| `max_pages` | Integer | No | `5` | Number of Amazon result pages to request. Set any value; there is no preset upper limit. |
| `proxyConfiguration` | Object | No | `{}` | Optional proxy settings for higher volume runs. Leave empty to connect directly. |

### Usage Examples

#### Keyword search

Collect the top products for a keyword:

```json
{
  "keyword": "wireless earbuds",
  "results_wanted": 50
}
```

#### Search URL with sorting

Start from a saved Amazon search URL and apply a sort order:

```json
{
  "startUrl": "https://www.amazon.com/s?k=mechanical+keyboard",
  "sorting": "price_low_to_high",
  "results_wanted": 100,
  "max_pages": 5
}
```

#### Single product URL

Enrich one product with its title, price, rating, reviews, image, and availability:

```json
{
  "startUrl": "https://www.amazon.com/dp/B0B3ZD8QXJ"
}
```

### Sample Output

```json
{
  "asin": "B09V366BDY",
  "product_url": "https://www.amazon.com/dp/B09V366BDY",
  "title": "KSIPZE 100ft Led Strip Lights RGB Music Sync Color Changing Led Lights with Smart App Control Remote",
  "price": "$15.99",
  "price_value": 15.99,
  "currency": "$",
  "rating": 4.4,
  "reviews_count": 41712,
  "image_url": "https://m.media-amazon.com/images/I/71lntIT6FfL._AC_UL320_.jpg",
  "is_sponsored": false,
  "position": 2,
  "page": 1,
  "keyword": "led lights",
  "total_results": 126003,
  "marketplace": "amazon.com",
  "marketplace_id": "ATVPDKIKX0DER",
  "scraped_at": "2026-07-28T10:30:00.000Z"
}
```

### Tips for Best Results

- Use a specific keyword to keep the dataset focused and relevant.
- Start with a small `results_wanted` value to test before running a large scrape.
- `results_wanted` and `max_pages` accept any value, so you can size a run as large as you need. Raise `max_pages` when a keyword returns fewer products per page.
- Use `startUrl` when you already have a filtered Amazon search you want to reproduce.
- Prices and currencies follow the region that Amazon serves to the run; compare like-for-like records.
- Sponsored placements are flagged with `is_sponsored` so you can include or exclude them.
- Some fields may be empty when a listing does not publish that information.

### Integrations

- **Google Sheets** - Send product data to spreadsheets for analysis.
- **Webhooks** - Trigger downstream workflows after each run.
- **Make or Zapier** - Connect results to no-code automations.
- **API** - Access datasets programmatically from your own systems.

### Frequently Asked Questions

#### Can I export the data to CSV or Excel?

Yes. Apify datasets can be downloaded in CSV, Excel, JSON, XML, and other supported formats.

#### Can I run this Actor on a schedule?

Yes. Schedule the Actor in Apify Console to refresh prices and rankings hourly, daily, or weekly.

#### Can I scrape a product by its URL?

Yes. Paste an Amazon product URL in `startUrl` and the Actor returns that product's title, price, rating, reviews, image, and availability.

#### Why is a field empty in some records?

Some listings do not publish a price, rating, or availability. Empty fields reflect the source listing, not a failed run.

#### Does the Actor include sponsored products?

Yes. Sponsored products are included and marked with `is_sponsored` so you can filter them.

#### Is there a limit on how many products I can collect?

No preset upper limit. `results_wanted` and `max_pages` accept any value. The run stops when it reaches `results_wanted`, exhausts the available results, or reaches `max_pages`. Broad keywords can return hundreds of products across many pages; raise `max_pages` to match your target.

#### Why did I get fewer results than I requested?

Amazon serves a limited number of products per page, and that number varies by keyword. If the run reaches `max_pages` before `results_wanted`, increase `max_pages`. If it reports that results were exhausted, Amazon had no more matching products for that query.

#### Is it legal to scrape Amazon?

Scraping public web data can be legal, but you are responsible for complying with applicable laws, Amazon's terms, and privacy rules.

### Support

For issues, feature requests, or custom Actor work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is designed for legitimate collection of publicly available Amazon product data. Users are responsible for using the data responsibly and complying with applicable laws and website terms.

# Actor input Schema

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

Amazon.com search-results URL or product URL. When supplied, this URL takes priority over Keyword.

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

Search Amazon.com for this keyword. Used when Amazon URL is empty.

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

Apply an Amazon sorting order. Relevance keeps Amazon's default ranking.

## `results_wanted` (type: `integer`):

Number of unique products to save. No upper limit; the run stops when this count is reached or results are exhausted.

## `max_pages` (type: `integer`):

Number of Amazon result pages to request. No upper limit; set it high enough for your desired result count.

## `proxyConfiguration` (type: `object`):

Optional. Configure Apify Proxy or custom proxy URLs for higher volume scrapes. Leave empty to connect directly.

## Actor input object example

```json
{
  "keyword": "led lights",
  "sorting": "relevance",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {}
}
```

# Actor output Schema

## `overview` (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 = {
    "keyword": "led lights"
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/amazon-product-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 = { "keyword": "led lights" }

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/amazon-product-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 '{
  "keyword": "led lights"
}' |
apify call shahidirfan/amazon-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shahidirfan/amazon-product-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/RsvKKHA2yBvmtYWKu/builds/ealEAFi9wHpK6hHQI/openapi.json
