TCGplayer sets of a game
The sets of a TCGplayer game. Without set: every set of the game with id, name, URL name (for the set filter of /tcgplayer/v1/search), set code, release date, supplemental and active flags and link, newest first; q narrows by name or code. With set: that set's details plus its products (cards and sealed products with market, median and lowest prices, listing and seller counts, rarity, number, image and the cheapest listings) and facet counts, filtered, sorted and paged like /tcgplayer/v1/search (q, product_type, rarity, condition, printing, price_min, price_max, sort, page, limit); next_page is null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
gamerequired | string | Game URL name, name or id (see /tcgplayer/v1/games), e.g. pokemon, magic, yugioh, one-piece-card-game. Example: pokemon |
set | string | A set's URL name, id, name or code, e.g. base-set, 604, Base Set or BS; returns that set with its products. |
q | string | Without set: only sets whose name or code contains this. With set: search words within the set's products. |
sort | string | Without set: newest (default), oldest or name. With set: relevance (default), price_asc, price_desc, name_asc or name_desc. |
include_inactive | boolean | true also lists sets the site marks inactive. |
product_type | string | With set: product type(s), e.g. cards, sealed-products. |
rarity | string | With set: rarity name(s), e.g. holo-rare. |
condition | string | With set: only products with a listing in this condition, e.g. near-mint, lightly-played. |
printing | string | With set: only products with a listing in this printing, e.g. holofoil, 1st-edition-holofoil. |
price_min | number | With set: lowest market price in USD. |
price_max | number | With set: highest market price in USD. |
page | integer | With set: page number (default 1). |
limit | integer | With set: products per page (1-50, default 24). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/tcgplayer/v1/set?game=pokemon" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/tcgplayer/v1/set",
params={"game": "pokemon"},
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/set");
url.searchParams.set("game", "pokemon");
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).