# Cardmarket Scraper - Price Guide, Seller Offers & Top Cards (`scrapersdelight/cardmarket-scraper`) Actor

Scrape Cardmarket for 23 trading card games: the daily price guide (trend, low, 1/7/30-day averages, foil) for every card and sealed product, live seller offers with condition, language, price, quantity, seller type and country, seller shops, and the Best Sellers / Best Bargains lists.

- **URL**: https://apify.com/scrapersdelight/cardmarket-scraper.md
- **Developed by:** [Scrapers Delight](https://apify.com/scrapersdelight) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 products

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 does Cardmarket Scraper do?

**Cardmarket Scraper** exports Europe's largest trading-card marketplace, cardmarket.com, for 23 games: Pokémon, Magic: The Gathering, Yu-Gi-Oh!, One Piece, Lorcana, Digimon, Flesh and Blood, Star Wars Unlimited, Dragon Ball Super, Riftbound, Gundam, Sorcery and more. One run gives you one of three things: the daily **price guide** for every card and sealed product of a game, the **live seller offers** of chosen products or seller shops, or the **Best Sellers and Best Bargains** lists.

- 📈 **Price guide in seconds** — trend price, lowest offer, average sell price, 1/7/30-day averages and the foil (Pokémon: reverse holo) set of the same, for up to 128,000 products per game, read from Cardmarket's own daily price files.
- 🛒 **Seller offers** — seller, seller type (private / professional / powerseller), country, sales count, condition, language, foil / reverse holo / signed / altered / first edition, price, quantity, seller comment and the seller's photo of the copy.
- 🔎 **Find products by name** — type "charizard" or "black lotus": the actor finds the products on Cardmarket's catalogue and opens their pages, no search page needed.
- 🏪 **Seller shops** — walk a seller's Singles inventory, with Cardmarket's own name search and sort.
- 🏆 **Top cards** — Cardmarket's Best Sellers (Weekly Top Cards) and Best Bargains lists, joined to the full price guide.
- 🔁 **Monitoring** — deliver only cards whose price moved since your last run, or only new offers.
- 🔐 **No login, no API key, no cookies.**

### What data can you get from Cardmarket?

| Product price rows | Seller offer rows | Product page and list rows |
|---|---|---|
| 🆔 `productId`, `name` | 🧾 `offerId`, `position` | 💎 `rarity`, `collectorNumber` |
| 🗂️ `categoryName`, `productType` | 👤 `sellerUsername`, `sellerUrl` | 📦 `availableItems` |
| 📚 `expansionName`, `expansionId` | 🏷️ `sellerType`, `sellerSales` | 💶 `fromPrice`, `fromCurrency` |
| 📈 `priceTrendEur`, `priceLowEur` | 🌍 `sellerCountry` | 📉 `priceHistory` (30-point chart) |
| 💰 `priceAvgEur`, `avg1DayEur` | ⭐ `condition`, `language` | 🔁 `versionsCount` |
| 📆 `avg7DayEur`, `avg30DayEur` | ✨ `isFoil`, `isReverseHolo` | 📜 `rulesText` |
| ✨ `foilTrendEur`, `foilLowEur`, … | ✍️ `isSigned`, `isAltered`, `isFirstEd` | 🖼️ `imageUrl` |
| 🚀 `momentum7Pct`, `trendVsAvg30Pct` | 💶 `price`, `priceEur`, `priceUsd` | 🏆 `list`, `rank` |
| 🔻 `trendVsLowPct`, `foilPremiumPct` | 📦 `quantity`, `sellerComment` | 🔗 `productUrl` |
| 🔄 `changeStatus`, `trendChangePct` | 🏷️ `discountVsTrendPct`, `scanImageUrl` | 📅 `priceGuideDate` |

### How to scrape Cardmarket with Cardmarket Scraper

1. Create a free Apify account (it comes with free monthly credit) and open **Cardmarket Scraper**.
2. Pick the **Mode**: Price guide, Seller offers or Top cards.
3. Pick the **Game** and type card names, or paste product / seller URLs.
4. Set filters (condition, language, seller country, foil …) and **Max results**.
5. Click **Start**. Price-guide runs finish in seconds; each Cardmarket page in the other modes takes 30-75 seconds.
6. Download the dataset as JSON, CSV or Excel, or read it through the API.

### ⬇️ Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `products` | `products` (price guide), `offers` (seller offers), `topCards` |
| `game` | string | `pokemon` | One of 23 games, e.g. `magic`, `yugioh`, `onepiece`, `lorcana` |
| `searchQueries` | array | – | Card or product names; every word must appear (case and accents ignored) |
| `productUrls` | array | – | Offers: product pages or seller pages (`/Users/<name>/Offers/Singles`) |
| `productIds` | array | – | Cardmarket product ids (`productId` in every row) |
| `sellerUsernames` | array | – | Offers: seller shops to walk (20 offers per page) |
| `topCardsLists` | array | `["bestSellers"]` | `bestSellers`, `bestBargains` |
| `productType` | string | `singles` | `singles`, `sealed`, `all` |
| `expansions` | array | – | Set names as Cardmarket shows them, or `expansionId`s |
| `languages` | array | – | Offers: English, French, German, Spanish, Italian, S-Chinese, Japanese, Portuguese, Russian, Korean, T-Chinese, Indonesian, Thai |
| `minCondition` | string | `any` | Offers: `MT` `NM` `EX` `GD` `LP` `PL` `PO` (this or better) |
| `sellerCountries` | array | – | Offers: ISO codes or names, e.g. `DE`, `FR` |
| `sellerType` | string | `any` | `private`, `professional`, `powerseller`, `commercial` |
| `foil` | string | `any` | `foil`, `nonFoil` |
| `isReverseHolo` / `isSigned` / `isAltered` / `isFirstEd` | boolean | `false` | Offers: only copies with that flag |
| `minQuantity` | integer | `0` | Offers: at least this many copies (4 = playsets) |
| `shopQuery` / `shopSort` | string | – / `best_match` | Seller shops: name search and order |
| `priceMinEur` / `priceMaxEur` | number | – | Keep products with a trend price in this band |
| `onlyPriced` | boolean | `true` | Skip products with no trend price |
| `minPrice` / `maxPrice` | number | – | Offers: price band in EUR |
| `sortBy` | string | `trendDesc` | `trendDesc`, `trendAsc`, `momentum`, `momentumDown`, `name`, `newest` |
| `includeProductRows` | boolean | `true` | Offers: one product row per page read |
| `maxOffersPerProduct` | integer | `50` | Offers per product (above 50: more pages, see below) |
| `includePriceGuide` | boolean | `true` | Top cards: add the price guide to each card |
| `trackChanges` / `onlyChanged` | boolean | `false` | Price guide: change status vs your last run / only changed products |
| `monitorMode` | boolean | `false` | Offers: only offers not delivered before |
| `maxResults` | integer | `100` | Most rows (0 = no cap) |
| `maxProducts` | integer | `3` | Offers: products each name opens |
| `skipItems` | integer | `0` | Price guide: skip the first N sorted rows |
| `maxShopPages` | integer | `5` | Seller shops: pages per seller |

#### Input JSON

```json
{
    "mode": "offers",
    "game": "pokemon",
    "searchQueries": ["charizard ex"],
    "maxProducts": 2,
    "languages": ["English"],
    "minCondition": "NM",
    "sellerCountries": ["DE", "NL", "FR"],
    "maxResults": 100
}
```

#### Start with the price guide

Price-guide mode reads Cardmarket's own daily price files (updated around 02:50 CET), so a whole game comes back in seconds and costs the least. Use offers mode when you need who sells a card, at what condition and price, right now.

#### Offers: what one page holds

Cardmarket shows the 50 cheapest offers that match your filters on a product page. Your filters are sent to Cardmarket with the page and checked again on every row (Cardmarket ignores a filter value it has no offers for, for example English on a Japanese-only card). Ask for more than 50 with `maxOffersPerProduct` and the actor reads further pages split by language, then seller type, then country; `offersComplete` on the product row tells you whether every matching offer was read.

#### Names find products, best first

In offers mode each name opens `maxProducts` products, picked by `sortBy` (by default the highest trend price). For one exact printing, paste its product URL or `productId` instead.

### ⬆️ Output

A price-guide row (Pokémon, "charizard", run 2026-10-14):

```json
{
  "recordType": "product",
  "productId": 277305,
  "name": "Charizard Gold Star δ Delta Species [Rotating Claws | Dark Swirl]",
  "game": "Pokémon",
  "categoryName": "Pokémon Single",
  "expansionName": "EX Dragon Frontiers",
  "priceLowEur": 900,
  "priceAvgEur": 5588,
  "priceTrendEur": 5535.92,
  "avg7DayEur": 4841.43,
  "avg30DayEur": 3698.74,
  "variantType": "holo",
  "foilTrendEur": 563.53,
  "momentum7Pct": 14.3,
  "trendVsAvg30Pct": 49.7,
  "priceGuideDate": "2026-10-14",
  "productUrl": "https://www.cardmarket.com/en/Pokemon/Products?idProduct=277305"
}
```

A seller offer (Charizard ex, 151, run 2026-10-14):

```json
{
  "recordType": "offer",
  "offerId": "2173353125",
  "productName": "Charizard ex",
  "expansionName": "151",
  "rarity": "Ultra Rare",
  "collectorNumber": "183",
  "condition": "EX",
  "language": "English",
  "isFoil": false,
  "price": 30,
  "currency": "EUR",
  "priceUsd": 33.56,
  "quantity": 1,
  "sellerUsername": "Bleumpie",
  "sellerType": "private",
  "sellerCountry": "Netherlands",
  "sellerComment": "Ask for pictures",
  "position": 4,
  "productTrendEur": 37.38,
  "discountVsTrendPct": 19.7
}
```

A top-card row (One Piece Best Sellers, run 2026-10-14):

```json
{
  "recordType": "topCard",
  "list": "bestSellers",
  "rank": 1,
  "productId": 904168,
  "name": "Don!! (World United Luffy)",
  "expansionName": "Promos: The World’s Strongest Warriors",
  "price": 4.49,
  "priceTrendEur": 9.82,
  "avg30DayEur": 8.95,
  "momentum7Pct": -8.8
}
```

#### Fields and how often they are filled

Measured on runs of 2026-10-14 (price guide: Pokémon top 100 and Magic top 100; offers: 130 offers from 3 products; shop: 40 offers; top cards: 100 One Piece rows).

| Field | Filled |
|---|---|
| `productId`, `name`, `categoryName`, `expansionId`, `priceTrendEur`, `priceGuideDate`, `productUrl` (price guide) | 100% |
| `expansionName` (price guide) | 100% of singles (sets newer than the build are read live; sealed-only sets can be null) |
| `priceLowEur` / `priceAvgEur` (price guide) | 93% / 83-98% |
| `foilTrendEur` and the foil set | Pokémon 31%, Magic top 100 1% (only cards that have a foil or reverse-holo price) |
| `listedSince` | Pokémon 75%, Magic 8% (Cardmarket gives no date for products older than its catalogue dates) |
| Offer `condition`, `language`, `price`, `quantity`, seller name / type / country / sales, `rarity`, `productTrendEur` | 100% |
| Offer `sellerComment` / `scanImageUrl` | 56% / 17% |
| Shop offers: seller type and sales | not shown on shop pages (null) |
| Top cards `productId` and price-guide fields | 97% |

### Use cases

- 🃏 **Card shops and repricers** — pull the trend, low and 30-day average of every card you stock each morning.
- 📊 **Market trackers** — follow `momentum7Pct` and `changeStatus` to see which cards and booster boxes move.
- 💸 **Deal hunters** — sort offers by `discountVsTrendPct` with condition and language filters.
- 🌍 **Cross-border buyers** — compare offers by seller country and price in EUR and USD.
- 📦 **Sealed investors** — track booster boxes, displays and elite trainer boxes with `productType: "sealed"`.
- 🏪 **Competitor watch** — walk a rival seller's shop with `sellerUsernames` and `monitorMode`.

### How much does it cost to scrape Cardmarket?

Cardmarket Scraper charges per row delivered, with no start fee:

| Row | Price | 100 rows | 1,000 rows |
|---|---|---|---|
| Product (price guide, product page) | $0.0008 | $0.08 | $0.80 |
| Seller offer | $0.0045 | $0.45 | $4.50 |
| Top card | $0.0009 | $0.09 | $0.90 |

Rows removed by your filters, duplicates and pages that could not be read are never charged. Your **Maximum cost per run** setting is respected row by row.

### Integrations, API, scheduling & MCP

Schedule the actor daily (price guide with `onlyChanged`, offers with `monitorMode`) and send results to Google Sheets, Slack, Make, Zapier or n8n through Apify integrations, or a webhook when a run ends. Call it from code with the Apify API and the `apify-client` package for [Python](https://docs.apify.com/api/client/python) or [JavaScript](https://docs.apify.com/api/client/js), or let an AI agent run it through the Apify MCP server.

### More collectibles scrapers

- [HipComic Scraper](https://apify.com/scrapersdelight/hipcomic-scraper) — comic book listings and prices.
- [HipPostcard Scraper](https://apify.com/scrapersdelight/hippostcard-scraper) — postcard listings, prices and sellers.
- [PCGS Population Scraper](https://apify.com/scrapersdelight/pcgs-pop-scraper) — coin population reports.
- [LiveAuctioneers Scraper](https://apify.com/scrapersdelight/liveauctioneers-scraper) — collectibles auction lots.
- See every actor on the [ScrapersDelight profile](https://apify.com/scrapersdelight).

### Limits & empty runs

- 23 games: the ones Cardmarket publishes a product list for.
- A product page shows up to 50 offers per filter set; more need one page per split (language, seller type, country).
- Cardmarket's pages are read through Apify's Unblocker: 30-75 seconds per page, 6 pages at a time. A page that fails three times is listed in `RUN_SUMMARY` and charged nothing.
- Seller shops show 20 offers per page.
- An empty run (no name match, filters that match nothing) ends successfully with nothing charged; `RUN_SUMMARY` says why.
- Prices on Cardmarket are in EUR; an offer listed in another currency keeps it in `currency` and is converted in `priceEur`.

### FAQ

#### How much does Cardmarket Scraper cost?

$0.0008 per product row, $0.0045 per seller offer and $0.0009 per top-card row, with no start fee. A 100-card price guide costs $0.08.

#### How many cards can Cardmarket Scraper return?

A whole game in one price-guide run: 123,077 Magic singles, 87,390 Yu-Gi-Oh! singles, 74,694 Pokémon singles in the 2026-10-13 files, plus sealed products. Set `maxResults` to 0 for no cap.

#### How fast is Cardmarket Scraper?

A price-guide run reads 18-48 MB of Cardmarket's own files; in our tests (20 to 1,000 rows) the whole run took 2-6 seconds. Offers take 30-75 seconds per Cardmarket page, 6 pages at a time; 100 offers from 9 pages took 91 seconds, one seller-shop page about 30 seconds.

#### Can I track Cardmarket prices daily with Cardmarket Scraper?

Yes. Schedule it with `trackChanges` (every row says NEW, PRICE_UP, PRICE_DOWN or UNCHANGED) or `onlyChanged` (only moved cards are delivered and charged).

#### Can Cardmarket Scraper alert me to new offers?

Yes. `monitorMode` delivers only offers no earlier run with the same filters delivered.

#### Does Cardmarket Scraper need a Cardmarket login or API key?

No. It needs no login, no cookies and no Cardmarket API key.

#### Can I use Cardmarket Scraper through the Apify API or MCP?

Yes. Start runs and read datasets with the Apify API or `apify-client`, or connect an AI agent through the Apify MCP server.

#### Which games does Cardmarket Scraper support?

Pokémon, Magic: The Gathering, Yu-Gi-Oh!, One Piece, Lorcana, Digimon, Flesh and Blood, Star Wars Unlimited, Dragon Ball Super, Riftbound, Gundam, Sorcery: Contested Realm, Cyberpunk, Battle Spirits Saga, Final Fantasy TCG, Force of Will, Cardfight!! Vanguard, Weiß Schwarz, Star Wars: Destiny, World of Warcraft TCG, My Little Pony CCG, Dragoborne and The Spoils.

#### Why did my Cardmarket Scraper run return no results?

No product name matched every word you typed, or your filters matched no offer. Open `RUN_SUMMARY` in the run's storage: it lists what each filter removed and any page that could not be read. Nothing is charged for an empty run.

#### Your feedback

Found a bug or want a field added? Open an issue on the actor's **Issues** tab and we will look at it.

# Actor input Schema

## `mode` (type: `string`):

Price guide = Cardmarket's daily prices for every product of a game (fast). Offers = live seller offers from product pages or seller shops. Top cards = Best Sellers / Best Bargains lists.

## `game` (type: `string`):

The trading card game. Product URLs and seller URLs carry their own game; this one is used for keywords, product ids, seller names and lists.

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

Name filters (every word must appear, case and accents ignored), e.g. "charizard", "black lotus", "booster box". Empty = the whole game in price-guide mode. In offers mode each name opens its top products (see Products per name).

## `productUrls` (type: `array`):

Offers mode: Cardmarket product pages (filters in the URL are kept), e.g. https://www.cardmarket.com/en/Magic/Products/Singles/Alpha/Lightning-Bolt, or seller pages (/Users/<name>/Offers/Singles).

## `productIds` (type: `array`):

Cardmarket product ids (productId in every row), e.g. 5395. Price-guide mode returns exactly these; offers mode opens their pages.

## `sellerUsernames` (type: `array`):

Offers mode: seller usernames whose shop (Singles) to walk for the chosen game, e.g. "CardGameCorner". 20 offers per page.

## `topCardsLists` (type: `array`):

Top-cards mode: which of Cardmarket's lists to read for the game (about 100 cards each).

## `productType` (type: `string`):

Single cards, sealed products (booster boxes, boosters, decks, tins, sets) or both.

## `expansions` (type: `array`):

Keep only these sets, by name as Cardmarket shows it or by expansionId, e.g. "151", "Alpha", 5320. Empty = all sets.

## `languages` (type: `array`):

Offers: only these print languages, e.g. "English", "Japanese". Values: English, French, German, Spanish, Italian, S-Chinese, Japanese, Portuguese, Russian, Korean, T-Chinese, Indonesian, Thai.

## `minCondition` (type: `string`):

Offers: this grade or better (sealed products have no grade and are not affected).

## `sellerCountries` (type: `array`):

Offers: only items located in these countries, ISO code or name, e.g. "DE", "FR", "United Kingdom". Empty = all 35 Cardmarket countries.

## `sellerType` (type: `string`):

Offers: private, professional, powerseller, or commercial (professional + powerseller).

## `foil` (type: `string`):

Offers: foil only or non-foil only (games with a foil filter, e.g. Magic).

## `isReverseHolo` (type: `boolean`):

Offers: only reverse-holo copies (Pokémon).

## `isSigned` (type: `boolean`):

Offers: only signed copies.

## `isAltered` (type: `boolean`):

Offers: only altered-art copies.

## `isFirstEd` (type: `boolean`):

Offers: only first-edition copies (Yu-Gi-Oh!).

## `minQuantity` (type: `integer`):

Offers: only listings with at least this many copies, e.g. 4 for a playset. 0 = any.

## `shopQuery` (type: `string`):

Seller shops: only cards whose name contains this text (Cardmarket's own shop search), e.g. "bolt". Empty = the whole shop.

## `shopSort` (type: `string`):

Seller shops: order of the shop pages.

## `priceMinEur` (type: `number`):

Price guide / keyword products: keep products whose trend price is at least this, e.g. 5. Empty = no lower bound.

## `priceMaxEur` (type: `number`):

Price guide / keyword products: keep products whose trend price is at most this, e.g. 500. Empty = no upper bound.

## `onlyPriced` (type: `boolean`):

Skip products with no trend price (regular or foil) in today's price guide.

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

Offers: drop listings cheaper than this, e.g. 1.

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

Offers: drop listings dearer than this, e.g. 50.

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

Order of price-guide rows, and which products a name opens first in offers mode.

## `includeProductRows` (type: `boolean`):

Offers mode: also deliver one product row per page read (rarity, number, available items, from price, trend, 1/7/30-day averages, image, price history), billed as a product row.

## `maxOffersPerProduct` (type: `integer`):

Offers mode: Cardmarket shows the 50 cheapest offers per page; above 50 the actor reads more pages split by language, seller type and country (one page each).

## `includePriceGuide` (type: `boolean`):

Top-cards mode: add each card's trend, low, average and foil prices from Cardmarket's daily price guide.

## `trackChanges` (type: `boolean`):

Price guide: add changeStatus (NEW, PRICE_UP, PRICE_DOWN, UNCHANGED), the previous trend price and the % change since your last delivered run.

## `onlyChanged` (type: `boolean`):

Price guide: deliver (and bill) only products that are new or whose trend price moved since your last run. Turns on change tracking.

## `changeStoreName` (type: `string`):

Named key-value store that keeps the last delivered trend per product. Use a different name per watch list.

## `monitorMode` (type: `boolean`):

Offers: deliver only offers not delivered by an earlier run with the same filters (first run = full baseline).

## `monitorStoreName` (type: `string`):

Named key-value store for the offer ids already delivered.

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

Most rows to deliver: products (price guide), offers (offers mode) or top cards. 0 = no cap (a whole game is 1,000-125,000 products).

## `maxProducts` (type: `integer`):

Offers mode: how many products each card name opens, best first by the chosen sort (one page each).

## `skipItems` (type: `integer`):

Price guide: skip the first N sorted rows, to page through a whole game across runs.

## `maxShopPages` (type: `integer`):

Seller shops: pages to read per seller (20 offers each).

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

Optional. Price files are read directly; Cardmarket's pages come through Apify's Unblocker. A proxy set here is tried once per run before it.

## Actor input object example

```json
{
  "mode": "products",
  "game": "pokemon",
  "searchQueries": [
    "charizard"
  ],
  "topCardsLists": [
    "bestSellers"
  ],
  "productType": "singles",
  "minCondition": "any",
  "sellerType": "any",
  "foil": "any",
  "isReverseHolo": false,
  "isSigned": false,
  "isAltered": false,
  "isFirstEd": false,
  "minQuantity": 0,
  "shopSort": "best_match",
  "onlyPriced": true,
  "sortBy": "trendDesc",
  "includeProductRows": true,
  "maxOffersPerProduct": 50,
  "includePriceGuide": true,
  "trackChanges": false,
  "onlyChanged": false,
  "changeStoreName": "cardmarket-price-history",
  "monitorMode": false,
  "monitorStoreName": "cardmarket-offers-monitor",
  "maxResults": 20,
  "maxProducts": 3,
  "skipItems": 0,
  "maxShopPages": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Product, offer and top-card rows (field "recordType").

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

Per run: rows delivered per kind, filters that removed rows, products or pages not found or unreachable, price-guide date, transport and its spend.

# 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": [
        "charizard"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapersdelight/cardmarket-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 = {
    "searchQueries": ["charizard"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapersdelight/cardmarket-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 '{
  "searchQueries": [
    "charizard"
  ],
  "maxResults": 20
}' |
apify call scrapersdelight/cardmarket-scraper --silent --output-dataset

```

## MCP server setup

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