# Cardmarket API scraper — Europe's largest trading-card marketplace (cardmarket.com): Magic, Pokémon, Yu-Gi-Oh!, One Piece, Lorcana, Flesh and Blood and more. Search, set listings, Cardmarket's price guide with the 30-day sell-price history, and every seller's offer with condition, card language, foil and seller country, in euro. No account, no browser.

> Search Cardmarket by card or product name for one game: product id, name, expansion, collector number, rarity, number of offers, the cheapest offer price and the image. Narrow to a category (Singles, Booster-Boxes…), only products with offers; sort by popularity, price, name, number or release date; page through results.
> ReefAPI engine `cardmarket` · 6 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/cardmarket/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /cardmarket/v1/search — 1 credit
Search Cardmarket by card or product name for one game: product id, name, expansion, collector number, rarity, number of offers, the cheapest offer price and the image. Narrow to a category (Singles, Booster-Boxes…), only products with offers; sort by popularity, price, name, number or release date; page through results.

**Parameters:**
- `query` (string, required) — Card or product name as typed in Cardmarket's search box.
- `game` (enum, optional, default "Pokemon") — The trading-card game (Cardmarket's own path name). Aliases like mtg, ygo, one-piece, fab, swu are accepted. [one of: Magic, Pokemon, YuGiOh, OnePiece, Lorcana, FleshAndBlood, Digimon, DragonBallSuper, StarWarsUnlimited, Riftbound, BattleSpiritsSaga, FinalFantasy, Vanguard, WeissSchwarz, WoW, StarWarsDestiny, Cyberpunk, Dragoborne, FoW, MyLittlePony, Spoils]
- `language` (enum, optional, default "en") — Cardmarket site language. Product names follow it (Charizard / Glurak / Dracaufeu); prices, ids and offers are the same. [one of: en, de, fr, it, es]
- `category` (string, optional) — Cardmarket category path name, e.g. Singles, Boosters, Booster-Boxes, Elite-Trainer-Boxes, Sealed-Products (game-specific). Omit for all categories.
- `search_mode` (enum, optional, default "classic") — Which of Cardmarket's two keyword searches to use. [one of: classic, new]
- `sort` (enum, optional, default "popularity") — Cardmarket's own orderings: popularity, price, name, collector number, release date. [one of: popularity, price_asc, price_desc, name_asc, name_desc, number_asc, number_desc, release_asc, release_desc]
- `only_available` (boolean, optional, default false) — Only products that currently have offers.
- `page` (integer, optional, default 1) — Result page (1-based).
- `per_page` (enum, optional, default 50) — Rows per page, one of Cardmarket's own page sizes. [one of: 30, 50, 100]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** results[]{product_id, name, name_en (English name when the site language is not English), url, category, expansion, expansion_slug, number, rarity, available_items, search_index_price_from (the 'From' figure of Cardmarket's search index; it can differ from the product page, use product/detail price_from for the live figure), currency, image}, count, total, total_is_lower_bound, page, per_page, total_pages, has_more, game, language, query, category, search_mode, search_mode_served, results_may_be_incomplete (Cardmarket's own 'some results may be missing' notice), redirected_to_product

**Example request body:**
```json
{
  "query": "charizard",
  "game": "Pokemon"
}
```

### POST /cardmarket/v1/expansion/products — 1 credit
Every product of one expansion (set) with the same rows as `search`, filterable by rarity and sortable by collector number, price or popularity.

**Parameters:**
- `expansion` (string, required) — Expansion slug from `expansions` (e.g. Base-Set, 151) or a cardmarket.com expansion / listing URL.
- `game` (enum, optional, default "Pokemon") — The trading-card game (Cardmarket's own path name). Aliases like mtg, ygo, one-piece, fab, swu are accepted. [one of: Magic, Pokemon, YuGiOh, OnePiece, Lorcana, FleshAndBlood, Digimon, DragonBallSuper, StarWarsUnlimited, Riftbound, BattleSpiritsSaga, FinalFantasy, Vanguard, WeissSchwarz, WoW, StarWarsDestiny, Cyberpunk, Dragoborne, FoW, MyLittlePony, Spoils]
- `language` (enum, optional, default "en") — Cardmarket site language. Product names follow it (Charizard / Glurak / Dracaufeu); prices, ids and offers are the same. [one of: en, de, fr, it, es]
- `category` (string, optional) — Cardmarket category path name, e.g. Singles, Boosters, Booster-Boxes, Elite-Trainer-Boxes, Sealed-Products (game-specific). Omit for all categories.
- `rarity` (string, optional) — Rarity name or Cardmarket rarity id as listed in `rarity_options` of the response.
- `sort` (enum, optional, default "popularity") — Cardmarket's own orderings: popularity, price, name, collector number, release date. [one of: popularity, price_asc, price_desc, name_asc, name_desc, number_asc, number_desc, release_asc, release_desc]
- `only_available` (boolean, optional, default false) — Only products that currently have offers.
- `page` (integer, optional, default 1) — Result page (1-based).
- `per_page` (enum, optional, default 50) — Rows per page, one of Cardmarket's own page sizes. [one of: 30, 50, 100]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** results[]{product_id, name, name_en (English name when the site language is not English), url, category, expansion, expansion_slug, number, rarity, available_items, search_index_price_from (the 'From' figure of Cardmarket's search index; it can differ from the product page, use product/detail price_from for the live figure), currency, image}, count, total, total_is_lower_bound, page, per_page, total_pages, has_more, game, language, expansion_slug, rarity_applied, rarity_options[]{id, name}

