# Amazon Search Scraper: Rank, Price & ASIN, 18 Stores (`khadinakbar/amazon-search-scraper`) Actor

Scrape Amazon search result pages by keyword or URL across 18 marketplaces. Extract rank, ASIN, title, price, rating, reviews, Prime, sponsored flags, badges, thumbnails, and product URLs in flat JSON optimized for SEO and AI agents. MCP/API-ready.

- **URL**: https://apify.com/khadinakbar/amazon-search-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** E-commerce, MCP servers, Agents
- **Features:** Limited permissions
- **Stats:** 390 total users, 32 monthly users, 99.6% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 search result scrapeds

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

### What is Amazon Search Scraper?

Amazon Search Scraper is an Apify Actor for Amazon search result pages by keyword or URL across 18 marketplaces. It accepts `searchQueries`, a single `searchQuery`, or `startUrls`, and returns one flat record per search result row. Each record can include rank fields, ASIN, title, product URL, marketplace, page position, organic rank, sponsored flag, price, rating, review count, Prime status, badges, thumbnails, and other visible search-card fields. The dataset is organized for SEO workflows, dashboards, and AI agents, and it is available through Apify API and Apify MCP. It costs $0.002 per row returned, with Apify platform usage included, and needs no Amazon login. Optional filters (price, rating, Prime) mean you pay only for the rows you want, and every run also writes an organic-rank-versus-ads report.

#### Example row

```json
{
  "asin": "B0GSZ4H122",
  "title": "Veken 63\"x28\" Wider Large Standing Desk, Electric Height Adjustable, Brown",
  "url": "https://www.amazon.com/dp/B0GSZ4H122",
  "marketplace": "US",
  "searchQuery": "standing desk",
  "searchUrl": "https://www.amazon.com/s?k=standing+desk",
  "sourceType": "keyword",
  "page": 1,
  "positionOnPage": 7,
  "organicRank": 2,
  "globalPosition": 7,
  "isSponsored": false,
  "price": 149.98,
  "listPrice": 219.99,
  "currency": "USD",
  "discountPercent": 32,
  "rating": 4.2,
  "reviewCount": 478,
  "boughtInPastMonth": "1K+ bought in past month",
  "isPrime": false,
  "badgeText": "Limited time deal",
  "deliveryText": "Join Prime to get FREE delivery Tomorrow, Nov 10 Or Non-members get FREE delivery Sat, Nov 14",
  "couponText": null,
  "availabilityText": null,
  "scrapedAt": "2026-11-09T18:09:42.527Z"
}
```

### Best fit and connected workflows

Use this Actor when your workflow starts with Amazon discovery and you want search-page data in a compact dataset:

- Keyword rank tracking across Amazon marketplaces
- SERP monitoring for branded or competitor terms
- Ecommerce SEO reporting from Amazon search pages
- Product discovery from a marketplace search URL
- Agent workflows that need structured search rows before enrichment

If you also want detail-page fields (brand, Best Sellers Rank, bullets, images, seller) in the same run, Amazon Product Search Scraper returns these same search rows plus optional detail pages and filters. If your next step is to turn selected search results into deeper product records, Amazon Product Details Scraper fits a workflow where you start with a search row, follow its product URL, and collect product-page fields. If your workflow continues from discovery into marketplace list analysis, Amazon Bestsellers Scraper works with selected public Amazon records. For public contact discovery tied to relevant listings, Amazon Seller Email Scraper - Public Contact Finder connects naturally after you identify the sellers or products you want to review.

### Practical scenario

Maya manages ecommerce content for a home office brand. She starts with the keyword `standing desk` in the US marketplace and asks for 25 results per query. The dataset returns rows with `globalPosition`, `organicRank`, `isSponsored`, `price`, `rating`, `reviewCount`, `badgeText`, and `searchUrl`. Maya reviews the top organic positions, notes which cards are sponsored, and then uses the product URLs to route the most relevant listings into a deeper catalog review process.

### Input fields

