# Amazon Product Scraper: Price, Buy Box, Offers & BSR (`foxlabs/amazon-product-scraper`) Actor

Amazon product data by ASIN, product link or keyword: price, list price, Buy Box seller and seller ID, offer list with seller ratings, Best Sellers Rank in every category, ratings, bought last month, variations. amazon.com, .co.uk, .de, .com.tr in local currency; fast mode: 48 ASINs per request.

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

## Pricing

from $3.00 / 1,000 product (full page)s

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?

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

## Amazon Product Scraper: Price, Buy Box, Offers & BSR

Get Amazon product data by **ASIN, product link or keyword** on **amazon.com, amazon.co.uk, amazon.de and amazon.com.tr**: **price and list price, the Buy Box seller and its seller ID, the offer list with seller ratings, Best Sellers Rank in every category, rating, ratings count, "bought in past month", variations, images and bullet points**. Prices come in the marketplace's own currency, priced for a delivery address in that country.

- 🛒 **Full product page** or **fast list data** (Amazon's own search results, **up to 48 ASINs per request**) — pick per run.
- 🏷️ **Buy Box and offer list**: the Buy Box offer and Amazon's first page of other offers (about 10) — seller, seller ID, price, condition, ships from (FBA or not), seller rating and positive % — plus the total number of offers.
- 📈 **Best Sellers Rank in every category** Amazon shows, plus "10K+ bought in past month" as a number.
- 🌍 **Local prices**: GBP on amazon.co.uk, EUR on amazon.de, TRY on amazon.com.tr — never a converted dollar price.

No Amazon account, no API key, no browser.

### Quick start (API)

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~amazon-product-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"asins": ["B07CMS5Q6P", "B004YAVF8I", "B09X7MPX8L"]}'
```

### What you get

One row per product and marketplace.

| Group | Fields |
|---|---|
| Product | `asin`, `marketplace`, `title`, `brand`, `url`, `categories` (breadcrumb), `bullets` ("About this item"), `specifications` (Amazon's product information table, keyed by Amazon's own labels), `imageUrl`, `images` (full size from product pages; the search thumbnail in fast rows), `parentAsin`, `variationAsins`, `variationCount`, `variationAttributes` (size, color…) |
| Price | `price` (the Buy Box price), `currency` (from the price on the page), `priceInCartOnly` (Amazon shows the price only in the cart), `listPrice` with `listPriceLabel` (Amazon's own label: List Price, Typical price, RRP, UVP, Statt, Önceki Fiyat… on product pages; the short form such as List or Typical on search results), `savingsPercent`, `unitPrice` ("£0.04 / count"), `coupon` |
| Buy Box | `buyBoxSeller`, `buyBoxSellerId` (Amazon's merchant ID), `soldByAmazon`, `shipsFrom`, `fulfilledByAmazon`, `availability`, `inStock`, `deliverTo` (the delivery location Amazon priced the page for) |
| Offers | `offersCount` and `lowestOfferPrice` ("New (16) from $246.19"); with **Offer list** on: `offers[]` — `isBuyBox`, `price`, `currency`, `condition`, `seller`, `sellerId`, `shipsFrom`, `sellerRating`, `sellerRatingsCount`, `sellerPositivePercent`, `delivery` — and `otherOffersCount` (how many other offers Amazon lists besides the Buy Box offer) |
| Demand & rank | `rating`, `ratingsCount`, `boughtPastMonth` (number) and `boughtPastMonthText`, `bestsellerRank` + `bestsellerCategory` (the first rank), `bestsellerRanks[]` (every rank with its category), `isAmazonsChoice`, `bestSellerBadge` |
| Search | `searchQuery`, `searchRank` (organic position), `isSponsored`, `isPrime` (fast rows) |
| Run | `input` (your input line, to join results back), `detailLevel` (`full` / `fast`), `scrapedAt`, `error` (only on rows that explain a problem; `null` on product rows) |

Fields Amazon does not show for a product are `null` — a price, a count or a rank is never guessed and never `0` when unknown. Fast rows carry the search-result fields only (no seller, rank, variations, bullets; `brand` only when the result shows a brand line, as fashion and toy results do).

#### Sample output

A row from an Apify platform test run (2026-10-01, offer list on; 2 of its 11 offers, 3 of its 21 variations and 3 of its 33 specification rows shown; `images`, `isPrime`, `isSponsored`, `searchQuery` and `searchRank` left out):

```json
{
  "asin": "B07CMS5Q6P",
  "marketplace": "amazon.com",
  "title": "Logitech G305 Lightspeed Wireless Gaming Mouse - Black",
  "brand": "Logitech G",
  "price": 29.99,
  "currency": "USD",
  "priceInCartOnly": false,
  "listPrice": 49.99,
  "listPriceLabel": "List Price",
  "savingsPercent": 40,
  "unitPrice": null,
  "availability": "In Stock",
  "inStock": true,
  "buyBoxSeller": "Amazon.com",
  "buyBoxSellerId": "ATVPDKIKX0DER",
  "soldByAmazon": true,
  "shipsFrom": "Amazon.com",
  "fulfilledByAmazon": true,
  "offersCount": 16,
  "lowestOfferPrice": 25.1,
  "otherOffersCount": 15,
  "offers": [
    { "isBuyBox": true, "price": 29.99, "currency": "USD", "condition": "New", "seller": "Amazon.com", "sellerId": null, "shipsFrom": "Amazon.com", "sellerRating": null, "sellerRatingsCount": null, "sellerPositivePercent": null, "delivery": "FREE delivery Tuesday, October 6 on orders shipped by Amazon …" },
    { "isBuyBox": false, "price": 25.1, "currency": "USD", "condition": "Used - Acceptable", "seller": "Amazon Resale", "sellerId": null, "shipsFrom": "Amazon.com", "sellerRating": null, "sellerRatingsCount": null, "sellerPositivePercent": null, "delivery": "FREE delivery Tuesday, October 6 on orders shipped by Amazon …" }
  ],
  "rating": 4.6,
  "ratingsCount": 40122,
  "boughtPastMonth": 10000,
  "boughtPastMonthText": "10K+ bought in past month",
  "bestsellerRank": 8,
  "bestsellerCategory": "Video Games",
  "bestsellerRanks": [{ "rank": 8, "category": "Video Games" }, { "rank": 1, "category": "PC Gaming Mice" }, { "rank": 1, "category": "Mac Gaming Mice" }],
  "categories": ["Video Games", "PC", "Accessories", "Gaming Mice"],
  "bullets": ["The next-generation optical HERO sensor delivers incredible performance and up t…", "…"],
  "specifications": { "Connectivity Technology": "USB", "Additional Features": "Wireless", "Movement Detection": "Optical" },
  "imageUrl": "https://m.media-amazon.com/images/I/51sg9BLSMTL._AC_SL1500_.jpg",
  "parentAsin": "B0H5WRQK7Q",
  "variationAsins": ["B07CMS5Q6P", "B086PDW7BB", "B09YJ6C61T"],
  "variationCount": 21,
  "variationAttributes": ["color", "style", "pattern"],
  "isAmazonsChoice": true,
  "bestSellerBadge": null,
  "coupon": null,
  "deliverTo": "Dallas 75216",
  "url": "https://www.amazon.com/dp/B07CMS5Q6P",
  "detailLevel": "full",
  "input": "B07CMS5Q6P",
  "scrapedAt": "2026-10-01T15:44:33.344Z",
  "error": null
}
```

### How it works

- **Full product page**: the Actor reads the product page and stops reading after the Best Sellers Rank block (the reviews below it are not used); on amazon.com.tr, where a few product-information rows come after the rank, it reads up to the reviews.
- **Fast list data**: Amazon's own search can look up a list of ASINs at once (`s?rh=p_78:ASIN|ASIN…`). The Actor asks for up to 48 ASINs per request and reads the search-result data of each. An ASIN the search does not return (for example a variation Amazon does not list) is read from its product page instead and still counted as fast data.
- **Offer list**: Amazon's "All offers" panel for each product — the Buy Box offer and the first page of other offers.
- **Location and currency**: Amazon prices a page for the delivery address. Every session asks for the local currency. On amazon.co.uk and amazon.de each datacenter session first sets a domestic postcode through Amazon's own location menu (London SW1A 1AA / Berlin 10115, or your `zipCode`, which also works on amazon.com); a residential session already has an IP in the country and uses Amazon's location for it unless you set `zipCode`. A page that still comes in another currency, or priced for a foreign location, is read again on a new session and then through a residential IP in that country; if it stays wrong it is left out with the reason, never delivered with a foreign price. A single search result priced in another currency is delivered without its prices (or, for an ASIN list, read from its product page).
- **Blocks**: requests start on Apify datacenter proxy. Amazon's "Continue shopping" page and its bot-check page are answered without a browser. A blocked or incomplete page is retried on up to three new datacenter sessions and then through Apify residential proxy in the marketplace's country.

### Input & options

| Field | What it does |
|---|---|
| `asins` | ASINs or product links, one per line. A link's own marketplace is used. |
| `searchQueries` | Keywords or Amazon search-result links (with filters). Organic results only. |
| `marketplace` | `amazon.com` (default), `amazon.co.uk`, `amazon.de`, `amazon.com.tr` — for bare ASINs and keywords. |
| `detailLevel` | `full` (default): product page per product. `fast`: search-result data, up to 48 ASINs per request. |
| `includeOffers` | Also read the offer list of each product (one extra request; separate event). |
| `maxResultsPerSearch` | Products per search (default 50, up to 500). Amazon stops after 7 result pages for most keywords: "water bottle" gave 304 organic results. |
| `maxItems` | Stop after this many products in the run (empty = no limit). |
| `zipCode` | Delivery postcode in the marketplace's country. It applies to every marketplace in the run, so use it with one marketplace per run. |
| `proxyConfiguration`, `residentialFallback` | Leave the defaults. |

### Example inputs (copy & paste)

**1. Product details for an ASIN list (US)**

```json
{ "asins": ["B07CMS5Q6P", "B004YAVF8I", "B09X7MPX8L"], "detailLevel": "full" }
```

**2. Daily price check of a large ASIN list (fast, 48 per request)**

```json
{ "asins": ["B07CMS5Q6P", "B004YAVF8I", "B09X7MPX8L", "B09XBTZDX8"], "detailLevel": "fast" }
```

**3. Buy Box and all sellers (brand / MAP monitoring)**

```json
{ "asins": ["B09X7MPX8L", "B07CMS5Q6P"], "includeOffers": true }
```

**4. German prices in EUR for products you know by link**

```json
{ "asins": ["https://www.amazon.de/dp/B0BTYCRJSS", "https://www.amazon.de/dp/B000VJ8NEU"], "zipCode": "10115" }
```

**5. Top results for a keyword on amazon.co.uk**

```json
{ "searchQueries": ["phone case"], "marketplace": "amazon.co.uk", "detailLevel": "fast", "maxResultsPerSearch": 20 }
```

### Use cases

- **Brand protection and MAP monitoring**: who holds the Buy Box, which sellers list your products, at what price, shipped by whom; items whose price Amazon shows only in the cart (`priceInCartOnly`, set only after three reads of the page show it that way — Amazon also shows this now and then for ordinary items).
- **Price monitoring and repricing**: price, list price and lowest other offer for thousands of ASINs on a schedule (fast mode reads 48 per request; coupons come with full product pages).
- **Amazon seller and product research**: Best Sellers Rank in every category, "bought in past month", rating and review counts, offer count.
- **Cross-border comparison**: the same ASIN on amazon.com, amazon.co.uk, amazon.de and amazon.com.tr, each in its own currency.
- **Catalog enrichment**: titles, brands, bullet points, specifications, images and variation families.

### Performance

Measured on the Apify platform on 1 October 2026 with 1 GB memory (the default), datacenter proxy first:

| Run | Products | Time |
|---|---|---|
| Fast, ASIN list (US) + 2 keyword searches (DE) | 1,000 ASINs (993 from 21 multi-ASIN requests, 7 from their product pages) + 100 search results | 3 min 7 s |
| Fast, 26 keyword searches (US, UK, DE, TR) | 1,300 | 6 min 33 s |
| Full product pages, 4 marketplaces, datacenter proxy only | 200 (all 200 delivered) | 8 min 14 s |
| Full product pages + offer list (US, UK, DE) | 110 (110 offer lists) | 4 min 17 s |
| Full product pages, US, while Amazon challenged many requests | 100 (all 100 delivered; 8 through residential proxy) | 7 min 31 s |

Full pages run 8 at a time; how often Amazon answers with a bot check changes during the day, and a challenged page costs one or more extra requests. Peak memory on the current build: 170–410 MB in runs of 60 to 1,300 products.

### Data quality

Share of delivered product rows with the field filled (Apify platform runs, 1 October 2026; a field is empty when Amazon does not show it for that product):

| Field | amazon.com (100) | amazon.co.uk (50) | amazon.de (50) | amazon.com.tr (30) |
|---|---|---|---|---|
| Price (local currency) | 97% | 100% | 96% | 100% |
| Buy Box seller + seller ID | 99% | 100% | 94% | 100% |
| Best Sellers Rank | 93% | 96% | 94% | 100% |
| Rating + ratings count | 99% | 100% | 98% | 100% |
| Bought in past month | 94% | 98% | 90% | 60% |
| List / reference price | 51% | 46% | 50% | 10% |

The table comes from test runs on builds 0.1.1–0.1.5; a later run of 56 US products (build 0.1.7) gave price 95%, Buy Box seller 95%, Best Sellers Rank 91%, bought in past month 82%.

Fast rows (1,300 search results in four marketplaces and 1,000 US ASINs): price 98–99%, rating 99–100%, image 100%, bought in past month 82–92% (amazon.com.tr 60%; amazon.de measured in a later run after a fix). Titles are product names also on fashion and toy results, whose brand line goes to `brand` (150 such results checked on build 0.1.6).

- None of the 3,083 priced product rows and 583 priced offers in the test runs came in another currency. A page in another currency or priced for a foreign location is not delivered with that price.
- Currency is read from the price on the page; only a price Amazon prints without any currency sign gets the marketplace's currency. Numbers Amazon shows as text are converted with the marketplace's own format ("1.682,00TL", "(7.407)", "10K+", "4 B"); anything that cannot be read stays `null`.
- Each (marketplace, ASIN) appears once per run.
- Parsers are tested offline on 36 responses recorded from all four marketplaces (product pages, offer panels, multi-ASIN searches, keyword searches, bot-check and location pages), including books, apparel, Amazon-sold and third-party offers, and products without a Best Sellers Rank.
- A missing value is mostly Amazon not showing it (no list price, no "bought" badge, no rank on brand-store fashion pages). It can also be a reduced product page Amazon served after a bot check: in the test runs, 8 of 38 rows without a rank had one in another run. The Actor reads such pages again on another session and delivers a reduced page only if no complete one comes.

### Pricing

Pay per event (the prices, and any per-run start fee, are on the Pricing tab):

- **`product`** — one product row read from its product page (`detailLevel: full`).
- **`product-lite`** — one product row from Amazon's search results (`detailLevel: fast`, and keyword searches in fast mode). An ASIN the fast lookup does not return and that is read from its product page is still one `product-lite`.
- **`offers`** — on top of the row, when the offer list was requested and Amazon returned at least one offer.

Rows that explain a problem (an invalid input line, an ASIN Amazon does not show, a search without results, a page that stayed in the wrong currency) carry the reason in `error` and are **not charged**. See the Pricing tab for the prices.

### Integrations

**JavaScript**

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('foxlabs/amazon-product-scraper').call({ asins: ['B07CMS5Q6P'], includeOffers: true });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**Python**

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("foxlabs/amazon-product-scraper").call(run_input={"asins": ["B07CMS5Q6P"], "detailLevel": "fast"})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

Make, Zapier, n8n, Google Sheets and webhooks work through Apify's integrations; schedule the same input daily to follow prices and Buy Box changes.

### FAQ

**Which marketplaces?** amazon.com, amazon.co.uk, amazon.de and amazon.com.tr. Other Amazon stores are reported as "not supported yet" (free row).

**Full or fast?** Full reads every product page (Buy Box seller, rank, variations…). Fast reads Amazon's search results for up to 48 ASINs per request — much faster (1,000 ASINs in about 3 minutes), charged as the lighter `product-lite` event, with price, list price, rating, ratings count and bought-last-month.

**Why is `price` empty for some products?** Amazon shows no Buy Box price (no featured offer, out of stock), or shows the price only in the cart (`priceInCartOnly: true`). The Actor never guesses a price.

**Why does the Buy Box seller change between runs?** Amazon rotates the Buy Box between sellers; each row is what Amazon showed at `scrapedAt`.

**Are reviews included?** No. Amazon shows its full review lists only to signed-in users; the rating, ratings count and "bought in past month" are included.

**Which delivery address are prices for?** On amazon.co.uk and amazon.de a London / Berlin postcode unless you set `zipCode` (a page read through a residential IP in the country, without `zipCode`, is priced for that IP's location); on amazon.com and amazon.com.tr the location Amazon guesses from the request's IP (for example "Tempe 85280"), or your `zipCode`. `deliverTo` shows the location the page was priced for whenever Amazon prints one.

**Why is the Best Sellers Rank empty for some products?** Amazon does not show a rank on every product page (brand-store fashion pages, for example, have none). The rank is never filled from another page.

**`soldByAmazon` is true but `buyBoxSellerId` is not Amazon's usual ID?** On amazon.co.uk some products sold by "Amazon" carry another merchant ID on the page (for example vitamins). The Actor delivers the seller name and ID as Amazon shows them.

**Do I need a proxy or an Amazon account?** No. The default Apify Proxy setting is all you need.

**Can I get the same product from several marketplaces?** Yes — give product links from each marketplace; each link is read on its own store.

**What does `bestsellerRank` mean when there are several?** It is the first rank Amazon lists (usually the main category); `bestsellerRanks` has every rank with its category.

### Troubleshooting

- **A row has `error: "not-found: …"`**: the ASIN has no product page on that marketplace (removed, or sold on another Amazon store).
- **A row has `error: "invalid-input: …"`**: the line is not an ASIN or an Amazon product link, or the marketplace is not supported yet.
- **Fewer search results than asked**: Amazon lists fewer organic results for that keyword (sponsored results are left out).
- **Everything empty**: the rows with `error` give the reason for each input line; the `SOURCE_REPORT` record in the run's key-value store has the requests per marketplace (with blocked and failed pages), the totals (delivered, not found, failed) and the outcome of each search.

### Notes, limits & legal

- Public product pages only: no login, no account data, no reviews.
- Amazon's Conditions of Use restrict automated access; you are responsible for how you use the data. Product data on EU marketplaces may be protected by database rights.
- Prices, Buy Box and offers change minute to minute; a row is a snapshot at `scrapedAt`.
- The offer list covers the Buy Box offer and Amazon's first page of other offers (about 10); `otherOffersCount` says how many other offers Amazon lists in total.

### Support

Questions, a marketplace you need, or a field that looks wrong: open an issue on the Actor's Issues tab or write to info@foxlabs.com.tr.

### Changelog

#### 0.1 — 2026-10-01

First version: ASIN lists, product links and keyword searches on amazon.com, amazon.co.uk, amazon.de and amazon.com.tr; full product pages or fast search-result data (48 ASINs per request); optional offer list; local currency and domestic delivery location; `product`, `product-lite` and `offers` events. Fixes made during the private test runs before release are listed in CHANGELOG.md.

*Built by foXLabs.*

# Changelog

This Actor's version history is a separate document: https://apify.com/foxlabs/amazon-product-scraper/changelog.md

# Actor input Schema

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

One per line: an ASIN (10 letters and digits, such as B07CMS5Q6P) or an Amazon product link (…/dp/ASIN). A link's own marketplace is used (an amazon.de link is read on amazon.de); a bare ASIN uses the Marketplace below. Each product is delivered once per run. Lines that are not a product (or a marketplace that is not supported yet) come back as free rows with the reason.

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

Optional. One per line: a keyword as you would type it into Amazon ("coffee beans"), or an Amazon search results link with its filters (…/s?k=…\&rh=…). Organic results are returned in Amazon's order; sponsored results are left out. A link's own marketplace is used.

## `marketplace` (type: `string`):

Amazon store for bare ASINs and keywords. Prices come in the store's own currency and for a delivery address in its country.

## `detailLevel` (type: `string`):

Full product page: price, list price, Buy Box seller and seller ID, ships from, offer count, Best Sellers Rank in every category, rating, reviews, bought last month, variations, images, bullet points, specifications (one page per product). Fast list data: price, list price, rating, reviews, bought last month, image and other offers from Amazon's search results, up to 48 ASINs per request; much faster and cheaper, without seller, rank or variations.

## `includeOffers` (type: `boolean`):

For each product, also read Amazon's offer list: the Buy Box offer and the first page of other offers (about 10), each with price, condition, seller, seller ID, ships from, seller rating and delivery. One extra request per product, charged as a separate event only when offers are returned.

## `maxResultsPerSearch` (type: `integer`):

Products to take from each search (Amazon shows about 16-60 per page; the Actor follows the result pages).

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

Stop after this many products in the whole run, to control cost. Empty or 0 = no limit. Your ASIN list is read in order.

## `zipCode` (type: `string`):

Prices, stock and offers depend on the delivery address. Give a postcode in the marketplace's country (10001, SW1A 1AA, 10115). Empty: London SW1A 1AA on amazon.co.uk, Berlin 10115 on amazon.de; on amazon.com and amazon.com.tr the location Amazon guesses from the request's IP (shown in deliverTo).

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

Leave the default (Apify Proxy). Requests start on Apify datacenter proxy; a blocked request is retried on up to three new datacenter sessions and then through Apify residential proxy in the marketplace's country.

## `residentialFallback` (type: `boolean`):

On by default. Off: blocked requests are retried on datacenter sessions only.

## Actor input object example

```json
{
  "asins": [
    "B07CMS5Q6P",
    "B004YAVF8I",
    "B09X7MPX8L"
  ],
  "marketplace": "amazon.com",
  "detailLevel": "full",
  "includeOffers": false,
  "maxResultsPerSearch": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

## `dataset` (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 = {
    "asins": [
        "B07CMS5Q6P",
        "B004YAVF8I",
        "B09X7MPX8L"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/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 = { "asins": [
        "B07CMS5Q6P",
        "B004YAVF8I",
        "B09X7MPX8L",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/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 '{
  "asins": [
    "B07CMS5Q6P",
    "B004YAVF8I",
    "B09X7MPX8L"
  ]
}' |
apify call foxlabs/amazon-product-scraper --silent --output-dataset

```

## MCP server setup

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