# Amazon Product List Scraper (`zerobreak/amazon-product-list-scraper`) Actor

Scrape Amazon product listings by keyword or URL. Supports concurrent searches, ASIN deduplication, auto-retry, and combined keyword + URL mode in a single run.

- **URL**: https://apify.com/zerobreak/amazon-product-list-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Product List Scraper

Scrape Amazon product listings at scale using keywords and/or direct search URLs. Supports concurrent searches, automatic deduplication by ASIN, and configurable retries — no browser required.

***

### ✨ Features

- 🔍 **Keyword search** — search Amazon by any keyword or phrase
- 🔗 **URL search** — scrape any Amazon search result URL directly
- 🔀 **Combined mode** — run keywords + URLs together in one run
- ⚡ **Concurrent requests** — run multiple searches in parallel (up to 10)
- 🔁 **Auto retry** — exponential back-off retry on failed requests (up to 3x)
- 🧹 **Deduplication** — removes duplicate products by ASIN across all searches
- ⏱️ **Configurable timeout** — set per-request timeout (10–120 seconds)

***

### 📥 Input

| Field | Type | Default | Description |
|---|---|---|---|
| `keywords` | `string[]` | `[]` | Keywords to search (e.g. `laptop`, `headphones`) |
| `urls` | `string[]` | `[]` | Amazon search URLs to scrape |
| `max_results_per_search` | `integer` | `50` | Max products per keyword/URL (0 = unlimited) |
| `max_pages_per_search` | `integer` | `1` | Max result pages per search (~20 products/page) |
| `concurrency` | `integer` | `3` | Number of parallel searches (1–10) |
| `request_timeout_secs` | `integer` | `30` | Per-request timeout in seconds (10–120) |
| `retry_on_error` | `boolean` | `true` | Retry failed requests up to 3 times |
| `deduplicate_results` | `boolean` | `true` | Remove duplicate ASINs across all results |

#### Example Input

```json
{
    "keywords": ["wireless headphones", "gaming mouse"],
    "urls": ["https://www.amazon.com/s?k=laptop&rh=n%3A172282"],
    "max_results_per_search": 100,
    "max_pages_per_search": 3,
    "concurrency": 5,
    "retry_on_error": true,
    "deduplicate_results": true
}
```

> **Mode is auto-detected:**
>
> - Only `keywords` filled → keyword mode
> - Only `urls` filled → URL mode
> - Both filled → combined mode (all run together)

***

### 📤 Output

Each result is pushed to the Apify dataset. The raw API response is returned at the top level alongside metadata:

```json
{
    "label": "keyword:wireless headphones",
    "status": "success",
    "status_code": 200,
    "products": [
        {
            "asin": "B09XYZ1234",
            "title": "Sony WH-1000XM5 Wireless Headphones",
            "price": 279.99,
            "rating": 4.7,
            "reviews": 12483,
            "url": "https://www.amazon.com/dp/B09XYZ1234",
            "image": "https://m.media-amazon.com/images/..."
        }
    ],
    "total_products": 48
}
```

A summary is also saved to the key-value store under the `OUTPUT` key:

```json
{
    "total_searches": 3,
    "successful": 3,
    "errors": 0,
    "total_products": 214
}
```

***

### 🚀 Usage Tips

- Use `max_pages_per_search: 3–5` with `max_results_per_search: 100` for broad category scraping
- Set `concurrency: 5–10` for large keyword lists to reduce total run time
- Enable `deduplicate_results` when combining keywords and URLs that may overlap
- Use Amazon's filter parameters in URLs (e.g. `&rh=n%3A172282` for category filters) for more targeted results

***

### 🔒 Legal & Compliance

This actor is intended for **personal research, price monitoring, and product analysis**. Always review [Amazon's Terms of Service](https://www.amazon.com/gp/help/customer/display.html?nodeId=508088) before use. Do not use for mass data harvesting or commercial redistribution of Amazon data.

# Actor input Schema

## `keywords` (type: `array`):

List of search keywords to scrape. Each keyword will be searched separately. Leave empty if using URLs only.

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

List of Amazon search URLs to scrape. Leave empty if using keywords only. Provide both keywords and URLs to scrape all together.

## `max_results_per_search` (type: `integer`):

Maximum number of products to return per keyword or URL. Set to 0 for no limit.

## `max_pages_per_search` (type: `integer`):

Maximum number of Amazon result pages to scrape per search. Each page typically contains ~20 products.

## `concurrency` (type: `integer`):

Number of searches to run in parallel. Higher values are faster but may hit rate limits.

## `request_timeout_secs` (type: `integer`):

Timeout in seconds for each individual API request.

## `retry_on_error` (type: `boolean`):

Automatically retry failed requests up to 3 times with exponential back-off (2s → 4s → 8s) before skipping.

## `deduplicate_results` (type: `boolean`):

Remove duplicate products (by ASIN) across all searches.

## Actor input object example

```json
{
  "keywords": [
    "laptop",
    "headphones",
    "gaming mouse"
  ],
  "urls": [
    "https://www.amazon.com/s?k=headphones",
    "https://www.amazon.com/s?k=laptop&rh=n%3A172282"
  ],
  "max_results_per_search": 10,
  "max_pages_per_search": 1,
  "concurrency": 3,
  "request_timeout_secs": 30,
  "retry_on_error": true,
  "deduplicate_results": true
}
```

# 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 = {
    "keywords": [
        "laptop"
    ],
    "urls": [
        "https://www.amazon.com/s?k=headphones"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/amazon-product-list-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 = {
    "keywords": ["laptop"],
    "urls": ["https://www.amazon.com/s?k=headphones"],
}

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/amazon-product-list-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 '{
  "keywords": [
    "laptop"
  ],
  "urls": [
    "https://www.amazon.com/s?k=headphones"
  ]
}' |
apify call zerobreak/amazon-product-list-scraper --silent --output-dataset

```

## MCP server setup

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