# Amazon Products API (`headlessagent/amazon-products-api`) Actor

Collect product details, keyword results, and Best Sellers from Amazon.

- **URL**: https://apify.com/headlessagent/amazon-products-api.md
- **Developed by:** [Headless Agent](https://apify.com/headlessagent) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Products API

Collect Amazon product details, keyword search results, Best Sellers, and products sold by specific sellers in one consistent format. Each result includes the product identifier, title, product link, image, and any displayed price, rating, review count, availability, and seller information.

Provide keyword searches, individual products, Best Sellers categories, sellers, or a combination. Products are deduplicated by ASIN, up to the total item limit. Data reflects the selected marketplace and the delivery location presented by Amazon. Some products may be unavailable, and unavailable fields are returned as `null`.

### Input

At least one of `searchQueries`, `products`, `bestsellerUrls`, or `sellers` is required. You can combine all four.

| Field | Type | Description |
| --- | --- | --- |
| `searchQueries` | string\[] | Search phrases, for example `usb c cable`. |
| `products` | string\[] | Product ASIN or full product link. An ASIN is the 10-character Amazon product ID, for example `B0D1XD1ZV3`; a link such as `https://www.amazon.com/dp/B0D1XD1ZV3` works too. |
| `bestsellerUrls` | string\[] | Best Sellers category links, for example `https://www.amazon.com/Best-Sellers/zgbs/electronics`. |
| `sellers` | string\[] | Merchant IDs (10–16 uppercase letters and digits), such as `A2L77EE7U53NWQ`, or HTTPS links with `seller=` or `me=` from the selected marketplace. This is the merchant identifier shown under "Sold by" on a product page, not the shop display name. |
| `maxItems` | integer | Maximum unique products in the run; default 100, maximum 1,000. |
| `marketplace` | string | Amazon store; default `www.amazon.com`. Product, category and seller links must belong to it. |

```json
{
  "searchQueries": ["usb c cable"],
  "products": ["B0D1XD1ZV3"],
  "bestsellerUrls": ["https://www.amazon.com/Best-Sellers/zgbs/electronics"],
  "sellers": ["A2L77EE7U53NWQ"],
  "maxItems": 20,
  "marketplace": "www.amazon.com"
}
```

Seller results continue through available pages until the total item limit or the end of results, with up to 10 pages per seller. A seller with no results returns no items.

### Output

| Field | Description |
| --- | --- |
| `asin` | Amazon product identifier. |
| `title` | Product title. |
| `url` | Product page URL. |
| `imageUrl` | Main product image, or `null`. |
| `price` | Displayed current price, or `null`. |
| `priceCurrency` | Displayed currency code, or `null`. |
| `listPrice` | Displayed list or original price, or `null`. |
| `rating` | Displayed rating out of five, or `null`. |
| `reviewCount` | Exact displayed review or rating count, or `null`. |
| `availability` | Displayed availability message, or `null`. |
| `seller` | Displayed seller, or `null`. |
| `sellerId` | Merchant identifier for seller results; otherwise `null`. |
| `source` | `search`, `product`, `bestsellers`, or `seller`. |
| `query` | Search phrase for keyword results; otherwise `null`. |
| `rank` | Displayed category Best Sellers rank; otherwise `null`. |
| `observedAt` | UTC observation timestamp. |

Best Sellers ranks belong to each displayed category. Different categories may each contain a product ranked first. Ratings and prices can change, and a marketplace may display prices in a delivery-location currency.

Example observed result:

```json
{
  "asin": "B09LCJPZ1P",
  "title": "Anker USB C to USB C Cable, 100W Fast Charging Cable (2-Pack, 6 ft, Black)",
  "url": "https://www.amazon.com/dp/B09LCJPZ1P",
  "imageUrl": "https://m.media-amazon.com/images/I/71fWdhjLjJL._AC_UY218_.jpg",
  "price": 181198.62,
  "priceCurrency": "IDR",
  "listPrice": 235612.62,
  "rating": 4.7,
  "reviewCount": 34732,
  "availability": null,
  "seller": null,
  "sellerId": null,
  "source": "search",
  "query": "usb c cable",
  "rank": null,
  "observedAt": "2026-10-27T18:20:04.006616+00:00"
}
```

# Actor input Schema

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

Search phrases, for example "usb c cable". Each phrase returns its own set of results.

## `products` (type: `array`):

An ASIN is the 10-character Amazon product ID, for example B0D1XD1ZV3. Full product links work too, for example https://www.amazon.com/dp/B0D1XD1ZV3.

## `bestsellerUrls` (type: `array`):

Links to Amazon Best Sellers category pages, for example https://www.amazon.com/Best-Sellers/zgbs/electronics.

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

Maximum number of unique products to save in this run.

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

Amazon store to use. Product, Best Sellers and seller links must belong to this store.

## `sellers` (type: `array`):

Seller IDs or HTTPS seller links from the selected marketplace. The seller ID is the 10–16 character uppercase alphanumeric merchant identifier shown under "Sold by" on a product page, not the shop display name. Links must carry seller= or me= with the ID. Collects available seller results up to the total item limit.

## Actor input object example

```json
{
  "searchQueries": [
    "usb c cable"
  ],
  "products": [
    "B0D1XD1ZV3"
  ],
  "bestsellerUrls": [
    "https://www.amazon.com/Best-Sellers/zgbs/electronics"
  ],
  "maxItems": 20,
  "marketplace": "www.amazon.com",
  "sellers": [
    "A2L77EE7U53NWQ"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Collected Amazon products.

# 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 = {
    "searchQueries": [
        "usb c cable"
    ],
    "products": [
        "B0D1XD1ZV3"
    ],
    "bestsellerUrls": [
        "https://www.amazon.com/Best-Sellers/zgbs/electronics"
    ],
    "maxItems": 20,
    "marketplace": "www.amazon.com",
    "sellers": [
        "A2L77EE7U53NWQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("headlessagent/amazon-products-api").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 = {
    "searchQueries": ["usb c cable"],
    "products": ["B0D1XD1ZV3"],
    "bestsellerUrls": ["https://www.amazon.com/Best-Sellers/zgbs/electronics"],
    "maxItems": 20,
    "marketplace": "www.amazon.com",
    "sellers": ["A2L77EE7U53NWQ"],
}

# Run the Actor and wait for it to finish
run = client.actor("headlessagent/amazon-products-api").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 '{
  "searchQueries": [
    "usb c cable"
  ],
  "products": [
    "B0D1XD1ZV3"
  ],
  "bestsellerUrls": [
    "https://www.amazon.com/Best-Sellers/zgbs/electronics"
  ],
  "maxItems": 20,
  "marketplace": "www.amazon.com",
  "sellers": [
    "A2L77EE7U53NWQ"
  ]
}' |
apify call headlessagent/amazon-products-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,headlessagent/amazon-products-api"
        }
    }
}
```

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/UN4NaA4F0dypommgl/builds/SdqqaycnlxDeKZt9Y/openapi.json