| Field                | Type    | Description                                                                                 |
| -------------------- | ------- | ------------------------------------------------------------------------------------------- |
| `searchQueries`      | array   | Amazon keywords to search, one per line.                                                    |
| `searchQuery`        | string  | Optional single keyword for API and MCP callers.                                            |
| `startUrls`          | array   | Direct Amazon search or category URLs. The URL domain overrides the selected marketplace.   |
| `country`            | string  | Marketplace used for keyword searches.                                                      |
| `maxResultsPerQuery` | integer | Maximum product rows returned for each keyword or start URL across all pages, not per page. |
| `maxSearchPages`     | integer | Maximum Amazon result pages visited for each seed. Use 7 for a 100-row request.             |
| `maxResults`         | integer | Optional overall cap across all keywords and links (a cost ceiling).                        |
| `minPrice`, `maxPrice` | number | Only rows inside this price band, in the store's own currency.                            |
| `minRating`          | number  | Only rows rated at least this many stars (0 to 5).                                          |
| `primeOnly`          | boolean | Only Prime-eligible products, filtered by Amazon itself (US store).                         |
| `includeSponsored`   | boolean | Keep sponsored cards, flagged with `isSponsored` (default on).                              |

Price and rating filters are applied before a row is saved or charged, so you pay only for matching rows. `organicRank` and `positionOnPage` still show where each product really appeared. Filters look at the pages the Actor reads (`maxSearchPages`), so a tight filter can return fewer rows than the cap; raise `maxSearchPages` to look deeper. A product with no listed price or rating cannot match a price or rating filter and is skipped. Prime only is requested from Amazon itself because a search shown to a visitor who is not logged in carries no Prime badge; on stores other than the US the Actor stops with a clear message, so paste a search link that already has Amazon's Prime filter applied instead.
| `sortBy`             | string  | Sorting for keyword searches.                                                               |
| `includeSponsored`   | boolean | Includes sponsored results and marks them with `isSponsored`.                               |
| `proxyConfiguration` | object  | Proxy settings for the run.                                                                 |

Use one input mode for a single search: `searchQuery` for one keyword, `searchQueries` for a list of keywords, or `startUrls` for existing Amazon search/category pages. When more than one mode is supplied, the Actor intentionally scrapes every supplied seed and labels each row with its `searchQuery` and `searchUrl`.

Example input:

```json
{
    "searchQueries": ["wireless earbuds"],
    "country": "US",
    "maxResultsPerQuery": 25,
    "maxSearchPages": 2,
    "sortBy": "relevance",
    "includeSponsored": true,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US"
    }
}
```

Direct Amazon search or category URLs are also supported:

```json
{
    "startUrls": [
        { "url": "https://www.amazon.com/s?k=mechanical+keyboard" },
        { "url": "https://www.amazon.co.uk/s?k=running+shoes" }
    ],
    "maxResultsPerQuery": 50
}
```

For up to 100 rows from an India 5G search, keep the query as `5g` and set the row cap and page cap separately:

```json
{
    "searchQuery": "5g",
    "country": "IN",
    "maxResultsPerQuery": 100,
    "maxSearchPages": 7,
    "includeSponsored": true
}
```

