# alltcgapi > A REST API for trading card games. Pokémon, Yu-Gi-Oh!, One Piece, Lorcana, Digimon, Flesh and Blood, Star Wars: Unlimited and twelve more: cards, sets, sealed products and current prices through one contract, one key and one response shape. Base URL: https://api.alltcgapi.com Games: Pokémon TCG (game=pokemon), Yu-Gi-Oh! Trading Card Game (game=yugioh), One Piece Card Game (game=onepiece), Disney Lorcana (game=lorcana), Digimon Card Game (game=digimon), Dragon Ball Super Card Game Fusion World (game=dragonball-fw), Flesh and Blood (game=fab), Star Wars: Unlimited (game=swu), Weiss Schwarz (game=weissschwarz), Cardfight!! Vanguard (game=vanguard), Riftbound (game=riftbound), Gundam Card Game (game=gundam), Final Fantasy Trading Card Game (game=fftcg), Force of Will (game=fow), Dragon Ball Super Card Game Masters (game=dragonball-masters), Battle Spirits Saga (game=battlespirits), Cyberpunk TCG (game=cyberpunk), Star Wars: Destiny (game=swdestiny), Dragoborne: Rise to Supremacy (game=dragoborne) Prices: the current quotes of a card or sealed product by source (Cardmarket in EUR, TCGplayer in USD), and their history day by day. No graded prices. Full text: https://alltcgapi.com/llms-full.txt · Coverage as JSON: https://alltcgapi.com/coverage.json · OpenAPI: https://alltcgapi.com/openapi.json MCP server and SDKs: planned, not published. https://alltcgapi.com/mcp · https://alltcgapi.com/sdk ## Quickstart From a key to a page of cards in three requests. Every route lives under /v1 and returns JSON. You need one key, and the same key reads every game. ### 1. List the games The id of a game is what you pass as game= everywhere else. ``` curl "https://api.alltcgapi.com/v1/games" \ -H "X-Api-Key: $ALLTCG_KEY" ``` ``` { "data": [ { "id": "battlespirits", "name": "Battle Spirits Saga", "sets": 20, "cards": 1841, "sealed": 0 }, { "id": "cyberpunk", "name": "Cyberpunk TCG", "sets": 14, "cards": 527, "sealed": 0 }, … { "id": "pokemon", "name": "Pokémon TCG", "sets": 653, "cards": 58481, "sealed": 2098 }, … ] } ``` ### 2. Pick a set Sets come newest first. Keep the code: it is the handle for the next call. ``` curl "https://api.alltcgapi.com/v1/sets?game=onepiece&limit=3" \ -H "X-Api-Key: $ALLTCG_KEY" ``` ### 3. Read its cards Cards of a set come back in collector-number order. Follow links.next until it is null. ``` curl "https://api.alltcgapi.com/v1/sets/OP01/cards?limit=50" \ -H "X-Api-Key: $ALLTCG_KEY" ``` ### What to keep - Store the id of every card you show. Ids never change and are never reused. - Do not match cards by name: two printings can share one. - Read X-Quota-Remaining on any response to know what is left. ## Authentication One key, sent as a header, for every game. Send your key on every request to a non-public route, in either of two headers. ``` X-Api-Key: atcg_live_… Authorization: Bearer atcg_live_… ``` A key starts with atcg_live_ and is shown once, when it is issued. Only a keyed hash of it is stored, so a lost key cannot be recovered: it is replaced. ### Keys and accounts Credits and rate limits belong to the account, not to the key. Several keys on one account share one allowance, so a key per environment costs nothing extra. ### Manage keys Create, rotate and revoke keys from your account page, or with the /v1/me/keys routes. Rotating gives a key a new secret and keeps the old one working for a short grace period, so you can switch without downtime. ### Never in a browser A key in client-side code is a key anyone can copy. Call the API from your server and send your own response to the browser. ### Check a key ``` curl "https://api.alltcgapi.com/v1/me" -H "X-Api-Key: $ALLTCG_KEY" ``` /v1/me costs no credits and returns your plan, your scopes and what is left. ## Prices The current price of a card or a sealed product by source, and its history day by day. A price is a quote: one source, one variant, one language, one amount in one currency, and the day it was observed. A card usually has several. The API returns them all and does not blend them into a single number. ### Read the quotes of a card ``` curl "https://api.alltcgapi.com/v1/cards/{id}/prices" \ -H "X-Api-Key: $ALLTCG_KEY" ``` ``` { "data": [ { "source": "CARDMARKET", "variant": "LOWEST_NEAR_MINT", "language": "en", "condition": "NEAR_MINT", "printing": null, "region": "EU", "eu_only": false, "price": { "amount": 12.5, "currency": "EUR" }, "as_of": "2026-11-17" }, { "source": "TCGPLAYER", "variant": "MARKET", "language": "en", "condition": null, "printing": "NORMAL", "region": null, "eu_only": false, "price": { "amount": 14.2, "currency": "USD" }, "as_of": "2026-11-17" } ] } ``` Sealed products work the same way on /v1/sealed/{id}/prices. Both routes cost 2 credits and return every quote of the item in one response. ### Several items in one request GET /v1/prices/current takes up to 25 ids in ids=, separated by commas. Cards and sealed products can be mixed. It costs 4 credits whatever the number of ids, and accepts the same filters. ``` curl "https://api.alltcgapi.com/v1/prices/current?ids={id},{id}&source=CARDMARKET" \ -H "X-Api-Key: $ALLTCG_KEY" ``` ``` { "data": [ { "id": "01d3a5f3-…", "kind": "card", "quotes": [ … ] }, { "id": "7c0e9b1a-…", "kind": "sealed", "quotes": [ … ] } ], "meta": { "requested": 3, "found": 2 } } ``` Items come back in the order you asked for them. An id that is not in the catalogue is left out, and meta.found tells you how many were found. More than 25 ids, or an id that is not a valid id, is a 400. ### Fields Field | Meaning source | Where the number comes from: CARDMARKET or TCGPLAYER. /v1/prices/sources lists what is served. variant | What the number measures. See the table below. language | The language of the copy that was quoted. condition | The condition the quote refers to, when the source states one. Otherwise null. printing | NORMAL, HOLOFOIL and so on, when the source prices finishes apart. Otherwise null. region | The market the quote was read in, when the source is regional. Otherwise null. eu_only | true when the source counted sellers in the European Union only. Otherwise false. price.amount, price.currency | The amount and its currency, always together. Amounts are never converted. as_of | The last day, in UTC, the source published this quote. A date, not a time. ### Variants Variant | Meaning LOWEST_NEAR_MINT | The lowest asking price for a near mint copy. LOWEST | The lowest asking price, any condition. Used for sealed products. MARKET | The market price published by the source, based on recent sales. TREND | The trend price published by the source. AVG_7D · AVG_30D | The average sale price over 7 or 30 days. ### Filters - source= keeps one source. An unknown source is a 400 that lists the available ones. - language= keeps one language, such as en or ja. - variant= keeps one variant, such as MARKET. - A card with no quote returns an empty list with status 200. A card that does not exist returns 404. ### History GET /v1/cards/{id}/prices/history returns the past quotes of a card, and /v1/sealed/{id}/prices/history those of a sealed product. Each costs 5 credits. A series is one combination of source, variant, language, condition, printing, region and eu_only: the response has one point per series per day, oldest first. ``` curl "https://api.alltcgapi.com/v1/cards/{id}/prices/history?source=TCGPLAYER&variant=MARKET&from=2026-08-01&to=2026-10-31" \ -H "X-Api-Key: $ALLTCG_KEY" ``` ``` { "data": [ { "date": "2026-08-01", "source": "TCGPLAYER", "variant": "MARKET", "language": "en", "condition": null, "printing": "NORMAL", "region": null, "eu_only": false, "price": { "amount": 13.9, "currency": "USD" } }, … ], "meta": { "id": "01d3a5f3-18df-4520-ac0b-4449c077f179", "kind": "card", "from": "2026-08-01", "to": "2026-10-31", "bucket": "day", "count": 92, "truncated": false, "capped": false, "plan_window_days": null } } ``` Parameter | Meaning from, to | The first and the last day, as YYYY-MM-DD in UTC. Without them: the last 90 days. bucket | day (the default), week or month. A week starts on Monday. A week or a month is one point per series, dated on its first day, with the median of its days. source, language, variant | The same filters as the current quotes. Use them: a card with many series returns many points. - Each plan reads back a number of days: plan_window_days in the response, history_days in /v1/billing/plans. A request that starts earlier is not refused: it is cut to the window, and meta.truncated is true. meta.from is the day the response really starts. - A response holds at most 3,000 points. When there were more, meta.capped is true: narrow the dates or the filters, or ask for bucket=week. - When a source skips a few days and returns with the same price, the days in between carry that price. A day with no point is a day the source published nothing for that series. - History starts on the first day the source was read for that item, and does not expire. ### Delay and age GET /v1/prices/sources lists each source with delay_hours and max_age_days. A day can be read delay_hours after it began: with 24, once it is over in UTC. Days are loaded once each morning, so the newest day is yesterday, or the day before in the first hours of the UTC day. A quote the source has not published for more than max_age_days is no longer returned as current; it stays in the history. ### What is not here - Graded prices. - Currency conversion. A euro quote stays in euro and a dollar quote stays in dollars. - Individual listings, sellers or stock counts. - An index or an average across sources. ### Coverage Not every game has quotes from every source. GET /v1/prices/coverage is public and returns, per game and source, how many cards and sealed products have a current quote and the day of the newest one. ## Pagination Cursor-based: ask for a page, follow links.next. Lists are paged with a cursor. Send limit (default 50, maximum 250) and follow links.next from each response until it is null. ``` { "data": [ … ], "meta": { "limit": 50, "count": 50, "has_more": true }, "links": { "next": "https://api.alltcgapi.com/v1/cards?cursor=eyJr…" } } ``` ### Rules - links.next is a complete URL. Request it as it is; do not build or edit cursors. - A cursor belongs to the list that issued it. Used on a different list it returns 400 INVALID_CURSOR. - limit above 250 returns 400 LIMIT_EXCEEDED. It is never silently reduced. - A list costs 1 credit per 50 rows requested: limit=250 costs 5. ### Why not page numbers With page numbers, a card added while you are reading shifts every later page and you see one row twice or not at all. A cursor resumes after the last row you read, whatever changed in between. ## Rate limits & credits What a request costs, how fast you can go, and what the headers say. Two things are counted for an account: how fast it calls, and how many credits it spends. ### Credits Request | Cost A card, set or sealed product by id | 1 The prices of a card or a sealed product | 2 The prices of up to 25 items in one request | 4 The price history of a card or a sealed product | 5 A list of games or sets | 1 A list of cards or sealed products | 1 per 50 rows requested /v1/me and the public routes | 0 Any 4xx, 5xx or 304 | refunded The cost is charged before the request runs and given back if the response carries no data. An error never costs a credit. ### Headers on every response Header | Meaning X-Credits-Cost | What this request cost. X-Quota-Limit | Credits in your period. X-Quota-Remaining | Credits left after this request. X-Quota-Reset | When a paid period renews. Absent on the trial. RateLimit-Limit | Requests per second on your plan. RateLimit-Remaining | Requests left in the current second. Retry-After | On a 429: seconds to wait. ### Rate Each plan has a limit per second, per minute, and on requests in flight at once. Going over returns 429 with Retry-After. A refused request is not counted against you. ### The trial The trial is 800 credits in total, with at most 200 a day. When it is used up the API returns 403 TRIAL_EXPIRED. There is no Retry-After on that response, because the credits do not come back. ## Errors One error shape, a stable code, and what to do about each. Every error has the same shape. Branch on error.code, which is stable; the message is written for a person and may change. ``` { "error": { "code": "INVALID_PARAMETER", "message": "Unknown game \"one-piece\". Available: battlespirits, cyberpunk, digimon, dragoborne, dragonball-fw, dragonball-masters, fab, fftcg, fow, gundam, lorcana, onepiece, pokemon, riftbound, swdestiny, swu, vanguard, weissschwarz, yugioh.", "details": { "param": "game", "allowed": ["battlespirits", "cyberpunk", "digimon", …, "yugioh"] }, "request_id": "6e1237ead44557646331e2c99fb3c3be" } } ``` Quote request_id when you ask for help: it identifies the request in our logs. ### Codes Status | Code | Meaning 400 | INVALID_PARAMETER | An unknown parameter, a repeated one, or a value outside its vocabulary. details.param names it. 400 | LIMIT_EXCEEDED | limit is above 250. The request is refused, never truncated. 400 | INVALID_CURSOR | The cursor is malformed or was issued for a different list. 401 | MISSING_API_KEY | No key was sent. 401 | INVALID_API_KEY | The key is unknown or has been revoked. 401 | INVALID_CREDENTIALS | Sign-in with an email and password that do not match. 403 | TRIAL_EXPIRED | Trial credits are used up. They do not renew: choose a plan. 403 | IMAGE_URL_INVALID | An image URL with no signature, a wrong one, or one past its expiry. Read the object again for a fresh image_url. 403 | INSUFFICIENT_SCOPE | The key lacks the scope the route needs, such as account:write. 404 | KEY_NOT_FOUND | No key with that id on your account. 404 | CARD_NOT_FOUND · SET_NOT_FOUND · SEALED_NOT_FOUND | No object with that id. Refunded. 404 | ROUTE_NOT_FOUND | No such route. details.did_you_mean suggests the closest one. 409 | ACCOUNT_EXISTS | An account already uses that email. Sign in or recover access. 409 | IDEMPOTENCY_CONFLICT | The Idempotency-Key was already used with a different request body. 429 | RATE_LIMITED | Too many requests in the current second or minute. Wait Retry-After seconds. 429 | CONCURRENCY_LIMIT | Too many requests in flight at once. 429 | QUOTA_EXCEEDED | Not enough credits left in the period, or the daily cap is reached. 503 | METER_UNAVAILABLE | Usage metering is briefly unreachable. Retry in a few seconds. 503 | FEATURE_NOT_CONFIGURED | A part of the service, such as payments, is not switched on yet. ### Unknown parameters are errors A misspelled filter is refused, not ignored. Ignored, it would return the whole catalogue as if it were filtered, and you would find out after paying for the pages. ## API reference Every route, its parameters and what it costs. Base URL: https://api.alltcgapi.com. Every data route is a GET and returns JSON. Route | Credits | Parameters | Returns GET /v1/games | 1 | — | The games in the catalogue, with set, card and sealed counts. GET /v1/sets | 1 | game, region, limit, cursor | Sets, newest first. GET /v1/sets/{id} | 1 | — | One set by id or by code, with its names per language. GET /v1/sets/{id}/cards | 1 per 50 rows | limit, cursor | The cards of a set, in collector-number order. GET /v1/cards | 1 per 50 rows | game, set, name, number, limit, cursor | Cards across the catalogue. GET /v1/cards/{id} | 1 | — | One card, with its names per language. GET /v1/sealed | 1 per 50 rows | game, set, kind, limit, cursor | Sealed products. GET /v1/sealed/{id} | 1 | — | One sealed product. GET /v1/cards/{id}/prices | 2 | source, language, variant | The current quotes of a card. GET /v1/cards/{id}/prices/history | 5 | from, to, bucket, source, language, variant | The price history of a card: one point per series per day. GET /v1/sealed/{id}/prices | 2 | source, language, variant | The current quotes of a sealed product. GET /v1/sealed/{id}/prices/history | 5 | from, to, bucket, source, language, variant | The price history of a sealed product. GET /v1/prices/current | 4 | ids, source, language, variant | The current quotes of up to 25 cards and sealed products in one request. GET /v1/prices/sources | public | — | The price sources the API serves, with the delay of each. GET /v1/prices/coverage | public | — | Per game and source: how many items have a quote. GET /v1/me | 0 | — | Your plan, scopes and remaining credits. GET /v1/billing/plans | public | — | The price list. GET /v1/reference | public | — | The closed vocabularies in one call. GET /v1/status | public | — | When the catalogue and the prices were last refreshed. GET /v1/health | public | — | Process and database health. ### Account and billing These routes take and return JSON and cost no credits. The ones that change the account need the account:write scope, which the key issued at signup has. The account page on this site uses the same routes. Route | Credits | Body | Returns POST /v1/accounts/register | public | email, password, label | An account with its first key. The key is shown once, in this response. POST /v1/accounts/free | public | email | A trial key for an email address, without a password. POST /v1/accounts/verify | public | token | Confirms the email address with the token from the verification link. POST /v1/accounts/recover | public | email | Sends a recovery link. The answer is the same whether or not the account exists. POST /v1/accounts/recover/confirm | public | token, password, label | A new key for the account, and a new password if you send one. GET /v1/me/usage | 0 | days | Requests and credits per day. GET /v1/me/keys | 0 | — | The keys of the account, masked. POST /v1/me/keys | 0 | label | A new key. Send an Idempotency-Key header. POST /v1/me/keys/{id}/rotate | 0 | — | A new secret for a key. The old one keeps working for a grace period. DELETE /v1/me/keys/{id} | 0 | — | Revokes a key at once. POST /v1/me/verification/resend | 0 | — | Sends a new verification link. POST /v1/billing/checkout | 0 | plan, interval, success_to, cancel_to | A Stripe Checkout address for a paid plan. POST /v1/billing/portal | 0 | return_to | A Stripe billing portal address: card, plan, cancellation. GET /v1/billing/invoices | 0 | — | The invoices of the account. ### Parameters Parameter | On | Meaning game | sets, cards, sealed | A game id from /v1/games. An unknown value is a 400. region | sets | WEST or EAST: the print line of the set. set | cards, sealed | A set id or code. name | cards | Matches the start of the card name. number | cards | The collector number, exactly as printed. kind | sealed | A product kind, such as BOOSTER_BOX. source | prices | CARDMARKET or TCGPLAYER. language | prices | A language code, such as en or ja. variant | prices | A variant, such as MARKET or LOWEST_NEAR_MINT. ids | prices/current | Up to 25 card or sealed product ids, separated by commas. from, to | price history | Days as YYYY-MM-DD, in UTC. Default: the last 90 days. bucket | price history | day, week or month. Default day. limit | lists | 1 to 250. Default 50. cursor | lists | From links.next. Never built by hand. ### A card ``` { "data": { "id": "01d3a5f3-18df-4520-ac0b-4449c077f179", "game": "onepiece", "set": { "id": "95435c34-…", "code": "OP11", "name": "A Fist of Divine Speed" }, "number": "OP11-095", "name": "Monkey.D.Garp", "rarity": "SUPER RARE", "supertype": null, "attributes": { "types": ["Black"] }, "image_url": "https://media.alltcgapi.com/cards/…/OP11-095-normal.webp?e=…&s=…", "languages": ["en"], "external_ids": { "cardmarket": 827230, "tcgplayer": … }, "version": 1, "updated_at": "2026-11-18T22:21:15.182Z" } } ``` ### Images image_url on cards, sets and sealed products is a signed URL on media.alltcgapi.com: e is its expiry, s its signature. It needs no API key and costs no credits, so it can go straight into an img tag. A signed URL stays the same for a whole week and is valid for at least 7 days. Store the object id, not the URL, and read the object again when you need the image: an expired or altered URL answers 403 IMAGE_URL_INVALID. A few image_url still point to the original host of the image and are served from there as they are. ### Stability - An id never changes and is never reused. - version moves only when the data of the object changes. - New fields may be added to an object. Fields are not renamed or removed within /v1.