Skip to content
alltcgapi.com

Docs

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.

Request
curl "https://api.alltcgapi.com/v1/games" \
  -H "X-Api-Key: $ALLTCG_KEY"
Response
{
  "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.

Request
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.

Request
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.
NextAuthentication