# Magic: The Gathering card scanner API

Thirty years of reprints means one card name maps to eighty different products.

- Game slug: `magic-the-gathering`
- Matchable printings: 108,302
- Languages: English, German, French, Italian, Spanish, Portuguese, Japanese, Korean, Russian, Simplified Chinese and Traditional Chinese
- Median match on the live socket: 500 ms server-side
- Unresolved frames: never billed

## Why Magic is hard to identify

Magic's problem is scale in two directions at once. A staple like Lightning Bolt has been printed in dozens of sets, most with different artwork, and Secret Lair and Universes Beyond releases have added treatments that look nothing like the original. At the same time the reverse is true: the same artwork is reprinted across sets with only a set symbol and a copyright line to tell them apart, and some promos differ from the main-set printing by nothing but a stamp.

The modern frame treatments multiply it again. Borderless, extended art, showcase, retro frame and textless versions of one card in one set are separate products with separate prices, and foil and etched foil are separate again. A scanner keyed on artwork will confidently return the wrong one of five printings from the same booster.

The field that actually settles it is the collector number in the bottom-left, printed alongside the set code and the language letter. Frame treatments carry their own collector numbers, so reading that line settles the printing, treatment included. Foil and etched foil are finishes of that printing: they come back as its printings, each priced, for you to choose, because the photo is not used to tell them apart. Where the line cannot be read or the card prints none, reprints that kept the art come back identified with the printing unresolved and the candidates attached.

## Fields a match is decided on

- **Collector number and set code** — Since 2018 the bottom-left line is a unique product identifier.
- **Frame treatment** — Borderless, extended, showcase and retro are separate printings at separate prices.
- **Foiling** — Non-foil, foil and etched foil diverge by multiples on the same card. Returned as the printing's finishes, each priced; not read from the photo.
- **Copyright line** — What a person reads on older printings with no collector number. The scanner does not read it, so those reprints come back unresolved with the candidates listed.
- **Language** — Eleven printed languages, every one of them held and matched; Japanese alternate-art printings carry their own premium.

## Where naive scanners fail

### Reprints that share art

Core-set reprints often reuse the illustration exactly. The set symbol and the copyright year are the only visible difference, and the price gap between a 1997 and a 2021 printing of the same card can be two orders of magnitude.

### Five printings, one booster

A mythic from a recent set can exist as regular, foil, extended art, borderless and showcase, all pulled from the same box. Matching on the illustration alone cannot distinguish four of the five.

### Old-border edge cases

Alpha is separated from Beta by corner radius and from Unlimited by border colour. These are the most valuable cards in the game and the distinction is geometric rather than textual. The scanner measures neither, so these come back identified with the printing unresolved and all three as candidates.

## Request

```bash
curl -X POST "https://api.tcggraph.com/v1/scan" \
  -H "Authorization: Bearer $TCGGRAPH_KEY" \
  -F image=@front.jpg \
  -F games=magic-the-gathering \
  -F minConfidence=0.92
```

The card inside a match is the same object `https://api.tcggraph.com/v1/cards?game=magic-the-gathering` returns, including the Magic-specific `gameData` fields.

## Pricing

$29/month for 6,000 matched cards, down to $0.0025 per scan at volume, or $0.012 per matched card with no plan. Scans are pooled across every game; there is no per-game surcharge.

## FAQ

**Can it tell which printing of a reprinted card I have?**

Usually, and it tells you when it cannot. The match returns a specific printing — set, collector number, frame treatment and language — whenever the artwork is unique to it or the collector number line is read, which on a modern card photographed at 400 pixels or more across it usually is. Where reprints kept the art and the line cannot be read, or the card prints none, it comes back identified with printingResolved: false and every candidate listed with its set and number. Alpha, Beta and Unlimited differ only in corner and border geometry, which is not measured, so they always come back as candidates.

**Does it handle foil and etched foil?**

They are returned, not detected. Every finish a printing exists in — nonfoil, foil, etched — is in card.printings with its own price, and finishResolved is false when there is more than one. The photo is not used to choose, because foil shows or hides with the light. Etched foil in particular is often mispriced by tools that treat all foils alike, so it is priced on its own, and the gap on a Commander Legends card is large enough to matter on a single sale.

**What about Secret Lair and Universes Beyond?**

They are printings like any other and carry their own set codes, so they match the same way. Because they share a card name with the main-set version but nothing else, they are exactly the case where matching on name and set symbol alone gets it wrong.

---

Canonical page: https://tcggraph.com/recognition/magic-the-gathering
Full machine-readable reference: https://tcggraph.com/llms-full.txt
