Search TCGplayer's trading-card marketplace (Pokémon, Magic: The Gathering, Yu-Gi-Oh!, One Piece, Lorcana, sports cards and 70+ other games): cards and sealed products with market, median and lowest prices, listing and seller counts, set, rarity, number and image, plus the cheapest current listings of each product and facet counts for every filter. Filters take the site's URL names (see facets in any response). Page with page; next_page is null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
name
type
description
q
string
Search words (empty: everything matching the filters). Example: charizard
game
string
Game / product line URL name, one or more comma-separated (see /tcgplayer/v1/games), e.g. pokemon, magic, yugioh, one-piece-card-game. Example: pokemon
set
string
Set URL name(s), e.g. base-set, sv-scarlet-and-violet-151 (facets.setName).
product_type
string
Product type(s), e.g. cards, sealed-products (facets.productTypeName).
rarity
string
Rarity name(s), e.g. holo-rare, secret-rare (facets.rarityName).
card_type
string
Card type(s) (facets.cardType).
energy_type
string
Energy type(s) for Pokémon (facets.energyType).
condition
string
Only products with a listing in this condition: near_mint, lightly_played, moderately_played, heavily_played, damaged, unopened (comma-separated).
printing
string
Only products with a listing in this printing, e.g. normal, holofoil, reverse_holofoil, 1st_edition, foil.
language
string
Only products with a listing in this language, e.g. english, japanese.
seller_country
string
Only products listed by sellers in these countries (two-letter codes).
import os, requests
res = requests.get(
"https://api.api.sh/tcgplayer/v1/search",
params={"q": "charizard"},
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/tcgplayer/v1/search");
url.searchParams.set("q", "charizard");
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).
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.