For a larger request, use the same pattern. For example, request up to 700 rows with `maxResultsPerQuery: 700` and `maxSearchPages: 20` (the Actor's current page limit). Amazon may expose fewer results or cap pagination for a query, so the returned count can be lower than the estimated number shown in Amazon's interface. Reaching 700 rows takes multiple search pages.

### Output fields

Each Amazon search result is stored as a flat JSON object in the default dataset. The run summary is stored in the default key-value store under `OUTPUT`.

| Field               | Type            | Description                                                                  |
| ------------------- | --------------- | ---------------------------------------------------------------------------- |
| `asin`              | string          | Amazon Standard Identification Number.                                       |
| `title`             | string or null  | Product title shown on the search result page.                               |
| `url`               | string          | Product URL resolved from the search result card.                            |
| `marketplace`       | string          | Marketplace code such as US, UK, DE, or JP.                                  |
| `searchQuery`       | string or null  | Keyword used for the search, when available.                                 |
| `searchUrl`         | string          | Search or category result page URL where this row was found.                 |
| `sourceType`        | string          | How the search page was provided: `keyword`, `searchUrl`, or `categoryUrl`.  |
| `page`              | integer         | Search results page number.                                                  |
| `positionOnPage`    | integer         | Position of this product card on the current page, including sponsored rows. |
| `organicRank`       | integer or null | Organic position on the current page. Sponsored rows have null organic rank. |
| `globalPosition`    | integer         | Position across all pages for this seed after filtering.                     |
| `isSponsored`       | boolean         | Whether Amazon marks the result as sponsored.                                |
| `price`             | number or null  | Current price visible on the search result page.                             |
| `listPrice`         | number or null  | Original or strike-through price visible on the result card.                 |
| `currency`          | string or null  | ISO currency code inferred from price text or marketplace.                   |
| `discountPercent`   | number or null  | Computed discount percentage when price and list price are available.        |
| `rating`            | number or null  | Star rating visible on the search result page.                               |
| `reviewCount`       | integer or null | Review count visible on the search result page.                              |
| `boughtInPastMonth` | string or null  | Amazon purchase-frequency text such as `10K+ bought in past month`.          |
| `isPrime`           | boolean or null | Whether the card shows Prime eligibility.                                    |
| `thumbnail`         | string or null  | Primary product thumbnail URL.                                               |
| `badgeText`         | string or null  | Badge text such as suitable Seller or Amazon's Choice, when present.         |
| `deliveryText`      | string or null  | Delivery promise text visible on the result card.                            |
| `couponText`        | string or null  | Coupon or savings text visible on the result card.                           |
| `availabilityText`  | string or null  | Availability state visible on the result card.                               |
| `scrapedAt`         | string          | ISO timestamp when the row was scraped.                                      |

Illustrative output record:

```json
{
    "asin": "B08N5WRWNW",
    "title": "Wireless Earbuds Bluetooth Headphones",
    "url": "https://www.amazon.com/dp/B08N5WRWNW",
    "marketplace": "US",
    "searchQuery": "wireless earbuds",
    "searchUrl": "https://www.amazon.com/s?k=wireless+earbuds",
    "sourceType": "keyword",
    "page": 1,
    "positionOnPage": 3,
    "organicRank": 2,
    "globalPosition": 3,
    "isSponsored": false,
    "price": 49.99,
    "listPrice": 69.99,
    "currency": "USD",
    "discountPercent": 29,
    "rating": 4.5,
    "reviewCount": 12345,
    "boughtInPastMonth": "10K+ bought in past month",
    "isPrime": true,
    "thumbnail": "https://m.media-amazon.com/images/I/example.jpg",
    "badgeText": "Amazon's Choice",
    "deliveryText": "FREE delivery Fri, Jun 12",
    "couponText": "Save 10% with coupon",
    "availabilityText": null,
    "scrapedAt": "2026-06-11T10:00:00.000Z"
}
```

### How it works

This Actor uses a search-focused crawl flow built on CheerioCrawler with residential proxies and session pooling. It reads either keyword inputs or Amazon search and category URLs, then extracts visible search result card data into flat dataset rows. The implementation targets 18 marketplaces: US, UK, DE, FR, CA, ES, IT, JP, AU, IN, MX, BR, NL, SE, PL, TR, AE, and SG. Its output is intentionally flat so it can be consumed directly by SEO tooling, API clients, and Apify MCP.

### Pricing

Amazon Search Scraper uses Pay per event pricing with Apify platform usage included. The live Pricing tab is the source of truth for current charges.

- An actor start event is charged when the run starts.
- Each returned search result row is charged as one `Search result scraped` event.
- Apify platform usage is included in the event price, as shown in the live Pricing tab.

For example, if a run returns one hundred search result rows, the billed usage includes one actor start event and one hundred search result events with Apify platform usage included from the live Pricing tab: 100 rows = 100 x $0.002 = $0.20 plus the start event. Filters and caps stop you paying for rows you do not want.

### Use with AI agents (MCP)

This Actor is available through Apify MCP as a tool for Amazon search discovery. The tool accepts a keyword or Amazon search URL and returns structured rows with rank, ASIN, product URL, and visible marketplace fields.

Actor identity: `khadinakbar/amazon-search-scraper`

Set it up once in Claude Code, Claude Desktop or Cursor:

```bash
claude mcp add apify --transport http "https://mcp.apify.com?tools=khadinakbar/amazon-search-scraper"
```

Then sign in to Apify when asked. Example prompts:

- "Search Amazon US for 'standing desk' and tell me how many of the first 3 pages are ads and which brands hold the top 5 organic spots."
- "Run Amazon Search for 'protein powder' in the UK, only products rated 4 stars or more under 40 pounds, and list the cheapest 10."
- "Compare the first-page ad share for 'wireless earbuds' and 'bluetooth speaker' using the RANK_REPORT."

This Actor also accepts per-request agent payments, so an agent can pay for a single run.

> Search Amazon for "wireless earbuds" in the US marketplace. Return the top 10 results, include sponsored rows, and keep the output focused on rank, ASIN, title, price, rating, review count, and product URL.

Output interpretation:

- `globalPosition` shows the row order across paginated results.
- `positionOnPage` shows the card position on the current page.
- `organicRank` is filled for organic rows and is null for sponsored rows.
- `isSponsored` identifies Amazon-marked sponsored cards.
- `searchUrl` preserves the source page used for the row.
- `thumbnail`, `badgeText`, `deliveryText`, `couponText`, and `availabilityText` reflect visible card details when Amazon shows them.

Provenance and scope:

- Results come from Amazon search result pages only.
- The dataset reflects the search or category page you provide, or the keyword you set.
- Product detail pages are a separate workflow step if you later need deeper enrichment.

Pagination and cost guidance:

- `maxSearchPages` controls how many result pages the Actor visits per seed. Amazon often returns far fewer than 100 cards on one page; increase this when you need a larger total.
- `maxResultsPerQuery` controls the total number of product rows returned per seed across all visited pages.
- Because charging is per returned row, narrower queries and smaller result caps keep runs compact.

The Actor does not merge rows by similar title text. Search rows are identified by Amazon ASIN, so repeated cards with the same ASIN on one page are emitted once. A color, storage, or other option that is hidden behind one ASIN is not a separate search row; use a product-detail/variation workflow when you need every variation ASIN.

### Example with the Apify API

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: process.env.APIFY_TOKEN,
});

