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

A lightweight Amazon product scraper that extracts structured product data from category or search URLs.

- **URL**: https://apify.com/apple\_yang/amazon-product-scraper.md
- **Developed by:** [APISmith](https://apify.com/apple_yang) (community)
- **Categories:** AI, Videos, Social media
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.50 / 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/platform/actors/running/actors-in-store#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 Scraper

A lightweight Amazon product scraper that extracts structured product data from category or search URLs.

This scraper allows you to collect product listings such as titles, prices, ratings, and ASINs directly from Amazon pages without using the official API.

***

### 🚀 Features

- Scrape Amazon category/search result pages
- Extract structured product data:

  - Title
  - ASIN
  - Brand
  - Ratings & review count
  - Price
  - Image URL
  - Breadcrumbs (category path)
  - Product URL
- Supports country-specific scraping (e.g., US, UK, DE)
- Returns clean JSON output
- Simple input configuration

***

### 📥 Input

Provide a JSON input with the following structure:

```json
{
  "searchurls": [
    "https://www.amazon.com/b/ref=glow_cls?node=215138479011&pf_rd_p=719b5b5d-ea3f-4e46-943c-0bf3b7f52fdb&pf_rd_r=ZPZ4AA77XV7R0DS6N3KS&ref_=F2MAFSPR26&currency=CNY&language=en_US"
  ],
  "count": 21,
  "countryCode": "US"
}
```

#### Input parameters

| Field         | Type   | Description                                  |
| ------------- | ------ | -------------------------------------------- |
| `searchurls`  | Array  | Amazon category or search result URLs        |
| `count`       | Number | Maximum number of products to scrape         |
| `countryCode` | String | The proxy country code (e.g., `US`, `UK`, `DE`),Reference Address:https://laendercode.net/en/2-letter-list.html |

***

### 📤 Output

The scraper returns a JSON array of product objects:

```json
[
  {
    "title": "adidas Mens Response Pace Runningadidas Mens Response Pace Running",
    "asin": "B0F4WX6TK3",
    "brand": "",
    "stars": 4.7,
    "reviewsCount": 126,
    "thumbnailImage": "https://m.media-amazon.com/images/I/61vCIk6HiQL._AC_UL320_.jpg",
    "breadCrumbs": "Clothing, Shoes & Jewelry>Men>Shoes>Athletic>Running>Road Running",
    "description": "adidas Mens Response Pace Running",
    "price": {
      "currency": "$",
      "value": 39
    },
    "url": "https://www.amazon.com/dp/B0F4WX6TK3"
  }
]
```

***

### 📊 Output fields

| Field            | Description                           |
| ---------------- | ------------------------------------- |
| `title`          | Product title                         |
| `asin`           | Amazon Standard Identification Number |
| `brand`          | Product brand                         |
| `stars`          | Average rating                        |
| `reviewsCount`   | Number of reviews                     |
| `thumbnailImage` | Product image URL                     |
| `breadCrumbs`    | Category hierarchy                    |
| `description`    | Product description/title             |
| `price.currency` | Currency symbol                       |
| `price.value`    | Product price                         |
| `url`            | Product detail page URL               |

***

### ⚙️ Usage

#### 1. Prepare input

Save your input JSON:

```bash
echo '{ ... }' > input.json
```

#### 2. Run scraper

Use your preferred method (CLI / API / SDK).

Example (pseudo):

```bash
run-amazon-scraper input.json
```

***

### 🧠 Use cases

- 🛒 E-commerce data aggregation
- 📊 Price monitoring
- 🏷️ Competitor analysis
- 📈 Market research
- 🤖 Building product datasets

***

### ⚠️ Notes

- Amazon structure may change, which can affect scraping results
- Large-scale scraping may require proxy rotation
- Respect Amazon’s terms of service

***

### 📦 Summary

This Amazon Product Scraper provides a simple way to extract structured product data at scale, similar to Apify actors but tailored to your custom schema and output format.

# Actor input Schema

## `searchurls` (type: `array`):

The URL of the amazon product search page you want to get the data from.

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

The number of products to scrape from each search result page.

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

Please select the country code of the proxy you want to use.

## Actor input object example

```json
{
  "searchurls": [
    "https://www.amazon.com/s?i=computers-intl-ship&bbn=16225007011&rh=n%3A16225007011%2Cn%3A1292115011"
  ],
  "count": 5,
  "countryCode": "US"
}
```

# Actor output Schema

## `results` (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 = {
    "searchurls": [
        "https://www.amazon.com/s?i=computers-intl-ship&bbn=16225007011&rh=n%3A16225007011%2Cn%3A1292115011"
    ],
    "count": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("apple_yang/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 = {
    "searchurls": ["https://www.amazon.com/s?i=computers-intl-ship&bbn=16225007011&rh=n%3A16225007011%2Cn%3A1292115011"],
    "count": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("apple_yang/amazon-product-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 '{
  "searchurls": [
    "https://www.amazon.com/s?i=computers-intl-ship&bbn=16225007011&rh=n%3A16225007011%2Cn%3A1292115011"
  ],
  "count": 5
}' |
apify call apple_yang/amazon-product-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/7hznPwfeWXBGTRB6K/builds/YpBoLkXedzOBkexx3/openapi.json
