Skip to content
Prepaid, no subscription trap. Top up a balance and we draw the monthly fee from it.
tcggraph

Wizards of the Coast · since 1993

Magic: The Gathering API

Oracle text, mana costs, colour identity, every frame variant and all twenty-plus format legalities.

37,158
Cards
105,841
Printings
955
Sets
11
Languages
English, German, French, Italian, Spanish, Portuguese, Japanese, Korean, Russian, Simplified Chinese and Traditional Chinese

Overview

What the Magic dataset covers

Magic: The Gathering invented the trading card game and still leads the market by total dollar value. TCGGraph exposes canonical Oracle text, mana value, colour identity, type lines, keyword abilities and legality across Standard, Pioneer, Modern, Legacy, Vintage, Commander and Pauper — plus every finish, frame effect and promo treatment as an addressable printing with its own price series.

Every finish, frame effect and promo treatment is an addressable printing with its own price series, so a Showcase foil and its regular printing never share a number.

Formats

  • Standard
  • Pioneer
  • Modern
  • Legacy
  • Vintage
  • Commander
  • Pauper
  • Brawl
  • Alchemy
  • Historic

Price sources

  • Cardmarket
  • TCGplayer
  • Card Kingdom
  • Mana Pool
REST
curl -G "https://api.tcggraph.com/v1/cards" \
  -d game=magic-the-gathering \
  -d limit=5 \
  -H "Authorization: Bearer $TCGGRAPH_KEY"
GraphQL
{
  cards(
    filter: {
      game: MAGIC_THE_GATHERING
      gameData: { colorIdentity: "U", manaValue: 3 }
    }
    limit: 10
  ) {
    nodes {
      name
      gameData
      legalities
    }
  }
}

Schema

Magic-specific fields

Every card carries the shared core fields. These live under gameData, in REST and GraphQL alike, and each is a filter: ?cost=2 in REST, gameData: { cost: 2 } in GraphQL.

FieldTypeDescription
manaCostStringMana cost in symbol notation, e.g. {2}{U}{U}.
manaValueFloatConverted mana cost.
colors[String]Colours in the mana cost.
colorIdentity[String]Commander-legal colour identity.
typeLineStringFull type line including supertypes and subtypes.
powerStringCreature power. May be a character such as *.
toughnessStringCreature toughness. May be a character such as *.
loyaltyStringStarting loyalty for planeswalkers.
keywords[String]Parsed keyword abilities.
layoutEnumnormal, transform, modal_dfc, split, adventure, saga…
finishes[String]nonfoil, foil or etched: the finishes the printing was made in.

Plus 26 core fields shared by every game — see the full reference.

Live data

Magic cards in the public dataset

Real records returned by the API right now, sorted by market value, with both the American and the European quote.

CardSetNumberRarityTCGplayerCardmarket
Sygg, River CutthroatThe ListZNC-103rare$10.90€7.86
MeteoriteAvatar: The Last Airbender Eternal54mythic$0.81€0.50
Grim FlayerDouble Masters 2022502rare$0.71€0.49
Qasali PridemageTime Spiral Remastered383special$0.31€0.27
Crushing VinesCommander Legends221common$0.25€0.03
Palace GuardMagic 201124common$0.11€0.12
Hedron RoverWorldwake125common$0.10€0.10
Black LotusLimited Edition Alpha232rare—€33,768

The most valuable Magic cards and their prices — each printing with Cardmarket and TCGplayer quotes, per language and grade.

The European market for Magic

Cardmarket is the largest Magic singles market outside the United States, and for European-language cards it is effectively the only liquid one. Italian Legends and German Revised have their own collector base and their own price curve; converting a TCGplayer number will not get you close.

Traded on Cardmarket in German, French, Italian, Spanish, Portuguese, Russian beyond English. How European pricing works.

Sets

Notable Magic sets

  • LEA

    Limited Edition Alpha

    295 cards · 1993-08-05

  • USG

    Urza's Saga

    350 cards · 1998-10-12

  • MH3

    Modern Horizons 3

    303 cards · 2024-06-14

  • FIN

    Final Fantasy

    309 cards · 2025-06-13

  • SPM

    Marvel's Spider-Man

    286 cards · 2025-09-26

Modelling

Working with Magic data

The decisions that catch people out when they first integrate Magic. Each of these is a bug we have watched somebody ship.

  • Colour identity is not colour

    A card's colours come from its mana cost. Its colour identity also includes mana symbols in the rules text, which is what Commander deckbuilding actually uses. A card with no coloured mana in its cost can still be off-limits in a mono-white deck. Filter on colorIdentity for Commander and colors for everything else.

  • One name, many records

    Lightning Bolt has been printed dozens of times, and each printing is its own card record: its own id, set, collector number, artist, image and prices. There is no id that groups every printing of a card as one rules object, so gather them by name, and key a deck list on the name rather than on a printing's id.

  • Double-faced cards are one record

    Transform, modal double-faced, split and adventure cards are a single record per printing. The faces are joined with " // " in name, gameData.typeLine and text, gameData.layout says which kind of card it is, and manaCost, power and toughness describe the front face. There is no per-face array to walk.

  • Legality is read, not filtered

    legalities carries all 23 formats, each legal, not_legal, banned or restricted. There is no legality filter on /v1/cards: filter on the card's properties, then read legalities.commander (or any format) on what comes back. A ban announcement fires a card.legality.changed webhook per format that moved.

Recipes

Common Magic queries

Three requests that cover most of what applications in this game actually ask for.

Two-mana blue cards with flash

Deck builders combine colour identity, mana value and a keyword in a single filter.

colorIdentity and keywords are lists, and a filter on a list matches any card carrying the value, so multicolour cards with blue in their identity come back too.

GET /v1/cards
  ?game=magic-the-gathering
  &colorIdentity=U
  &maxManaValue=2
  &keywords=Flash

The cheapest printing of a card, in euros

Price tools want the least expensive copy across every set it has appeared in.

source picks the marketplace that price sorts on, in its own currency. Every printing still carries all of its quotes.

GET /v1/cards
  ?game=magic-the-gathering
  &name=lightning bolt
  &source=cardmarket
  &sort=price
  &limit=100

Every transforming card

Card renderers need to know which records have a back face before they draw one.

layout also takes modal_dfc, split, adventure, saga and the rest of Scryfall's layouts.

GET /v1/cards
  ?game=magic-the-gathering
  &layout=transform
  &limit=100

Glossary

Magic terms, and the fields that hold them

What players call a thing on the left, what you query on the right.

TermFieldNotes
Mana valuegameData.manaValueFormerly converted mana cost. A number, so minManaValue and maxManaValue bound it.
Colour identitygameData.colorIdentity[]Colours in cost and rules text, as W, U, B, R and G. What Commander legality is checked against.
Type linegameData.typeLineThe full printed line, em dash included, both faces joined by " // ". A filter on it matches the whole line.
LayoutgameData.layoutnormal, transform, modal_dfc, split, adventure, saga and so on. How the card's faces fit together.
Power / ToughnessgameData.powerA string, not a number: it can be * or 1+*. Null on non-creatures.
Finishprices[].finishnormal, foil or etched on Magic; the full closed list is on /docs/prices. Each finish is priced separately and grouped on printings[].

FAQ

Magic API questions

Anything not covered here, email hello@tcggraph.com and a human who knows Magic answers.

Also available

Add another game without another integration

Your Magic key already works for every other game in the catalog. Change the MAGIC_THE_GATHERING enum and the rest of your code stays as it is.