# Amazon Product Scraper - Global Search and Product Details (`hypebridge/amazon-product-scraper`) Actor

Scrape Amazon search results and product pages across 23 country storefronts.

- **URL**: https://apify.com/hypebridge/amazon-product-scraper.md
- **Developed by:** [Hypebridge](https://apify.com/hypebridge) (community)
- **Categories:** E-commerce, Marketing, Business
- **Stats:** 8 total users, 1 monthly users, 95.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 priced search items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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** extracts public product data, search listings, prices, rankings, ratings, buy box details, specifications, and availability across **23 global Amazon country storefronts** without requiring an official Amazon API or developer account.

Whether you need to monitor competitor pricing, track keyword search rankings, analyze product assortments, or enrich direct product URLs (ASINs) at scale, this Actor provides clean, structured data ready for analysis in spreadsheets, BI dashboards, or automated workflows.

### Why scrape Amazon?

- **Track Competitor Pricing & Buy Box Offers**: Monitor live prices, list prices, discounts, and third-party seller offers across domestic and international marketplaces.
- **Global Market Intelligence & Arbitrage**: Compare prices, catalog availability, and local currencies across 23 storefronts including the US, UK, Germany, Japan, and Canada.
- **Keyword Rank & Placement Tracking**: Measure organic search positions and sponsored ad placements for priority search queries.
- **Assortment & Catalog Benchmarking**: Extract complete product specifications, brand data, bullet points, high-resolution imagery, and variation dimensions.
- **Sales Velocity & Demand Signals**: Capture monthly purchase volume signals (e.g., "bought in past month"), customer star ratings, review counts, and stock availability statuses.

### Supported Marketplaces

Amazon Product Scraper supports **23 country storefronts**. You can provide search or product URLs directly from any of these domains, or select one or more marketplace codes to search keywords and bare ASINs across multiple countries simultaneously:

| Market Code | Country | Storefront Domain | Currency |
|-------------|---------|-------------------|----------|
| `US` | United States | `amazon.com` | USD ($) |
| `CA` | Canada | `amazon.ca` | CAD (CDN$) |
| `MX` | Mexico | `amazon.com.mx` | MXN ($) |
| `BR` | Brazil | `amazon.com.br` | BRL (R$) |
| `IE` | Ireland | `amazon.ie` | EUR (€) |
| `ES` | Spain | `amazon.es` | EUR (€) |
| `UK` | United Kingdom | `amazon.co.uk` | GBP (£) |
| `FR` | France | `amazon.fr` | EUR (€) |
| `BE` | Belgium | `amazon.com.be` | EUR (€) |
| `NL` | Netherlands | `amazon.nl` | EUR (€) |
| `DE` | Germany | `amazon.de` | EUR (€) |
| `IT` | Italy | `amazon.it` | EUR (€) |
| `SE` | Sweden | `amazon.se` | SEK (kr) |
| `ZA` | South Africa | `amazon.co.za` | ZAR (R) |
| `PL` | Poland | `amazon.pl` | PLN (zł) |
| `SA` | Saudi Arabia | `amazon.sa` | SAR (﷼) |
| `EG` | Egypt | `amazon.eg` | EGP (E£) |
| `TR` | Turkey | `amazon.com.tr` | TRY (₺) |
| `AE` | United Arab Emirates | `amazon.ae` | AED (د.إ) |
| `IN` | India | `amazon.in` | INR (₹) |
| `SG` | Singapore | `amazon.sg` | SGD (S$) |
| `AU` | Australia | `amazon.com.au` | AUD (A$) |
| `JP` | Japan | `amazon.co.jp` | JPY (¥) |

#### Supported URL Patterns

- **Search URLs**: Keyword searches and category/facet searches, such as `https://www.amazon.com/s?k=mechanical+keyboard` or `https://www.amazon.com/s?i=electronics&rh=n%3A172282`. Search URLs can include Amazon filters and sorting parameters.
- **Product Detail URLs**: Direct product pages using standard Amazon paths (e.g., `https://www.amazon.com/dp/B09LK1P1RD`, `/gp/product/ASIN`, `/gp/aw/d/ASIN`, or `/clp/ASIN`).
- **Direct ASINs**: 10-character Amazon Standard Identification Numbers (e.g., `B09LK1P1RD`) and 10-digit book ISBNs (e.g., `0735211299`).
- **Keyword Queries**: Search terms (e.g., `espresso machine`, `wireless mouse`) paired with any selected marketplaces.

### What data can Amazon Product Scraper extract?

The Actor operates in two flexible extraction modes:

1. **Search Items (`getProductDetails: false`)**: Fast, lightweight extraction of product cards returned on search results pages. Captures titles, prices, ratings, review counts, organic ranking, sponsored flags, badges, and thumbnail images.
2. **Product Details (`getProductDetails: true` or direct ASIN/URL)**: Deep extraction of product pages, capturing specifications, A+ content, visible customer-review insights and up to five reviews embedded in the page, image galleries, seller and merchant information, variants, and identifiers.

| Field | Type | Description |
|-------|------|-------------|
| `market` | String | Country storefront code (e.g., `US`, `DE`, `JP`) |
| `marketplaceDomain` | String | Storefront domain (e.g., `www.amazon.com`, `www.amazon.de`) |
| `asin` | String | 10-character Amazon Standard Identification Number |
| `title` | String | Complete product title |
| `price` | Number | Verified new-offer buy box or card price in local currency |
| `listPrice` | Number | Original manufacturer list / strike-through price |
| `discountPercent` | Number | Rounded discount from `listPrice` when both validated prices are available |
| `unitPrice`, `unitName` | Number, String | Search-card price per unit and its unit label, when shown |
| `currency` | String | ISO 4217 currency code (e.g., `USD`, `EUR`, `GBP`, `JPY`) |
| `priceSource` | String | Pricing origin (`buybox-json`, `buybox-text`, or `search-card`) |
| `brand` | String | Brand or manufacturer name |
| `sellerName` | String | Merchant / seller name for the active buy box offer |
| `rating` | Number | Average customer star rating (e.g., `4.6`) |
| `ratingsCount` | Integer | Total number of customer ratings |
| `ratingDistribution` | Object | Visible percentage for each available 1–5 star rating bucket on product pages |
| `reviewSummary` | String | Amazon's on-page customer review summary, when present |
| `reviewTopics` | Array of objects | Visible topic labels, estimated mention counts, and original count text, when present |
| `topReviews` | Array | Up to five page-embedded review snippets with title, rating, localized date, verified-purchase flag, helpful votes, and capped text |
| `aplusText`, `aplusImages` | String, Array | Bounded text and image alt text/URLs from A+ or “From the Publisher” content, when present |
| `boughtPastMonthMin` | Integer | Minimum units bought in past month signal (e.g., `5000`) |
| `boughtPastMonthText` | String | Original localized monthly-purchases label when shown |
| `dealBadge` | String | Search-card deal label when shown |
| `isPurchasable` | Boolean | Whether an active, purchasable offer was present |
| `availabilityText` | String | Stock status (e.g., `"In Stock"`, `"Only 3 left in stock"`) |
| `bestSellersRank` | Array | Category sales ranks and subcategory placements |
| `specifications` | Object | Key-value technical specifications and product details |
| `variants` | Array | Child ASINs and variation dimension mappings (color, size, etc.) |
| `url` | String | Canonical product URL |
| `scrapedAt` | String | ISO 8601 timestamp of extraction |

*A complete list of fields is available in the **Output** tab.*

Some storefronts can return zero results when Amazon blocks verified local proxies. `price` is null when no valid local-currency offer is available.

Amazon Best Sellers and other editorial list URLs, plus short links such as `amzn.to`, are not supported as input URLs yet. Use a keyword or `/s` category/facet URL instead.

### How to scrape Amazon

1. [Create a free Apify account](https://apify.com) if you do not already have one.
2. Open **[Amazon Product Scraper](https://apify.com/hypebridge/amazon-product-scraper)** and click **Try for free**.
3. Configure your input:
   - Paste Amazon search or product URLs into **Start URLs**, or
   - Enter keywords into **Search keywords**, or
   - Enter product IDs into **ASINs**.
4. Select target **Marketplaces** (default is `US`; select additional countries for multi-market runs).
5. Set **Max products** (`maxItems`) to cap the total results collected across all marketplaces.
6. (Optional) Toggle **Get full product details** if you want deep specifications and variant matrices for items found in search.
7. Click **Start** and download your dataset in JSON, CSV, Excel, XML, or HTML.

### How much will it cost?

Amazon Product Scraper uses transparent **pay-per-event pricing**. Priced records can trigger a search or product-detail event, and priced results from non-US storefronts can also trigger a marketplace event. Every run also incurs the Actor Start event based on configured memory. Empty pages, retries, and unpriced records do not trigger result events, though platform usage can still affect the publisher's costs.

#### Pricing Breakdown

| Event | Free Tier | Gold Tier | Description |
|-------|-----------|-----------|-------------|
| **Priced search item** | $0.00025 / item | $0.00020 / item | One search result with a price (primary event). Results without a price are free. |
| **Priced product detail** | $0.0012 / item | $0.0008 / item | Full product detail record with a price. Replaces the search item charge for that product. |
| **International marketplace** | $0.033 / market | $0.022 / market | Charged once per non-US country storefront in a run when that marketplace returns at least one priced result. US has no marketplace fee ($0.00). |
| **Actor Start** | $0.00005 / GB | $0.00005 / GB | Charged on every run based on configured memory (minimum one event). At the default 2 GB, this is $0.00010 per run. |

Search is about **$0.25 per 1,000 priced results**; full product details are about **$1.20 per 1,000** on the Free tier. Gold tier prices are $0.20 and $0.80 per 1,000. A detail record replaces the search-item event for that product; the two item events are not both charged. The international marketplace fee is additional and applies once per non-US storefront with at least one priced result, so batch multiple products in each country to spread that fee.

Some Amazon fields are conditional. Review insights, top reviews, and A+ content are returned only when Amazon embeds them in the product page. Review text is limited to five snippets of 500 characters each; A+ text and image lists are bounded. The Actor does not fetch separate review or offer pages for these fields.

### Input

See the **Input** tab for the full configuration schema. Key parameters:

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | Array | `[]` | Amazon search or product URLs from any supported storefront (domain selects market). |
| `productUrls` | Array | `[]` | Direct product URLs; combined with `startUrls`, up to 50 URLs per run. |
| `marketplaces` | Array | `["US"]` | Storefront codes for keywords and bare ASINs. Choose multiple for global runs. |
| `searchQueries` | Array | `[]` | Keywords searched in each selected marketplace (up to 20). |
| `asins` | Array | `[]` | 10-character product IDs or ISBN-10s opened in each selected marketplace. |
| `maxItems` | Integer | `50` | Maximum unique market and ASIN pairs to collect across the run (1–1000). |
| `getProductDetails` | Boolean | `false` | Enable deep page extraction for products found via search. Direct URLs and ASINs always fetch full details. |
| `maxPages` | Integer | `5` | Maximum search result pagination depth per query (1–20). |
| `includeSponsored` | Boolean | `true` | Include sponsored advertisement products from search listings. |
| `maxConcurrency` | Integer | `2` | Number of parallel requests (1–10). |
| `maxRequests` | Integer | `250` | Hard cap on search and product page requests (1–1000). Detail requests skipped at the cap get `detailError: "request_limit"`. |
| `debugMode` | Boolean | `false` | Saves HTML snapshots of failed pages for troubleshooting. |

#### Example 1: Search keywords in the US

Scrape up to 50 search results for a keyword in the US store:

```json
{
  "marketplaces": ["US"],
  "searchQueries": ["mechanical keyboard"],
  "maxItems": 50,
  "maxPages": 2,
  "getProductDetails": false
}
```

#### Example 2: Multi-country comparison

Compare search results across the US, Germany, Japan, and the UK:

```json
{
  "marketplaces": ["US", "DE", "JP", "UK"],
  "searchQueries": ["espresso machine"],
  "maxItems": 100,
  "maxPages": 2,
  "getProductDetails": false
}
```

#### Example 3: Deep product details by ASIN or URL

Collect full specifications, variants, and seller data for specific products:

```json
{
  "startUrls": [
    { "url": "https://www.amazon.com/dp/B09LK1P1RD" },
    { "url": "https://www.amazon.co.uk/dp/B07W5JKMNV" }
  ],
  "getProductDetails": true,
  "maxItems": 20
}
```

### Output

Results are stored in the default dataset tab. You can export data at any time in JSON, CSV, Excel, XML, or HTML formats.

Each record includes:

- **Product Identity**: `market`, `marketplaceDomain`, `asin`, `parentAsin`, `title`, `url`, `sourceUrl`
- **Pricing & Buy Box**: `price`, `listPrice`, `currency`, `priceSource`, `lowestOtherOfferPrice`, `otherOffersCount`, `isPurchasable`
- **Ratings & Popularity**: `rating`, `ratingsCount`, `boughtPastMonthMin`, `boughtPastMonthText`, `bestSellersRank`
- **Search Context**: `searchQuery`, `searchUrl`, `organicRank`, `isSponsored`, `placements`
- **Product Specifications**: `brand`, `sellerName`, `availabilityText`, `bulletPoints`, `specifications`, `identifiers`
- **Media & Variants**: `thumbnail`, `images`, `variants`, `variationDimensions`, `variantCount`
- **Metadata**: `recordType`, `language`, `deliveryLocationSet`, `scrapedAt`

#### Sample Output: Search Result Record

This is a real search record shape (optional fields are omitted here for readability):

```json
{
  "recordType": "search_item",
  "detailFetched": false,
  "detailError": null,
  "asin": "B0D14N2QZF",
  "url": "https://www.amazon.com/dp/B0D14N2QZF",
  "sourceUrl": "https://www.amazon.com/s?k=mechanical%20keyboard",
  "searchQuery": "mechanical keyboard",
  "searchUrl": "https://www.amazon.com/s?k=mechanical%20keyboard",
  "placements": [{ "page": 1, "position": 1, "sponsored": false }],
  "organicRank": { "page": 1, "position": 1 },
  "isSponsored": false,
  "market": "US",
  "marketplaceDomain": "www.amazon.com",
  "title": "AULA F75 Pro Wireless Mechanical Keyboard,75% Hot Swappable Custom Keyboard with Knob,RGB Backlit,Pre-lubed Reaper Switches,Side Printed PBT Keycaps,2.4GHz/USB-C/BT5.0 Mechanical Gaming Keyboards",
  "price": 64.99,
  "listPrice": 79.99,
  "currency": "USD",
  "priceSource": "search-card",
  "rating": 4.6,
  "ratingsCount": 1863
}
```

#### Sample Output: Full Product Detail Record

```json
{
  "recordType": "product",
  "detailFetched": true,
  "detailError": null,
  "asin": "B09LK1P1RD",
  "parentAsin": "B0BLHQC95V",
  "url": "https://www.amazon.com/dp/B09LK1P1RD",
  "sourceUrl": "https://www.amazon.com/dp/B09LK1P1RD",
  "searchQuery": null,
  "searchUrl": null,
  "placements": [],
  "organicRank": null,
  "isSponsored": null,
  "isPrime": true,
  "coupon": null,
  "boughtPastMonthMin": 2000,
  "boughtPastMonthText": "2K+ bought in past month",
  "thumbnail": null,
  "market": "US",
  "marketplaceDomain": "www.amazon.com",
  "language": "en-US,en;q=0.9",
  "title": "Logitech G PRO X TKL LIGHTSPEED Wireless Gaming Keyboard, Tactile Switches, LIGHTSYNC RGB",
  "brand": "Logitech G",
  "categoryPath": [
    "Video Games",
    "PC",
    "Accessories",
    "Gaming Keyboards"
  ],
  "price": 179.99,
  "listPrice": null,
  "currency": "USD",
  "priceSource": "buybox-json",
  "lowestOtherOfferPrice": 132.71,
  "otherOffersCount": 9,
  "isPurchasable": true,
  "availabilityText": "In Stock",
  "sellerName": "Amazon.com",
  "merchantId": "ATVPDKIKX0DER",
  "rating": 4.6,
  "ratingsCount": 1420,
  "bestSellersRank": [
    {
      "rank": 24,
      "category": "PC Gaming Keyboards"
    }
  ],
  "bulletPoints": [
    "Designed with Pros, Engineered to Win: The next generation of the championship-winning PRO keyboard.",
    "Pro-Grade LIGHTSPEED Wireless: Tested on the battlefield for reliability and lightning-fast responsiveness.",
    "Dual-Shot PBT Keycaps: Durable construction with shine-through backlighting."
  ],
  "description": "Logitech G PRO X TKL LIGHTSPEED Wireless Gaming Keyboard...",
  "images": [
    {
      "hiRes": "https://m.media-amazon.com/images/I/71xyz_hires.jpg",
      "large": "https://m.media-amazon.com/images/I/71xyz_large.jpg",
      "variant": "MAIN"
    }
  ],
  "specifications": {
    "Brand": "Logitech G",
    "Compatible Devices": "PC",
    "Connectivity Technology": "LIGHTSPEED Wireless, Bluetooth, USB-C",
    "Keyboard Description": "Gaming",
    "Item Weight": "2.01 pounds"
  },
  "identifiers": {
    "gtin": null,
    "upc": null,
    "isbn10": null,
    "isbn13": null,
    "modelNumber": "920-012135"
  },
  "variationDimensions": [
    "style_name",
    "color_name"
  ],
  "variants": [
    {
      "asin": "B09LJWXD6M",
      "dimensions": {
        "style_name": "Linear",
        "color_name": "Black"
      }
    },
    {
      "asin": "B09LK1P1RD",
      "dimensions": {
        "style_name": "Tactile",
        "color_name": "Black"
      }
    }
  ],
  "variantCount": 6,
  "deliveryLocationSet": false,
  "scrapedAt": "2026-10-03T12:00:00.000Z",
  "parserVersion": "1.0.0"
}
```

### Tips

- **Cap runs with `maxItems`**: Always set `maxItems` before launching a large crawl to control runtime and budget.
- **Multi-market cap distribution**: `maxItems` applies across the entire run. When querying multiple countries, set `maxItems` to at least 50–100 so each storefront can return a balanced set of items.
- **Direct URLs vs Search**: When you provide direct product URLs or bare ASINs, the Actor automatically extracts full product details without requiring `getProductDetails: true`.
- **Product Identity**: A product is uniquely identified by the `(market, asin)` pair. An ASIN searched in both the US and Germany will produce two distinct records reflecting local pricing, language, and availability.
- **Local Currency Verification**: The Actor validates prices against the target country storefront's official currency before saving. If a product does not have an active local offer, `price` is set to `null` to avoid recording inaccurate data.

### FAQ

#### Is scraping Amazon legal?

Amazon Product Scraper extracts only publicly accessible data available on public storefront web pages. It does not extract private customer information, access password-protected portals, or bypass authentication. You should always ensure your scraping activities comply with Amazon's Terms of Service and local privacy regulations (such as GDPR or CCPA).

#### Which Amazon storefronts are supported?

The Actor supports 23 national Amazon storefronts: United States, Canada, Mexico, Brazil, Ireland, Spain, United Kingdom, France, Belgium, Netherlands, Germany, Italy, Sweden, South Africa, Poland, Saudi Arabia, Egypt, Turkey, United Arab Emirates, India, Singapore, Australia, and Japan.

#### Can I search multiple countries in a single run?

Yes. You can select multiple countries in the `marketplaces` input. The Actor will run your keywords or ASINs across each selected country storefront in parallel and output results grouped by marketplace.

#### What is the difference between search items and product details?

Search items are extracted directly from search results pages (SERPs). They are fast and inexpensive, providing titles, prices, ratings, and rankings. Full product details open the individual product page, extracting specifications, bullet points, images, variation matrices, and verified merchant details.

#### Why is the price field null for some items?

If an item is out of stock, available only through special member programs, or does not have an active buy box offer available to anonymous shoppers in that region, `price` will be `null`. The Actor never fabricates or estimates prices.

#### How do I integrate this Actor into my workflow?

You can trigger runs and retrieve datasets via the Apify API, Apify CLI, Python SDK, JavaScript SDK, or integrations such as Make, Zapier, and n8n.

### Support

- Bug reports & feature requests: Open a ticket in the **Issues** tab.
- API & automation integration: See the **API** tab for endpoints and code snippets.

> **Disclaimer**: Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

# Actor input Schema

## `startUrls` (type: `array`):

Amazon search or product URLs from any supported storefront (for example amazon.de/s?k=maus or amazon.co.jp/dp/4837979653). Each URL keeps its own country marketplace.

## `marketplaces` (type: `array`):

Select storefronts for Search keywords and ASINs. Start URLs always use their own storefront. Default is US for existing workflows. Choose all 23 for a global run.

## `productUrls` (type: `array`):

Direct Amazon product page URLs. Use this simpler list for product-only batches; up to 50 URLs total across Start URLs and Product URLs.

## `maxItems` (type: `integer`):

Maximum unique marketplace and ASIN pairs across the run. Search-only multi-market runs share this cap across storefronts; set it at least as high as the market count.

## `getProductDetails` (type: `boolean`):

Off: search results return the fields shown on the results page (title, price, rating, placement). On: also open every product page for full details (specs, images, seller, variants, identifiers). Slower and costs more per product. Product URLs and ASINs always return full details.

## `searchQueries` (type: `array`):

Keywords to search in every selected marketplace. Up to 20 per run.

## `asins` (type: `array`):

10-character product IDs, including book ISBN-10 values. Each ASIN is opened in every selected marketplace; duplicates are removed by marketplace and ASIN.

## `maxPages` (type: `integer`):

Maximum search result pages to read for each search URL or keyword. The run also stops once Max products is reached or there are no more pages.

## `includeSponsored` (type: `boolean`):

Off: skip products that appear only as ads. Products that also appear organically are always kept.

## `maxConcurrency` (type: `integer`):

Parallel requests. Lower it if you see many blocked-page retries in the log.

## `maxRequests` (type: `integer`):

Hard cap on page requests across all selected marketplaces, including pagination and product details.

## `debugMode` (type: `boolean`):

Save the raw HTML of up to 5 failed pages to the key-value store.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.amazon.com/s?k=mechanical+keyboard"
    }
  ],
  "marketplaces": [
    "US"
  ],
  "productUrls": [],
  "maxItems": 50,
  "getProductDetails": false,
  "maxPages": 5,
  "includeSponsored": true,
  "maxConcurrency": 2,
  "maxRequests": 250,
  "debugMode": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All product and search item records.

## `summary` (type: `string`):

Counts, skips and stop reasons.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.amazon.com/s?k=mechanical+keyboard"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hypebridge/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 = { "startUrls": [{ "url": "https://www.amazon.com/s?k=mechanical+keyboard" }] }

# Run the Actor and wait for it to finish
run = client.actor("hypebridge/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 '{
  "startUrls": [
    {
      "url": "https://www.amazon.com/s?k=mechanical+keyboard"
    }
  ]
}' |
apify call hypebridge/amazon-product-scraper --silent --output-dataset

```

## MCP server setup

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