Get a set
One set by code, slug or alternate id.
GET
/v1/sets/{code}Cost and plans
- Cost
- 1 credit
- Minimum plan
- Any key, the trial included.
- Key
X-Api-Keyheader (authentication). No key yet?POST /v1/accounts/freewith anIdempotency-Keyheader and your email address returns one; the same key replays for 24 hours, see the quickstart. The trial is 800 credits over 30 days, no card.- Cache-Control
public, max-age=60, s-maxage=300, stale-while-revalidate=600
id on a set object is the code, not an internal UUID. Set ids are short strings like bs and sv3 — human-readable, guessable, and the form most catalogues already store — so exposing a UUID here would make every id you already hold useless.
Path parameters
| Name | Type | Default | Description |
|---|---|---|---|
code required | string | — | Set code (bs), slug (base) or alternate id (base1). All three resolve, because whatever you have stored is one of them and you should not have to work out which. |
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
lang | string | — | Locale for the set name. If a translation is unavailable, the original name is returned. |
Headers
| Name | Type | Default | Description |
|---|---|---|---|
X-Api-Key required | string | — | Your API key. Authorization: Bearer <key> is accepted as an alias. |
If-None-Match | string | — | Send back the ETag you stored. The API returns a strong ETag on every catalogue response, and a 304 is a header exchange: no body, no database row read. |
Example request
request.tsrequest.py
curl -s "https://api.pokemontcgapi.com/v1/sets/bs" \
-H "X-Api-Key: $PTCG_API_KEY"const url = new URL("https://api.pokemontcgapi.com/v1/sets/bs");
const res = await fetch(url, {
headers: { "X-Api-Key": process.env.PTCG_API_KEY ?? "" },
});
if (!res.ok) {
const { error } = await res.json();
throw new Error(`${error.code}: ${error.message} (${error.request_id})`);
}
const { data, meta } = await res.json();import os, httpx
res = httpx.get(
"https://api.pokemontcgapi.com/v1/sets/bs",
headers={"X-Api-Key": os.environ["PTCG_API_KEY"]},
)
res.raise_for_status()
payload = res.json()Example response
200 OK
response.json
{
"id": "bs",
"code": "bs",
"slug": "base",
"legacy_id": "base1",
"name": "Base",
"series": "Base",
"region": "WEST",
"release_date": "1999-01-09",
"total": 134,
"printed_total": 102,
"ptcgo_code": "BS",
"symbol_url": null,
"logo_url": "https://img.pokemontcgapi.com/media/sets/BASE/logo-normal.webp?e=1791763200&s=7HgT2wKp0bNxYr4uEv1cLz",
"updated_at": "2026-08-26T17:47:39.900Z"
}Fields in the response
The rows are Set objects: An expansion: codes, totals, release date, print region and the artwork that identifies it. Descriptions and a full example are on the object page.
| Field | Type | Null |
|---|---|---|
id | string | no |
code | string | no |
slug | string | no |
legacy_id | string | yes |
name | string | no |
series | string | yes |
region | string | no |
release_date | date | yes |
total | integer | yes |
printed_total | integer | yes |
ptcgo_code | string | yes |
symbol_url | string | yes |
logo_url | string | yes |
updated_at | timestamp | no |
Errors
Every error body carries error.code, error.message and error.request_id. Switch on the code, never on the message.
| Status | Code | When |
|---|---|---|
| 401 | MISSING_API_KEY | No X-Api-Key header and no bearer token on a route that requires one. |
| 401 | INVALID_API_KEY | The key does not match any account. |
| 400 | INVALID_PARAMETER | A query parameter has the wrong type or an unsupported value — a non-integer limit, an unknown lang, an unknown region, a sort key that is not sortable. |
| 404 | SET_NOT_FOUND | No set with that code, slug or alternate id. |
| 429 | QUOTA_EXCEEDED | Trial credits, monthly credits or the daily cap are exhausted, and details says which: daily_cap with retry_after_s is the trial daily cap, which resets at midnight UTC; renews: true with resets_at is the monthly quota of a paid plan; renews: false is the trial allowance, which never comes back. details.next_step carries the plan, prices and owner action, or email verification when it unlocks the full trial. |
| 403 | PLAN_REQUIRED | The feature is outside the plan (movers require Growth; photo recognition has 5 calls after Free email confirmation, then requires Growth), or the account subscription is canceled or suspended. Centering requires Growth or higher; Developer is excluded. After email confirmation the trial includes 5 measure and 5 confirm calls independently; grade and standards use trial credits without separate call counters. Before email confirmation, the message starts with “Confirm your email…”. Follow details.next_step when present. |
| 403 | TRIAL_EXPIRED | The trial has ended: the account is on the trial and its 30 days from signup are over, and this route costs credits. details.trial_expired_at is the date, details.trial_days the length, and details.next_step the owner handoff. Zero-cost routes — /v1/me, /v1/me/usage, the key routes and /v1/billing/checkout — still answer. |
The full taxonomy, with what to do about each code, is on the errors page.