Skip to content
Crypto-only, prepaid. Top up a balance and we draw from it monthly — nothing is ever charged automatically.
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.

32,460
Cards
108,500
Printings
812
Sets
11
Languages

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.

Sourced from Scryfall bulk data, Gatherer Oracle updates and TCGplayer.

Formats

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

Price sources

  • TCGplayer
  • Cardmarket
  • Card Kingdom
  • eBay sold
REST
curl -G "https://api.tcggraph.com/v1/cards" \
  -d game=magic-the-gathering \
  -d limit=5 \
  -H "Authorization: Bearer $TCGGRAPH_KEY"
GraphQL
{
  cards(
    game: MAGIC
    filter: {
      colorIdentity: ["U", "R"]
      manaValue: { lte: 3 }
      format: COMMANDER
    }
    first: 10
  ) {
    nodes {
      name
      magic { manaCost typeLine oracleText }
    }
  }
}

Schema

Magic-specific fields

Every card carries the shared core fields. These live under gameData in REST, and under the typed magic field 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.
oracleTextStringCurrent Oracle rules text.
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, etched or glossy.
legalitiesObjectPer-format legal, not_legal, restricted or banned.

Plus 21 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
Gaea's CradleUrza's Saga321Rare$1,637€1,220
Sheoldred, the ApocalypseDominaria United107Mythic$98.04€79.81
Force of WillDominaria Remastered50Mythic$60.39€52.11
Ragavan, Nimble PilfererModern Horizons 2138Mythic$42.97€31.76
Snapcaster MageInnistrad Remastered478Mythic$16.90€14.68
TarmogoyfTime Spiral Remastered235Mythic$5.26€4.26
Sol RingMarvel Super Heroes Commander211Uncommon$1.56€1.38
Lightning BoltMarvel Super Heroes Commander806Uncommon$0.71€0.66

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.

  • Oracle text, not printed text

    The words on the cardboard go stale — templating changes, keywords get renamed, and errata land without a reprint. Oracle text is the current authoritative wording and is what judges play by. We return oracle text by default and keep the printed text alongside it for anyone rendering a faithful card image.

  • 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, two objects

    Lightning Bolt has been printed dozens of times. The oracle id identifies the card as a rules object; the printing id identifies one physical version with its own art, set, collector number and price. Deck lists key on oracle id, collection trackers and price tools key on printing id.

  • Multi-faced cards nest their data

    Transforming, split, adventure, modal double-faced and flip cards carry their real content in faces[]. Top-level manaCost, power and toughness may be null on those cards. Always read through faces when they are present rather than assuming the flat shape.

Recipes

Common Magic queries

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

Commander staples under three mana

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

colorIdentity is a subset match, so this returns mono-blue and mono-red cards too.

GET /v1/cards
  ?game=magic-the-gathering
  &colorIdentity=U,R
  &maxManaValue=3
  &format=commander
  &sort=edhrecRank:asc

The cheapest printing of a card

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

Querying by oracleId returns every printing; sorting by market price gives you the floor.

GET /v1/cards
  ?game=magic-the-gathering
  &oracleId=4457ed35-7c10-48c8-9776-456485fdf070
  &include=prices
  &sort=prices.market:asc
  &limit=1

Watch for bans and unbans

Legality changes on announcement day, not on set release. Subscribe instead of polling.

One signed request per change, rather than re-reading the whole catalogue every night.

POST /v1/webhooks
{
  "url": "https://yourapp.com/hooks/tcggraph",
  "events": ["card.legality.changed"],
  "filter": { "game": "magic-the-gathering" }
}

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 valuemagic.manaValueFormerly converted mana cost. X counts as zero on the stack and in the API.
Colour identitymagic.colorIdentity[]Colours in cost and rules text. What Commander legality is checked against.
Type linemagic.typeLineFull printed line, em dash included. Parsed forms are in types and subtypes.
Oracle idmagic.oracleIdStable across every printing. The right key for a deck list.
Facesmagic.faces[]Present on double-faced, split, adventure and flip cards.
Power / Toughnessmagic.powerString, not integer — it can be *, 1+*, or an em dash on non-creatures.
Finishfinishnonfoil, foil or etched. Each finish is priced separately.

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.