const run = await client.actor('khadinakbar/amazon-search-scraper').call({
    searchQueries: ['standing desk'],
    country: 'US',
    maxResultsPerQuery: 10,
    maxSearchPages: 1,
    includeSponsored: false,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(items);
```

### Best results and outcome guidance

Start with one keyword or one Amazon search URL and a small result cap so the dataset shape is easy to review. Use `includeSponsored` to match your reporting goal, and keep `country` aligned with the marketplace domain or keyword target. When your workflow is rank tracking, the most useful fields are `globalPosition`, `organicRank`, `page`, `positionOnPage`, and `isSponsored`. When your workflow is product selection, the most useful fields are `title`, `url`, `price`, `rating`, `reviewCount`, `badgeText`, and `thumbnail`.

If you ask for 100 rows, set `maxResultsPerQuery` to `100` and `maxSearchPages` to at least `7`. The first value is the total row cap; the second is the pagination budget.

### Continue the workflow

- Then use [Amazon Seller Email Scraper](https://apify.com/khadinakbar/amazon-seller-email-scraper) to continue from Amazon Search Scraper discovery into enrichment data for the selected records.
- Then use [Amazon Seller Scraper](https://apify.com/khadinakbar/amazon-seller-scraper) to continue from Amazon Search Scraper discovery into enrichment data for the selected records.

### What this Actor will not do

- It does not log in to Amazon, open product detail pages or return review text (use the product-details or reviews Actors for those).
- It reads search result cards only. The Prime flag is true when the card shows a Prime badge or its delivery or deal text names Prime ("Join Prime to get FREE delivery…"). A search without a login shows no badge, so a Prime product that only says "FREE delivery" can still show false; use `primeOnly` on the US store to get every Prime-eligible product from Amazon itself.
- Filters look only at the pages it reads, and Amazon can change its pages or challenge a request; blocked searches are reported as failed instead of returning made-up rows.
- Amazon varies results between requests, so two runs of the same search can differ slightly.

### Organic rank versus ads (RANK_REPORT)

Every run saves a `RANK_REPORT` record in the key-value store. For each keyword or link it lists how many unique products were ads and how many organic, the ad share of the first page, the top 10 organic products and the first ad positions. It is built from every card the run read, before filters and caps.

### What's new

- 2026-11-09: price, rating and Prime filters, an overall result cap, the RANK_REPORT, a clear failed result when Amazon returns no results page at all, and a fix for non-US stores such as the UK (the proxy now exits in the store's own country).

### Design note

I found that the dataset contract includes both `searchQuery` and `searchUrl`, which makes each row easy to trace back to either a keyword seed or a direct Amazon page.

### FAQ

#### When should I use `searchQueries` instead of `startUrls`?

Use `searchQueries` when you want keyword-based Amazon discovery. Use `startUrls` when you already have a search or category page and want rows from that exact page.

#### How does this Actor support rank tracking?

It returns `page`, `positionOnPage`, `organicRank`, and `globalPosition`, which together describe where each result appears in the Amazon search flow.

#### Does it deduplicate similar product titles or capture hidden variants?

No title-based deduplication is applied. Amazon ASIN identifies the search row, so two links with the same ASIN are one listing even when the visible title mentions different options. Distinct variation ASINs shown as separate Amazon search cards are returned; variations hidden behind a product detail page require a separate variation-enrichment step.

#### How do the price, rating and Prime filters work?

Each result card is checked against your price and rating filters before it is saved or charged, using the price and stars shown on the card in the store's own currency. Products with no listed price or rating are skipped when that filter is on. `primeOnly` asks Amazon itself for Prime-eligible products on the US store and marks those rows `isPrime: true`. If nothing matches, the run ends as a valid empty result with no fees.

#### Can I work across multiple Amazon marketplaces?

Yes. The input schema includes 18 marketplace options, and a start URL can also determine the marketplace from its domain.

#### What comes next after discovery?

Use A common next step is to send selected product URLs into Amazon Product Details Scraper when you want deeper product-page enrichment for the listings you selected from search results.

#### Can I connect discovery to list analysis or seller contact workflows?

Use Yes. If you want public list-level analysis after discovery, Amazon Bestsellers Scraper fits a workflow built around selected Amazon records. If you want public contact discovery tied to relevant sellers, Amazon Seller Email Scraper - Public Contact Finder is a natural next step after you identify listings.

### Responsible use

Use this Actor in line with applicable laws, Amazon site terms, and your internal data-handling policies. It is designed for publicly visible search result pages and for structured discovery workflows in Apify API and Apify MCP.

# Changelog

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

# Actor input Schema

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

Optional Amazon keywords to search, one per line. Use natural language product keywords such as 'wireless earbuds', 'standing desk', or 'vitamin c serum'. Leave empty when using Single search query or Amazon search/category URLs.

## `searchQuery` (type: `string`):

Optional single keyword for MCP and API callers. If both this and Search queries are set, the actor deduplicates them.

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

Direct Amazon search result or category URLs. The URL domain overrides the selected marketplace. Product detail URLs are not supported by this search-focused actor.

## `country` (type: `string`):

Marketplace used for keyword searches. Ignored when a start URL contains an Amazon marketplace domain.

## `maxResultsPerQuery` (type: `integer`):

Maximum product rows returned for each keyword or start URL across all paginated pages, not per page. Each returned row is billed as one search-result-scraped event.

## `maxSearchPages` (type: `integer`):

Maximum Amazon result pages to visit per keyword or start URL. This is separate from the total row cap; use 7 pages when requesting up to 100 rows, and increase it for larger requests when Amazon exposes more pages.

## `sortBy` (type: `string`):

Amazon sorting applied to keyword searches. Start URLs keep their own URL parameters.

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

When enabled, sponsored products are included and marked with isSponsored=true. Disable this for organic-only rank tracking.

## `minPrice` (type: `number`):

Only return products listed at or above this price, in the store's own currency (for example dollars on the US store). Products with no listed price are skipped when a price filter is on. You are only charged for rows that are returned. Leave empty for no minimum.

## `maxPrice` (type: `number`):

Only return products listed at or below this price, in the store's own currency. Products with no listed price are skipped when a price filter is on. You are only charged for rows that are returned. Leave empty for no maximum.

## `minRating` (type: `number`):

Only return products rated at least this many stars, from 0 to 5 (for example 4 for '4 stars and up'). Products with no rating are skipped when this is set. Leave empty or 0 for no rating filter.

## `primeOnly` (type: `boolean`):

When on, only products Amazon marks as Prime-eligible are returned. Amazon does the filtering, so it works on the US store; on other stores the run stops with a clear message (paste a search link that already has Amazon's Prime filter applied instead). Default is off (all products).

## `maxResults` (type: `integer`):

Optional overall cap on rows returned across all keywords and links, as a cost ceiling. 'Max results per query' still limits each keyword. Leave empty for no overall cap. Filters (price, rating, Prime) look only at the pages the Actor reads (see 'Max search pages'), so a tight filter can return fewer rows; raise 'Max search pages' to look deeper.

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

Amazon blocks datacenter IPs. Residential proxies are the default and strongly recommended.

## Actor input object example

```json
{
  "searchQueries": [],
  "searchQuery": "wireless earbuds",
  "startUrls": [],
  "country": "US",
  "maxResultsPerQuery": 25,
  "maxSearchPages": 7,
  "sortBy": "relevance",
  "includeSponsored": true,
  "minPrice": 10,
  "maxPrice": 50,
  "minRating": 4,
  "primeOnly": false,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

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

No description

## `runSummary` (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 = {
    "country": "US",
    "maxResultsPerQuery": 25,
    "maxSearchPages": 7,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/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 = {
    "country": "US",
    "maxResultsPerQuery": 25,
    "maxSearchPages": 7,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/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 '{
  "country": "US",
  "maxResultsPerQuery": 25,
  "maxSearchPages": 7,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call khadinakbar/amazon-search-scraper --silent --output-dataset

```

## MCP server setup

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