# Amazon Product Scraper (`neuro-scraper/amazon-search-scraper`) Actor

Amazon Product Scraper — ultra-reliable extraction of ASINs, titles, prices (including original price and discounts), ratings, review counts, images, availability, brand and categories from search and product pages. Accepts keywords or product URLs; exports clean JSON to Apify dataset. Get it!

- **URL**: https://apify.com/neuro-scraper/amazon-search-scraper.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** E-commerce, Automation, Integrations
- **Stats:** 5 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$14.99/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/actors/running/actors-in-store.md#rental-actors

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

**One-line tagline:** Instantly extract product listings and product-page metadata from Amazon search queries — fast, secure, and ready for business use.

***

### 📖 Summary

Amazon Search Scraper retrieves product data from Amazon search results and product pages and returns clean, business-ready JSON records for analysis. Designed for speed and reliability, it helps teams discover product details, prices, reviews, images, and availability for competitive research, analytics, and monitoring.

***

### 💡 Use cases / When to use

- Competitive price monitoring and alerting
- Market/product research and sourcing
- Creating product catalogs and feeds
- Gathering product images and descriptions for analytics
- Quickly prototyping e-commerce dashboards

***

### ⚡ Quick Start — Console (one-click)

1. Open this Actor in Apify Console.
2. Fill the **Queries** input (single keyword or array of keywords).
3. (Optional) Enable **Proxy Configuration** if scraping at scale.
4. Click **Run**. Results appear in the default dataset/OUTPUT in seconds.

> Friendly microcopy: “Plug in a search term, click Run, and get structured product data instantly.”

***

### ⚙️ Quick Start (CLI + API)

**CLI**

```bash
## Run an actor with JSON input via apify-cli
apify run --actor <your-actor-id> --input input.example.json
```

**Python (apify-client)**

```python
from apify_client import ApifyClient
client = ApifyClient('<APIFY_TOKEN>')
run = client.actor('your-user/amazon-search-scraper').call(run_input={"queries": ["wireless earbuds"]})
print('Started run:', run['id'])
```

***

### 📝 Inputs (fields & schema)

**Console JSON input example** (see `input.example.json` file):

```json
{
  "queries": ["wireless earbuds", "gaming mouse"],
  "headless": true,
  "requestDelay": [1.0, 2.0]
}
```

**Fields**

- `queries` — *string or array* — **required** — Search keywords or Amazon product URLs. The actor accepts either a search keyword (will run site search) or a direct Amazon product URL for product-page scraping.
- `headless` — *boolean* — optional — Run browser in headless mode (default: true).
- `requestDelay` — *array \[min, max]* — optional — Delay range (seconds) between product-page requests to reduce rate.

***

### ⚙️ Configuration

|            🔑 Name |         📝 Type |  ❓ Required | ⚙️ Default |              📌 Example | 🧠 Notes                          |
| -----------------: | --------------: | ----------: | ---------: | ----------------------: | --------------------------------- |
|            queries |    string/array |       ✅ Yes |          — |    \["wireless earbuds"] | Search terms or product URLs      |
|           headless |         boolean | ⚙️ Optional |       true |                   false | Turn off to debug visually        |
|       requestDelay | array (min,max) | ⚙️ Optional | \[1.0, 2.0] |              \[0.5, 1.0] | Avoids aggressive scraping        |
| proxyConfiguration |          object | ⚙️ Optional |         {} | {"useApifyProxy": true} | Use residential proxies for scale |

Example Console setup: paste `"wireless earbuds"` into `queries` and press **Run Actor**.

***

### 📄 Outputs (Dataset / KV examples)

Each dataset item is a JSON object with attributes similar to:

```json
{
  "asin": "B09EXAMPLE",
  "title": "Wireless Earbuds XYZ",
  "brand_name": "BrandCo",
  "url": "https://www.amazon.com/...]",
  "price": "$59.99",
  "currency": "$",
  "thumbnail": "https://...jpg/",
  "images": ["https://...jpg/", "https://...jpg/"],
  "stars": 4.3,
  "review_count": "1.2k",
  "availability": "In Stock",
  "description": "Key bullet points...",
  "categories": "Electronics > Audio",
  "search_keyword": "wireless earbuds"
}
```

> Note: The actor pushes results to the default dataset and also returns the full result array in the key-value store under the standard `OUTPUT` key.

***

### 🔑 Environment Variables

- `<APIFY_TOKEN>` — required to call the Actor programmatically via API.
- `<PROXY_USER:PASS@HOST:PORT>` — placeholder for custom proxy credentials.

**Security note:** Store secrets in Apify Console Secrets — do not paste them into input fields.

***

### ▶️ How to Run

**Console**