### POST /cardmarket/v1/expansions — 2 credits
Every expansion (set) Cardmarket lists for a game, newest first: name, slug, set code where published, number of cards, release date.

**Parameters:**
- `game` (enum, optional, default "Pokemon") — The trading-card game (Cardmarket's own path name). Aliases like mtg, ygo, one-piece, fab, swu are accepted. [one of: Magic, Pokemon, YuGiOh, OnePiece, Lorcana, FleshAndBlood, Digimon, DragonBallSuper, StarWarsUnlimited, Riftbound, BattleSpiritsSaga, FinalFantasy, Vanguard, WeissSchwarz, WoW, StarWarsDestiny, Cyberpunk, Dragoborne, FoW, MyLittlePony, Spoils]
- `language` (enum, optional, default "en") — Cardmarket site language. Product names follow it (Charizard / Glurak / Dracaufeu); prices, ids and offers are the same. [one of: en, de, fr, it, es]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** expansions[]{name, slug, code, url, products_url, card_count, release_date (YYYY-MM-DD), release_date_text, group}, count, game, language

### POST /cardmarket/v1/product/detail — 1 credit
One Cardmarket product by id or URL: name, expansion, number, rarity, image, number of items for sale, Cardmarket's price guide (From, Price Trend, 30/7/1-day average sell price), the daily average sell price of the last 30 days, and the first 50 offers with condition, card language, foil/signed/first-edition flags, quantity and the seller's country.

**Parameters:**
- `product_id` (string, required) — Cardmarket's numeric product id (from any search row) or a cardmarket.com product URL.
- `game` (enum, optional, default "Pokemon") — The trading-card game (Cardmarket's own path name). Aliases like mtg, ygo, one-piece, fab, swu are accepted. [one of: Magic, Pokemon, YuGiOh, OnePiece, Lorcana, FleshAndBlood, Digimon, DragonBallSuper, StarWarsUnlimited, Riftbound, BattleSpiritsSaga, FinalFantasy, Vanguard, WeissSchwarz, WoW, StarWarsDestiny, Cyberpunk, Dragoborne, FoW, MyLittlePony, Spoils]
- `language` (enum, optional, default "en") — Cardmarket site language. Product names follow it (Charizard / Glurak / Dracaufeu); prices, ids and offers are the same. [one of: en, de, fr, it, es]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** product{product_id, name, title_suffix, url, game, language, category, is_single, expansion, expansion_slug, number, rarity, species, manufacturer, versions_count, versions_url, image, available_items, currency, price_from, price_trend, avg_sell_price_30d, avg_sell_price_7d, avg_sell_price_1d, price_guide_extra[]{label, value}, price_history[]{date, avg_sell_price}, breadcrumbs[]{name, url}}, offers[]{offer_id, price, currency, price_excludes_shipping, quantity, condition (MT|NM|EX|GD|LP|PL|PO), condition_name, condition_rank, card_language{code, name}, foil, signed, first_edition, altered, comment, photo_url, seller{username, url, type (private|professional|powerseller), country_code, country, sales, available_items}}, offers_count, offers_has_more

**Example request body:**
```json
{
  "product_id": "273699",
  "game": "Pokemon"
}
```

### POST /cardmarket/v1/product/offers — 2 credits
Every offer on one product in Cardmarket's own order (roughly cheapest first), 50 per page up to Cardmarket's 300: price, quantity, condition, card language, foil/signed/first-edition/altered, seller name, type, country and sales. Filter with Cardmarket's own filters: card language, minimum condition, seller country, seller type, foil, signed, first edition, altered.

**Parameters:**
- `product_id` (string, required) — Cardmarket's numeric product id (from any search row) or a cardmarket.com product URL.
- `game` (enum, optional, default "Pokemon") — The trading-card game (Cardmarket's own path name). Aliases like mtg, ygo, one-piece, fab, swu are accepted. [one of: Magic, Pokemon, YuGiOh, OnePiece, Lorcana, FleshAndBlood, Digimon, DragonBallSuper, StarWarsUnlimited, Riftbound, BattleSpiritsSaga, FinalFantasy, Vanguard, WeissSchwarz, WoW, StarWarsDestiny, Cyberpunk, Dragoborne, FoW, MyLittlePony, Spoils]
- `language` (enum, optional, default "en") — Cardmarket site language. Product names follow it (Charizard / Glurak / Dracaufeu); prices, ids and offers are the same. [one of: en, de, fr, it, es]
- `card_language` (enum, optional) — Only offers of cards printed in this language. [one of: en, fr, de, es, it, zh-cn, ja, pt, ru, ko, zh-tw, nl]
- `min_condition` (enum, optional) — Only offers in this condition or better (Mint > Near Mint > Excellent > Good > Light Played > Played > Poor). [one of: mint, near_mint, excellent, good, light_played, played, poor]
- `seller_country` (enum, optional) — Only offers from sellers located in this country (ISO code). [one of: AT, BE, BG, CH, CY, CZ, DE, DK, EE, ES, FI, FR, GB, GR, HU, IE, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SG, SI, SK, CA, HR, JP, IS]
- `seller_type` (enum, optional) — Only offers from this seller type. [one of: private, professional, powerseller]
- `foil` (boolean, optional) — true = only foil offers, false = only non-foil (games with foil printings).
- `signed` (boolean, optional) — true/false: signed cards.
- `first_edition` (boolean, optional) — true/false: first-edition cards (Pokémon, Yu-Gi-Oh!).
- `altered` (boolean, optional) — true/false: altered cards.
- `page` (integer, optional, default 1) — Offer page, 50 offers each, in Cardmarket's order (roughly cheapest first). Cardmarket stops at 6 pages (300 offers).
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** product{product_id, name, url, game, expansion, number, rarity, available_items, price_from, price_trend, currency}, offers[]{offer_id, price, currency, price_excludes_shipping, quantity, condition (MT|NM|EX|GD|LP|PL|PO), condition_name, condition_rank, card_language{code, name}, foil, signed, first_edition, altered, comment, photo_url, seller{username, url, type (private|professional|powerseller), country_code, country, sales, available_items}}, count, page, has_more, max_pages_reached, filters_applied, available_filters

**Example request body:**
```json
{
  "product_id": "273699"
}
```

### POST /cardmarket/v1/search/suggest — 1 credit
Cardmarket's search-box suggestions for what a shopper has typed so far: product name, expansion, link and image.

**Parameters:**
- `query` (string, required) — What a shopper typed so far (3+ characters).
- `game` (enum, optional, default "Pokemon") — The trading-card game (Cardmarket's own path name). Aliases like mtg, ygo, one-piece, fab, swu are accepted. [one of: Magic, Pokemon, YuGiOh, OnePiece, Lorcana, FleshAndBlood, Digimon, DragonBallSuper, StarWarsUnlimited, Riftbound, BattleSpiritsSaga, FinalFantasy, Vanguard, WeissSchwarz, WoW, StarWarsDestiny, Cyberpunk, Dragoborne, FoW, MyLittlePony, Spoils]
- `language` (enum, optional, default "en") — Cardmarket site language. Product names follow it (Charizard / Glurak / Dracaufeu); prices, ids and offers are the same. [one of: en, de, fr, it, es]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** suggestions[]{name, text, url, category, expansion, expansion_slug, image}, count, query, game, language

**Example request body:**
```json
{
  "query": "charizard"
}
```

## More
- Try it live, no code: https://reefapi.com/playground?engine=cardmarket
- Human docs page: https://reefapi.com/docs/cardmarket
- Overview page: https://reefapi.com/cardmarket-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
