Is there a card recognition API for Magic, Lorcana, Yu-Gi-Oh! and One Piece?
Direct answer
Yes. The NeoSatoshi Detection API identifies Magic: The Gathering, Disney Lorcana, Yu-Gi-Oh! (TCG) and One Piece cards from a photo when you add "tcg": "magic", "lorcana", "yugioh" or "onepiece" to the request. Each card comes back as JSON with name, set, number, rarity, Cardmarket product ID and daily Cardmarket prices in EUR, plus game-specific fields such as the Yu-Gi-Oh! set code and edition or the separate Lorcana and Magic foil prices. These four games take one card per photo, and a public demo key allows 10 free detections per day without an account.
One endpoint, one extra field
It is the same endpoint as for Pokémon: POST https://europe-west1-neosatoshi.cloudfunctions.net/detectApi with Authorization: Bearer <key> and the image as base64 (image) or as a public https link (image_url). Without "tcg" the image is read as Pokémon, so add the game:
Request bodies
{ "image": "<base64 JPEG or PNG>", "tcg": "magic" }
{ "image": "<base64 JPEG or PNG>", "tcg": "lorcana" }
{ "image": "<base64 JPEG or PNG>", "tcg": "yugioh" }
{ "image_url": "https://example.com/op01-003.jpg", "tcg": "onepiece" }"magic": Magic: The Gathering, English and German cards."lorcana": Disney Lorcana, English, German, French and Italian cards."yugioh": Yu-Gi-Oh! TCG, English, German, French, Italian, Spanish and Portuguese cards."onepiece": One Piece, English and Japanese cards.
Send one card per photo for these four games; only Pokémon reads several cards in one photo. This request runs as is, with our Lorcana example scan and the public demo key:
curl
curl -X POST https://europe-west1-neosatoshi.cloudfunctions.net/detectApi \
-H "Authorization: Bearer nsk_live_9c253fbed995042a98280ad13e5c47d3c4a59c9b4f0f7274" \
-H "Content-Type: application/json" \
-d '{"image_url": "https://neosatoshi.com/static/images/example_api_lorcana.jpg", "tcg": "lorcana"}'Magic: The Gathering
- English and German cards only. Cards in other languages return no card and cost no card scan.
- The card is identified from its printed text.
nameis the English name, also for German cards;localized_nameholds the printed German name. - The printing comes from the set code and collector number where the card has one, and
print_sourcesays how it was found. Cards from before the 2014 frame have no set code printed on them, so the printing cannot be read: thenprint_unconfirmedis true, there is no price on purpose, andalternativeslists up to 12 printings, newest first, each with its own prices, for your user to pick. oracle_idis the card across all its printings,card_idone printing. Collector numbers are strings such as "123★" or "2a", so never parse them as integers.- Foil prices are separate:
prices.cardmarket(non-foil) andprices.cardmarket_foilin EUR, plus TCGplayer market and foil prices in USD. The finish is not read from the photo, so let your user choose;finisheslists the finishes that exist andfoil_onlymarks printings without a non-foil version. - Tokens and art cards are not in the catalog.
- Measured: median accuracy of 97.6% in our internal evaluation (October 2026).
Why the printing matters so much for Magic prices: how to tell which printing of a Magic card you have.
Disney Lorcana
- English, German, French and Italian cards.
nameis the title andversionthe subtitle;full_namejoins both and is the name to show.name_enandfull_name_encarry the English name, also for German, French and Italian cards.coloris the ink: Amber, Amethyst, Emerald, Ruby, Sapphire or Steel.- Foil and non-foil Cardmarket prices:
prices.cardmarketis the non-foil price,prices.cardmarket_foilthe foil price.is_foilis true for foil-only printings (Enchanted, Epic, Iconic and most promos); for printings that exist in both finishes it is false and your user decides. A missing price is null, never 0. art_unconfirmedmarks an ambiguous printing, for example the regular card against its Enchanted version;alternativeslists the others.
More on the foil question for sellers: how to list and price Lorcana foil cards.
Yu-Gi-Oh!
- TCG prints in English, German, French, Italian, Spanish and Portuguese. Japanese and Korean OCG cards are not supported.
- The printed set code, for example ROTA-DE024, decides set and language and comes back in
set.code.nameis the English name,localized_namethe name in the card's language andcard_idthe 8-digit passcode. rarityandedition: "first", "unlimited" or "limited", read from the card.- When one set code exists in several rarities,
rarity_unconfirmedis true: the cheapest comes first and the others are inalternatives, because only the foil tells them apart. - When one code and rarity has several prints (original and reprint, alternate art),
version_unconfirmedis true andprice_versionslists each one with its own price. - Prices: Cardmarket in EUR (trend, low, avg7, avg30, the same for every edition, because Cardmarket does not split editions) and TCGplayer in USD per edition (
by_edition). A missing price is null, never 0. - Measured: on 315 real eBay listing photos (October 2026), the correct card in 99.3% of them.
Background on codes and editions: Yu-Gi-Oh! set codes and TCG vs OCG.
One Piece
- English and Japanese cards.
card_idis the collector id printed on the card, for example OP01-003. The card also comes withcolor,type, rarity, Cardmarket product ID and Cardmarket prices in EUR.
The same rules for all four games
- One card scan per detected card. A photo without a card returns HTTP 422 and costs nothing.
- When a printing is not certain, the API leaves the price empty and lists the options instead of guessing. Show those cards to your user as "please pick".
- Condition is never judged. Let your user set it.
- Synchronous: about 5 seconds for a warm request, 10 to 15 seconds for a cold one. Set a client timeout of 120 seconds.
Frequently asked questions
Does the API read Japanese Yu-Gi-Oh! or Japanese Magic cards?
No. Yu-Gi-Oh! covers TCG prints in six European languages, not the Japanese or Korean OCG. Magic covers English and German cards; cards in other languages return no card and cost nothing.
Can I send several Magic or Lorcana cards in one photo?
No, one card per photo for Magic, Lorcana, Yu-Gi-Oh! and One Piece. Several cards per photo, including binder pages, work for Pokémon: see the Pokémon card recognition API.
How do I know whether a Magic or Lorcana card is foil?
The photo does not tell the finish reliably, so the API returns both prices and lets you decide. For Magic, finishes and foil_only say which finishes exist; for Lorcana, is_foil is true for foil-only printings.
Which game is the default?
Pokémon. A request without "tcg" is read as Pokémon, so always send the field for the other four games.
Further reading
Try it with your own card
Pick the game in the test box of the documentation, upload a photo and see the JSON. 10 free detections per day, no signup.
No account required for the first 10 detections.