1. Go to the Actor page in Apify Console.
2. Paste your queries (single string or array) into the Input field.
3. (Optional) Configure proxies under the Proxy Configuration editor.
4. Click **Run**.

**CLI**

```bash
apify run --actor your-user/amazon-search-scraper --input input.example.json
```

**API (Python)**

See Quick Start (above) — use `client.actor(...).call(run_input=...)` and read the returned run ID.

***

### ⏰ Scheduling & Webhooks

- Use Apify Console scheduling to run this Actor at any interval (hourly, daily, weekly).
- Configure webhooks on run completion to forward JSON output to your endpoint for real-time processing.

***

### 🕾️ Logs & Troubleshooting

- Check the Console logs for step-by-step run info and any per-item warnings.
- Common issues:

  - *No results*: verify that `queries` are valid and spelled correctly.
  - *Request timeouts*: increase `requestDelay` or enable Proxy Configuration.
  - *Selector changes on Amazon*: refresh the run and adjust queries — the actor is resilient but web UIs change frequently.

***

### 🔒 Permissions & Storage Notes

- This Actor collects publicly visible product information only. It does not perform account actions.
- Results are stored in Apify Datasets/Key-Value stores in your account and follow Apify’s standard retention and access controls.

***

### 🔟 Changelog / Versioning

- **v0.1.0** — Initial public release: search + product-page scraping, structured dataset output.

***

### 🖌 Notes / TODOs

- TODO: Consider adding a CLI flag / input for limiting the number of product pages per query (reason: some queries return many results).
- TODO: Add optional CSV export in output settings (reason: convenient for BI ingestion).

***

### 🌍 Proxy Configuration

If you will run many searches or large-scale scraping, configure Apify Proxy or custom proxies.

**Enable Apify Proxy (Console):**

- In the Actor run form, open *Proxy configuration* and enable *Use Apify Proxy* (choose RESIDENTIAL for best results).

**Custom proxy example (as secret):**

- Use `<PROXY_USER:PASS@HOST:PORT>` format and store as a Console Secret. Reference it in the Proxy Configuration editor.

**Environment variables (examples)**

```
HTTP_PROXY=<PROXY_USER:PASS@HOST:PORT>
HTTPS_PROXY=<PROXY_USER:PASS@HOST:PORT>
```

**Reminder:** Store proxy credentials in Secrets and do not paste them into public inputs.

**TODO:** Consider proxy rotation for large-scale scraping.

***

### 📚 References

1. Apify Actor README guidelines — <https://docs.apify.com/console/actors/README>
2. Apify Input/Output schemas — <https://docs.apify.com/platform/input-output>
3. Apify CLI & API usage — <https://docs.apify.com/console/actors/run>

***

### 🤔 What I inferred from `main.py`

- The Actor accepts `queries` (keywords or Amazon URLs) and uses an automated browser to fetch search results and product pages.
- It extracts product metadata, images, prices, ratings, and availability and returns structured JSON items.
- It respects throttling delays and can be configured to use proxies for scale.
- Results are pushed to the default dataset and the key-value store under `OUTPUT`.

***

***

## input.example.json

```json
{
  "queries": [
    "wireless earbuds",
    "gaming mouse"
  ],
  "headless": true,
  "requestDelay": [1.0, 2.0]
}
```

***

## CONFIG.md (optional)

### Quick config notes

- **Secrets**: Add `<APIFY_TOKEN>` and any proxy credentials to Console Secrets.
- **Scaling**: For repeated large runs, enable *Apify Proxy* (RESIDENTIAL) and consider running with scheduling + webhooks to automate downstream processing.

### Suggested settings in Console

- Proxy configuration: use Apify Proxy → RESIDENTIAL
- Dataset retention: enable automatic export to your storage of choice

***

*Generated by: Neuro Scraper*

# Actor input Schema

## `queries` (type: `array`):

One or more Amazon search keywords or direct product URLs.

## Actor input object example

```json
{
  "queries": [
    "laptop",
    "headphones",
    "https://www.amazon.com/dp/B08N5WRWNW"
  ]
}
```

# 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 = {
    "queries": [
        "laptop",
        "headphones",
        "https://www.amazon.com/dp/B08N5WRWNW"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/amazon-search-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 = { "queries": [
        "laptop",
        "headphones",
        "https://www.amazon.com/dp/B08N5WRWNW",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/amazon-search-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 '{
  "queries": [
    "laptop",
    "headphones",
    "https://www.amazon.com/dp/B08N5WRWNW"
  ]
}' |
apify call neuro-scraper/amazon-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neuro-scraper/amazon-search-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/NeIRrPdB7ExbBkC2q/builds/iNVKhFTnj9aB6jrgJ/openapi.json
