Cardmarket product search with price guide
Search every product of one game on Cardmarket (singles and sealed: boosters, displays, sets, decks, accessories) by name, with Cardmarket's price guide for each: trend price, lowest price, average sell price and 1-, 7- and 30-day averages, for normal and foil copies (EUR). Filter by expansion, category, card (metacard), singles or sealed, price range and date added; sort by relevance, name, trend price, date added or id. Prices are Cardmarket's daily price guide (price_guide_created_at). Page with page and limit; next_page is null on the last page.
Every response includes credits_used: the credits this call cost.
Part of the Cardmarket API: 11 endpoints with prices, use cases and example responses.
Parameters
| name | type | description |
|---|---|---|
q | string | Words of the product name (all must match; accents ignored). Optional when expansion, category, metacard or added_after is given. Example: black lotus |
game | string | Game key (default magic): magic, pokemon, yugioh, one-piece, lorcana, flesh-and-blood, digimon, dragon-ball-super, star-wars-unlimited, riftbound, gundam, sorcery and the other games in /cardmarket/v1/games (aliases: mtg, ygo, fab). Example: magic |
type | all | singles | sealed | all (default), singles or sealed. |
expansion | string | Expansion id(s), comma-separated (see /cardmarket/v1/expansions). |
category | string | Category id(s), comma-separated (see /cardmarket/v1/categories). |
metacard | string | Card id(s): every printing of the same card shares one (metacard_id). |
exact | boolean | true: the whole name must match. |
priced_only | boolean | true: only products with a trend price. |
price_min | number | Lowest trend price (EUR). |
price_max | number | Highest trend price (EUR). |
added_after | string | Only products added on or after this date (yyyy-mm-dd). |
sort | relevance | name | name_desc | price_asc | price_desc | newest | oldest | id_asc | id_desc | relevance (default), name, name_desc, price_asc, price_desc (trend price), newest, oldest, id_asc, id_desc. |
limit | integer | Results per page (1-100, default 50). |
page | integer | Page number (default 1). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/cardmarket/v1/search?q=black+lotus&game=magic" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/cardmarket/v1/search",
params={"q": "black lotus", "game": "magic"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/cardmarket/v1/search");
url.searchParams.set("q", "black lotus");
url.searchParams.set("game", "magic");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).