# Amazon Search Scraper (`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
- **Stats:** 110 total users, 36 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 search result scrapeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Amazon 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.

### 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 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.             |
| `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 is not guaranteed to equal the estimated number shown in Amazon's interface. A single page cannot return 700 rows.

### 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 plus Apify platform usage. 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 billed alongside event charges, 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, plus Apify platform usage from the live Pricing tab.

### 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`

> 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.

### 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.

#### 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.

# 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.

## `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,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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"
        ],
        "apifyProxyCountry": "US"
    }
};

// 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"],
        "apifyProxyCountry": "US",
    },
}

# 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"
    ],
    "apifyProxyCountry": "US"
  }
}' |
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/biUSrhw55Sb2qvNpx/openapi.json
