YGOPRODeck (Yu-Gi-Oh!) API
Free Yu-Gi-Oh! card API with no key: every card with ATK, DEF, level, attribute, archetype, every printing it appeared in and current set prices. Live tested example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the YGOPRODeck (Yu-Gi-Oh!) API?
YGOPRODeck's API is a free, key-free Yu-Gi-Oh! card database. A single lookup returns the card's stats, type line, archetype and rules text along with every set it has been printed in, each with its rarity code and current market price.
The `card_sets` array is the part worth building on. Yu-Gi-Oh! cards are reprinted relentlessly, and this API returns the full printing history in one response — our capture of Dark Magician listed the 2016 Mega-Tins, the 2017 Mega-Tins, Battle of Chaos and a 2002 collector tin among many others, each with its own set code, rarity and price. Collection and pricing tools normally have to assemble that from several sources; here it arrives inline.
Prices need reading carefully. `set_price` is a string with two decimal places, and `"0.00"` does not mean the card is free — it means no price is recorded for that printing, which is common for very recent or very obscure sets. Treat zero as unknown and exclude it from averages, or your cheapest-printing feature will confidently recommend a set nobody has priced. The project also asks that you download card images once and serve them yourself rather than hotlinking on every page view.
Quick facts
- Base URL
https://db.ygoprodeck.com/api/v7- Authentication
- No key or account. The API guide asks that you cache responses and host card images locally rather than hotlinking them on every request.
- Rate limit
- The API guide sets a ceiling of 20 requests per second per address. That is generous, but the dataset is nearly static, so cache instead.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the YGOPRODeck (Yu-Gi-Oh!) API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Look up a Yu-Gi-Oh! card by exact name
GET https://db.ygoprodeck.com/api/v7/cardinfo.php?name=Dark%20Magician
curl 'https://db.ygoprodeck.com/api/v7/cardinfo.php?name=Dark%20Magician'const res = await fetch("https://db.ygoprodeck.com/api/v7/cardinfo.php?name=Dark%20Magician");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://db.ygoprodeck.com/api/v7/cardinfo.php?name=Dark%20Magician", timeout=20)
res.raise_for_status()
print(res.json()){
"data": [
{
"id": 46986414,
"name": "Dark Magician",
"typeline": [
"Spellcaster",
"Normal"
],
"type": "Normal Monster",
"humanReadableCardType": "Normal Monster",
"frameType": "normal",
"desc": "''The ultimate wizard in terms of attack and defense.''",
"race": "Spellcaster",
"atk": 2500,
"def": 2100,
"level": 7,
"attribute": "DARK",
"archetype": "Dark Magician",
"ygoprodeck_url": "https://ygoprodeck.com/card/dark-magician-4003",
"card_sets": [
{
"set_name": "2016 Mega-Tins",
"set_code": "CT13-EN003",
"set_rarity": "Ultra Rare",
"set_rarity_code": "(UR)",
"set_price": "6.97"
},
{
"set_name": "2017 Mega-Tins",
"set_code": "CT14-EN001",
"set_rarity": "Secret Rare",
"set_rarity_code": "(ScR)",
"set_price": "9.66"
},
{
"set_name": "Battle of Chaos",
"set_code": "25TH-EN001",
"set_rarity": "Ultra Rare",
"set_rarity_code": "(UR)",
"set_price": "0.00"
},
{
"set_name": "Booster Pack Collectors Tins 2002",
"set_code": "BPT-001",
"set_rarity": "Secret Rare",
"set_rarity_code": "(ScR)",
"set_price": "63.01"
},
{
"set_name": "Collectible Tins 2003",
"set_code": "BPT-007",
"set_rarity": "Secret Rare",
"set_rarity_code": "(ScR)",
"set_price": "19.08"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | query | Optional | Exact card name. Case-insensitive but not fuzzy — a typo returns an error, not a suggestion. Dark Magician |
fname | query | Optional | Fuzzy name search. Use this when you have partial input from a user. magician |
archetype | query | Optional | Return every card in an archetype, such as `Blue-Eyes` or `Dark Magician`. Dark Magician |
type | query | Optional | Filter by card type, for example `Normal Monster`, `Spell Card`, `XYZ Monster`. Normal Monster |
num / offset | query | Optional | Page size and starting offset. `num` requires `offset` to be present as well. 10 |
Response fields
dataarray- Always an array, even for a single exact-name lookup. Index it rather than treating the response as one card.
data[].idinteger- The eight-digit passcode printed at the bottom-left of the physical card — the canonical Yu-Gi-Oh! identifier.
data[].typelinearray of strings- Split type line, for example `["Spellcaster", "Normal"]`, with `type` and `humanReadableCardType` giving the joined forms.
data[].descstring- Rules text, or flavour text for Normal Monsters — which arrives wrapped in doubled apostrophes rather than quotation marks.
data[].atk / def / levelinteger- Present on monsters only. Spells and Traps omit these keys entirely, so check for existence rather than for zero.
data[].card_sets[]array- Every printing: `set_name`, `set_code`, `set_rarity`, `set_rarity_code` and `set_price`.
data[].card_sets[].set_pricestring- A two-decimal string. `"0.00"` means no price on record, not a free card — exclude it from calculations.
data[].archetypestring- Archetype membership where it applies. Absent on cards outside an archetype rather than empty.
What you can build with the YGOPRODeck (Yu-Gi-Oh!) API
- Build a Yu-Gi-Oh! deckbuilder with card search and images
- Value a collection by matching owned set codes against current prices
- Generate archetype pages listing every card in a theme
- Power a rules-lookup bot that returns card text on demand
- Track reprint history to spot which cards have never been reprinted
Common errors and how to fix them
400 with an error message
The exact `name` did not match any card.
Fix: Fall back to `fname` for a fuzzy match, and surface the suggestions rather than the raw error.
Missing atk / def / level
Not an error — the card is a Spell or Trap.
Fix: Check whether the key exists before reading it; these fields are omitted, not set to zero or null.
`set_price` of 0.00 everywhere
The printing has no recorded market price.
Fix: Treat zero as unknown, filter it out, and fall back to the most recent priced printing.
YGOPRODeck (Yu-Gi-Oh!) API — frequently asked questions
Is there a free Yu-Gi-Oh! API without an API key?
Yes — YGOPRODeck's v7 API is open, needs no key or account, and covers every card with stats, rules text, printings and prices. The guide asks only that you cache responses and host card images yourself.
How do I search Yu-Gi-Oh! cards by partial name?
Use `fname` rather than `name`. The `name` parameter requires an exact match and returns an error on a typo, whereas `fname` does a substring match, which is what you want behind a search box.
Does the API include card prices?
Yes. Every entry in `card_sets` carries a `set_price` for that specific printing. Note it is a string and that `0.00` means no price is recorded rather than a card with no value.
What is the id field — is it the same as the card number?
It is the eight-digit passcode printed in the bottom-left corner of the physical card, which is the identifier the game itself uses. Set codes such as `CT13-EN003` identify a printing, not the card, and live inside `card_sets`.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
CSV Viewer & Table
View CSV as a clean HTML table online. Live search filter, row and column counts, delimiter and header options — all processed locally in your browser.
YGOPRODeck (Yu-Gi-Oh!) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.