# Marketplace Search Scanner: Amazon, eBay, Etsy (`cleanpull/marketplace-search-scanner`) Actor

For any keyword, see the market on Amazon, eBay, Etsy, Walmart, Target and Best Buy: every listing with price, seller and reviews, plus price percentiles, seller concentration, review depth and new entrants since your last run. Only your Apify account needed.

- **URL**: https://apify.com/cleanpull/marketplace-search-scanner.md
- **Developed by:** [CleanPull](https://apify.com/cleanpull) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 keyword summaries

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Marketplace Search Scanner: Amazon, eBay, Etsy, Walmart, Target & Best Buy Market Research

Give it **keywords** and get the market for each one on **Amazon, eBay, Etsy, Walmart, Target and Best Buy**: every listing with **price, seller, reviews, rating, ad flag and place**, plus a summary per marketplace with **price percentiles (min, p10, p25, median, p75, p90, max), seller concentration and review depth of the organic results, with the ads summarised apart**. Schedule it with a watchlist and every run also says **who entered the top since the last run, which sellers are new, who left, and whether the price band moved**. Amazon works in 22 countries. **Only your Apify account is needed**: no developer keys, no setup.

### What you can do with it

- **"Is this niche worth entering?"** See how many sellers share the top results, how deep their reviews go, how many listings have under 100 reviews, and where prices sit.
- **"What should I charge?"** Get the p25, median and p75 price for a keyword on each marketplace, in its own currency.
- **"Who is new in my market?"** Put your keywords in a watchlist and schedule it weekly. New entrants and new sellers in the top results come back as change rows.
- **"Did prices move?"** A change row reports when the median or a quartile moves past your threshold.
- **"Compare Amazon, eBay, Etsy, Walmart, Target and Best Buy for one product idea."** The same fields for every marketplace, one summary row each.
- **"Feed market data to an AI agent or a spreadsheet."** Compact JSON, a field picker, and a dataset view per row type.

### How it reads each marketplace

| Marketplace  | How                                                                                                                          | Seller                                                         | Reviews                                    | Ads                                  |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------ | ------------------------------------ |
| **Amazon**   | The public search page, read as shoppers in that country see it (the same reader as CleanPull's Amazon Keyword Rank Tracker) | The brand, read from the title (Amazon search shows no seller) | The product's rating and review count      | Sponsored results, marked and placed |
| **eBay**     | ebay.com search, through CleanPull's marketplace data service                                                                | The seller                                                     | The seller's feedback count and positive % | Not marked                           |
| **Etsy**     | Etsy search, through CleanPull's marketplace data service                                                                    | The shop name                                                  | The shop's rating and review count         | Not marked                           |
| **Walmart**  | walmart.com search, through CleanPull's marketplace data service                                                             | The marketplace seller (or Walmart.com)                        | The product's rating and review count      | Not marked                           |
| **Target**   | target.com search, through CleanPull's marketplace data service                                                              | Target.com or the partner seller                               | The product's rating and review count      | Not marked                           |
| **Best Buy** | bestbuy.com search, through CleanPull's marketplace data service                                                             | Best Buy                                                       | The product's rating and review count      | Not marked                           |

- **The marketplace data service** is a third-party web data provider. CleanPull holds the account and its key, which never appears in your input, logs or results.
- **Each result it returns is a provider record** on your bill, up to Results per search for each keyword and marketplace.
- **It takes 1 to 5 minutes per search,** whatever the depth. A run starts every such search at once, so 10 keywords on eBay and Etsy take about as long as one.
- **Results come in the order the marketplace's search shows them,** and that order is the place (`position`). The service does not mark ads, so `sponsored` is null on these marketplaces.

### What makes the data right

- **A block is never an empty result.** Amazon pages come through a proxy ladder (direct, then datacenter, then residential). On the other marketplaces, a search the site refused is a failure, not an empty market. A search that cannot be read is listed in the run summary with the reason, never billed.
- **Ads need a real shopper's view.** In the US, Amazon shows ads only to home-network visitors, so searches with ads use residential addresses. A first page without ads is read once more at our cost.
- **New entrants are really new.**
  - A listing counts as new only if no earlier run saw it anywhere in the results read in the last 60 days, **and** it is still in the top on the next run.
  - Why: Amazon shows each visitor a slightly different result set, and reads through home-network addresses vary most. In tests, two reads a minute apart differed by 1 to 4 listings in the top.
  - A listing that just moved up from below does not count either. New entrants are counted in the top half of the results read, so the rest is a buffer.
  - Amazon's ads rotate on every visit and are never counted.
- **Gone means gone twice.** A listing counts as having left the top only after 2 runs in a row without it.
- **Price bands move only past a threshold** (10% by default):
  - in the same currency;
  - in the same direction on 2 runs in a row;
  - against a baseline that holds until a move is reported, so slow drift still adds up to one.
- **Ads are kept apart.** Ads are placed by bids, not by the market:
  - price, seller and review figures are of the organic results only;
  - the ads get their own count, price range and top advertisers (`ads`);
  - a product shown as an ad and as an organic result is two listing rows.
- **Auctions are not prices.** An eBay auction's current bid is listed, but it is left out of the price figures (`notFixedPrice` counts these). `ebayFixedPriceOnly` leaves auctions out of the listings.
- **Currencies are never mixed.** Price figures use each marketplace's main currency, and listings in other currencies are counted apart.
- **A service problem stops only its marketplaces.** If the marketplace data service is unavailable or asks us to slow down, its marketplaces stop for the run with the reason (they are read again on the next run), and Amazon goes on. Requests to it are capped and spaced, so its limits are never reached.
- **eBay sellers in a watchlist's memory.** eBay seller usernames are kept only as salted hashes in the watch's memory, which is enough to tell a new seller from one seen before; an eBay listing that left the top is reported without its seller. Watchlists made before this are converted on their next run, keeping who was seen.

### Input

| Field                                  | What it does                                                                                                           |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `keywords`                             | Search terms, one per line                                                                                             |
| `sources`                              | `amazon`, `ebay`, `etsy`, `walmart`, `target`, `bestbuy` (Amazon by default)                                           |
| `amazonMarketplaces`                   | US, GB, DE, FR, JP… (one search per keyword and marketplace)                                                           |
| `maxResults`                           | Listings per search (48 by default; up to 200)                                                                         |
| `includeAds`                           | Amazon sponsored results (on by default; residential add-on in the US)                                                 |
| `ebayFixedPriceOnly`                   | Buy-it-now listings only, no auctions                                                                                  |
| `listingRows`                          | One row per listing (on by default); off for summaries only                                                            |
| `watchlistName`, `changesOnly`         | Compare runs with the same name; return only changes                                                                   |
| `newEntrantTop`, `priceMoveMinPercent` | How deep new entrants are counted (top 24 by default, at most half the results read), and the smallest price-band move |
| `maxRunCostUsd`, `maxItems`, `fields`  | Cost cap per run (for schedules), row limit, field selection                                                           |
| `proxyConfiguration`                   | Your own proxy for Amazon (optional)                                                                                   |

#### Example inputs

A niche check on Amazon US and UK:

```json
{ "keywords": ["cork yoga mat", "yoga mat bag"], "amazonMarketplaces": ["US", "GB"] }
```

The same keyword on every marketplace:

```json
{
  "keywords": ["yoga mat"],
  "sources": ["amazon", "ebay", "etsy", "walmart", "target", "bestbuy"]
}
```

A weekly watchlist that returns only new entrants and price moves, capped at $0.50 a run:

```json
{
  "keywords": ["insulated water bottle", "kids water bottle"],
  "watchlistName": "bottles",
  "changesOnly": true,
  "maxRunCostUsd": 0.5
}
```

### Output

Three kinds of rows (`recordType`).

**`keyword-summary`**, one per keyword and marketplace:

A real row (first run of a watchlist; later runs fill `newEntrants`, `newSellers`, `droppedOut` and `priceBandMove`):

```json
{
  "recordType": "keyword-summary",
  "keyword": "insulated water bottle",
  "source": "amazon",
  "marketplace": "US",
  "listings": 48,
  "resultsText": "1-48 of over 30,000 results",
  "currency": "USD",
  "priceMin": 7.98,
  "priceP10": 14.14,
  "priceP25": 16.98,
  "priceMedian": 28,
  "priceP75": 34.99,
  "priceP90": 36.09,
  "priceMax": 63.99,
  "singleNewPrice": {
    "listings": 41,
    "currency": "USD",
    "min": 7.98,
    "p10": 13.99,
    "p25": 16.98,
    "median": 26.99,
    "p75": 32.99,
    "p90": 35.99,
    "max": 49.99,
    "excludedMultiPack": 6,
    "excludedOtherCondition": 1,
    "excludedUnknownCondition": 0,
    "basis": "Organic fixed-price listings in the main currency whose condition is new (…) and whose title states no multi-pack (packCount null or 1)."
  },
  "conditionCounts": { "new": 47, "renewed": 1, "used": 0, "open-box": 0, "unknown": 0 },
  "multiPack": 6,
  "sponsored": 12,
  "ads": {
    "count": 12,
    "alsoOrganic": 4,
    "priceMin": 13.98,
    "priceMedian": 15.99,
    "priceMax": 37.99,
    "topSellers": [{ "seller": "CIVAGO", "ads": 2 }]
  },
  "sellers": 22,
  "sellerSource": "title-brand",
  "topSellers": [{ "seller": "Owala", "listings": 8, "share": 0.1778 }],
  "top3SellerShare": 0.4,
  "sellerHhi": 0.0785,
  "reviewScope": "product",
  "averageReviews": 36470,
  "medianReviews": 12942,
  "averageRating": 4.6,
  "under100Reviews": 1,
  "firstRun": true,
  "newEntrants": null,
  "pendingEntrants": 0,
  "pagesRead": 1
}
```

Two more fields on every summary:

- `salesFloor` (Amazon; `null` for other marketplaces): the sum of the top 10 organic results' "bought in past month" badges, each at the bottom of its bucket, and that floor times their price. Real row, "yoga mat" in the US:

  ```json
  {
    "unitsPerMonthMin": 36600,
    "revenuePerMonthMin": 933914,
    "listingsCounted": 10,
    "listingsWithBadge": 10,
    "currency": "USD",
    "basis": "The sum of Amazon's \"bought in past month\" badges over the top 10 organic results (…). A floor, not an estimate of actual sales: (…)"
  }
  ```

  It is a floor, never an estimate of actual sales: a result without a badge counts 0, and "10K+" can be far more than 10,000.

- `marketplaceFees`: the marketplace's published list rates for selling fees, US sellers, most categories, so a margin can be read after fees: `typicalFeePercent`, `fixedFeePerOrder`, the `components` (eBay final value and per-order fee; Etsy transaction, payment processing and listing fee; Walmart and Amazon referral fee), `basis` (what is left out: ads, fulfilment, other categories), `sources` and `asOf`. Amazon's FBA fee depends on size and weight: the Amazon Product Scraper gives it per product. `null` for Target, Best Buy and Amazon outside the US.

**`listing`**, one per result:

```json
{
  "recordType": "listing",
  "keyword": "yoga mat",
  "source": "amazon",
  "marketplace": "US",
  "position": 1,
  "id": "B07H4G664R",
  "sponsored": true,
  "title": "Gruper Yoga Mat Non Slip, Eco Friendly Exercise Mat with Carrying Strap",
  "price": 27.99,
  "currency": "USD",
  "seller": "Gruper",
  "sellerSource": "title-brand",
  "rating": 4.4,
  "reviewCount": 10682,
  "reviewScope": "product",
  "condition": "new",
  "conditionBasis": "listing",
  "conditionLabel": null,
  "packCount": null,
  "newEntrant": false,
  "boughtPastMonthMin": 5000,
  "url": "https://www.amazon.com/dp/B07H4G664R"
}
```

Other fields depend on the marketplace:

- **Amazon:** `organicRank`, `sponsoredRank`, `badges`, `boughtPastMonth`.
- **eBay:** `listingFormat`, `sellerFeedbackPercent`, `quantityAvailable`, `quantitySold`, `itemLocation`, `inStock`.
- **Etsy:** `listedAt`, `itemReviews`, `discountPercent`, `starSeller`, `freeShipping`, `inStock`.
- **Walmart, Target, Best Buy:** `upc`, `inStock`; Target `promotion`, Best Buy `model`.

**Condition and pack size**, on every listing:

- `condition`: `new`, `renewed` (refurbished, reconditioned, Walmart's Restored), `used`, `open-box` or `unknown`. `unknown` is never counted as new.
- `conditionBasis` says where it came from:
  - `label`: eBay's or Walmart's condition field, whose own words are in `conditionLabel` ("Pre-owned", "Restored").
  - `title`: a condition word in the title, such as "(Renewed)", "Refurbished", "Open Box", "Pre-Owned" or "Used - Good". Titles are read in English, Spanish, German, French, Italian, Dutch, Portuguese, Polish, Swedish and Japanese, for every Amazon marketplace.
  - `listing`: an Amazon, Target or Best Buy catalog listing. These stores list items new and put any other condition in the title.
  - `none`: nothing states it. This is Etsy without a condition word, since Etsy sells handmade and vintage items.
    A label that is not new wins over the title, and a condition word in the title wins over the store's convention.
    Before version 0.3, eBay and Walmart rows carried the marketplace's own words in `condition` ("Pre-owned"). Those words are now in `conditionLabel`, and `condition` takes the same five values on every marketplace.
- `packCount`: the units the title says are sold together ("2-Pack", "Pack of 4", "Set of 3", "x2", "Twin Pack", "3er Pack", "lot de 2", "2本セット"). It is `null` when the title gives no count. Pieces of one item ("10-Piece Cookware Set") and contents ("100 Count", "64 oz") are not packs.

**Like-for-like price figures.** `priceMin`…`priceMax` stay as before, over every organic fixed-price listing. Next to them:

- `singleNewPrice` gives the same figures over single-unit, new listings only (`packCount` null or 1, `condition` new). It counts what it left out, as `excludedMultiPack`, `excludedOtherCondition` (renewed, used or open box) and `excludedUnknownCondition`, and states its rule in `basis`.
- `conditionCounts` and `multiPack` count the organic listings.

**`change`**, at most one row per kind and search:

- `new-entrants`, with the listings;
- `new-sellers`;
- `dropped-out`, confirmed on a second run;
- `price-band`, with the moves and the old and new band.

Dataset views: **Keyword summaries**, **Listings** and **Changes**. `RUN_SUMMARY` in the key-value store gives:

- the outcome: `COMPLETE`, `PARTIAL`, `NO_CHANGES`, `EMPTY` or `FAILED`;
- counts per marketplace and the charges;
- the marketplace data service's calls, records and error rows;
- every search that could not be made, with the reason.

### Pricing

| Event                                                                                       | Free and Bronze | Silver | Gold and above |
| ------------------------------------------------------------------------------------------- | --------------- | ------ | -------------- |
| Keyword summary (one per keyword and marketplace)                                           | $3.00 / 1,000   | $2.70  | $2.40          |
| Listing row                                                                                 | $0.50 / 1,000   | $0.45  | $0.40          |
| Provider record (each result from eBay, Etsy, Walmart, Target, Best Buy)                    | $3.00 / 1,000   | $2.70  | $2.40          |
| Provider search (one per marketplace and run: all the run's keywords on it, 1 to 5 minutes) | $15.00 / 1,000  | $15.00 | $15.00         |
| Amazon search page                                                                          | $2.00 / 1,000   | $1.80  | $1.60          |
| Amazon page from home-network addresses (add-on: ads in the US, every other country)        | $12.00 / 1,000  | $12.00 | $12.00         |
| Change row (new entrants, new sellers, dropped out, price band)                             | $1.00 / 1,000   | $0.90  | $0.80          |

- **Not billed:** a search that fails or is blocked, re-reads made to find ads, and results the service could not read.
- **Provider records and provider searches** are billed with the search's summary, like Amazon pages. A run of 10 keywords on eBay at 48 results is one provider search ($0.015), 480 provider records ($1.44), 10 summaries and 480 listing rows.
- **Max cost per run** counts a provider search fee for every keyword, since a keyword can be its own search.
- **Changes only:** the first run of a watchlist returns its summaries as the baseline. After that, an unchanged search delivers nothing, and only its Amazon pages or provider records are billed.
- **Max cost per run:** a search starts only when its worst case still fits, so scheduled runs stay within it.

### FAQ

**Do I need eBay or Etsy developer keys?**
No. eBay, Etsy, Walmart, Target and Best Buy come through CleanPull's marketplace data service. Inputs from version 0.1 that still carry keys run as they are; the keys are ignored.

**Why does a run with eBay or Etsy take a few minutes?**
The service reads each search fresh, which takes 1 to 5 minutes whatever the depth. All the searches of a run start together, so more keywords add little time. Amazon is read meanwhile.

**Which eBay site is searched?**
ebay.com (US) only. Prices are in the listing's currency, mostly USD.

**Why is the Amazon seller a brand?**
Amazon's search results show no seller. The brand that leads the title is the closest public signal, so the rows say `sellerSource: "title-brand"`. For buy-box sellers, use Amazon Product Scraper on the ASINs.

**Which settings make the cleanest US watchlist?**
Turn off sponsored results:

- Amazon shows US ads only to home-network visitors, and those reads come from addresses all over the US.
- Amazon shows each of them a slightly different result set. In tests, several of the top 24 differed between runs.
- With ads off, pages come from one server address. Two runs compared cleanly: no false new entrants, nothing falsely gone, no false price moves.
- Snapshots with ads are fine as they are.

**What about Home Depot and Lowe's?**
Their search pages refused the service's crawler in every test, so they are not offered.

**How good is Best Buy's keyword match?**
Looser than the others: Best Buy's own search ranks related accessories high (a "usb c cable" search led with a charging dock). Use precise keywords.

**What does a run that finds nothing look like?**
It succeeds. A search that cannot be made (no reader for that source and marketplace, input naming nothing searchable) gets one free `recordType: "unreadable"` row with the `reason`; nothing is charged. A run near its time limit stops starting searches, delivers what it read and lists the rest the same way. A run whose every search was refused still fails.

# Changelog

This Actor's version history is a separate document: https://apify.com/cleanpull/marketplace-search-scanner/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

Search terms, one per line, as shoppers type them.

## `sources` (type: `array`):

Where to search. Amazon is read from its search page. eBay, Etsy, Walmart, Target and Best Buy come through CleanPull's marketplace data service (nothing to set up): each search takes 1 to 5 minutes, and the keywords of a run are searched together.

## `amazonMarketplaces` (type: `array`):

Country codes or domains, one per line: US, GB, DE, FR, IT, ES, CA, MX, BR, JP, IN, AU, NL, SE, PL, BE, TR, AE, SA, SG, EG, IE. Empty: US. Outside the US, pages are read from that country (residential add-on).

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

Listings read per keyword and marketplace, in the order the marketplace shows them. Amazon: organic results (16 to 48 a page, up to 7 pages), plus the ads shown among them. Other marketplaces: up to this many results, each billed as a provider record.

## `includeAds` (type: `boolean`):

Also read Amazon's ads (sponsored listings). In the US, Amazon shows ads only to home-network visitors, so pages are read through residential addresses (add-on per page). Off: organic results only, cheaper.

## `ebayFixedPriceOnly` (type: `boolean`):

Leave auctions out of the listings. Either way, auctions are left out of the price figures, since a current bid is not a selling price. Auctions read are still provider records.

## `listingRows` (type: `boolean`):

Return every listing read as its own row. Off: only the keyword summaries (and changes), cheaper.

## `watchlistName` (type: `string`):

Runs with the same name compare against each other: new entrants, new sellers, listings that left the top, and price-band moves.

## `changesOnly` (type: `boolean`):

Return only change rows (and the listings of new entrants). The first run of a watchlist returns its summaries as the baseline. Amazon pages and provider records read are still billed; unchanged searches deliver nothing else. Schedule it daily or weekly.

## `newEntrantTop` (type: `integer`):

New entrants and listings that left are counted in the top this many organic results, at most half the results read. A new entrant is a listing no earlier run saw anywhere in the results read (in the last 60 days) that is still in the top on the next run: one-off appearances and listings moving up from below do not count. A listing counts as gone only after 2 runs in a row without it.

## `priceMoveMinPercent` (type: `integer`):

The median or a quartile price must move this much from the baseline, in the same direction on 2 runs in a row, to count as a price-band move. Result sets differ between reads, so small or one-off moves are noise.

## `maxRunCostUsd` (type: `number`):

Optional. A search starts only when what this run has charged, plus the most that search could cost, stays within this amount. For scheduled runs and tasks, where no spending limit may be set.

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

Optional. Stop after this many rows.

## `fields` (type: `array`):

Optional. Keep only these fields, for example \["keyword", "source", "title", "price", "seller"].

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

Optional, Amazon only. The actor picks proxies itself (in-country addresses outside the US, residential for ads in the US). The other marketplaces come through CleanPull's marketplace data service.

## Actor input object example

```json
{
  "keywords": [
    "yoga mat"
  ],
  "sources": [
    "amazon"
  ],
  "amazonMarketplaces": [
    "US"
  ],
  "maxResults": 48,
  "includeAds": true,
  "ebayFixedPriceOnly": false,
  "listingRows": true,
  "watchlistName": "default",
  "changesOnly": false,
  "newEntrantTop": 24,
  "priceMoveMinPercent": 10
}
```

# Actor output Schema

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

Listing rows, keyword summaries per marketplace, and change rows.

## `summaries` (type: `string`):

No description

## `listings` (type: `string`):

No description

## `changes` (type: `string`):

No description

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

Outcome, counts, charges and every search that could not be made, with the reason.

# 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 = {
    "keywords": [
        "yoga mat"
    ],
    "sources": [
        "amazon"
    ],
    "amazonMarketplaces": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cleanpull/marketplace-search-scanner").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 = {
    "keywords": ["yoga mat"],
    "sources": ["amazon"],
    "amazonMarketplaces": ["US"],
}

# Run the Actor and wait for it to finish
run = client.actor("cleanpull/marketplace-search-scanner").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 '{
  "keywords": [
    "yoga mat"
  ],
  "sources": [
    "amazon"
  ],
  "amazonMarketplaces": [
    "US"
  ]
}' |
apify call cleanpull/marketplace-search-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cleanpull/marketplace-search-scanner"
        }
    }
}
```

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/FYhRtsvv5wTKWunBR/builds/tdI7LdUkfpoLyPBjM/openapi.json
