📚 Yu-Gi-Oh! API

Yu-Gi-Oh! API
Documentation

REST reference for the Yu-Gi-Oh! API: sets, cards, search and images, with prices from TCGPlayer and CardMarket. Same API key as the Pokémon and One Piece APIs.

706 SetsFull Yu-Gi-Oh! catalog
Dual MarketTCGPlayer (USD) + CardMarket (EUR)
Updated DailyPrices refreshed every day
Base pathhttps://api.pokewallet.io/ygo
Sets706 Yu-Gi-Oh! sets
Card IDsygo_ + hex for cards on TCGPlayer; 64 hex characters for CardMarket-only cards
PricesTCGPlayer (USD) for every finish and CardMarket (EUR) for normal and foil, refreshed daily
Free on every planSets, set cards, card details, search and images
Ultra plan or 7-day trialPrices by set, set statistics, completion value, trending sets and top cards
API keyThe same key as the Pokémon and One Piece APIs, with shared rate limits
Base URL:https://api.pokewallet.io
One API key works for every game. Pick a game in the tabs below: each tab documents that game's endpoints — Pokémon at /cards, /sets…, One Piece at /op/…, the other games at /mtg/…, /ygo/…, /lor/… and so on.

Quick Start

Get started with PokéWallet API in 4 simple steps:

1

Create an Account

Sign up for free to start using the API. Upgrade anytime from your dashboard.

Sign Up Now
2

Generate an API Key

Create your first API key from the dashboard.

3

Make Your First Request

Start querying the API with your key.

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
       "https://api.pokewallet.io/ygo/sets"
4

Join the Discord Community

Stay up to date with new features, ask for help, and connect with other developers.

Join Discord

Authentication

All API requests (except /health) require authentication using an API key.

API Key Format

API keys follow this format:

  • Production keys: pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Development keys: pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Security Warning: Never expose your API keys in client-side code, public repositories, or logs. Always use environment variables.

Authentication Methods

You can authenticate using either the X-API-Key header or Authorization header:

X-API-Key Header (Recommended)
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/search?q=pikachu"
Authorization Header
curl -H "Authorization: Bearer pk_live_your_key_here" \
     "https://api.pokewallet.io/search?q=pikachu"

Rate Limits

Rate limits vary depending on your subscription plan:

PlanHourly LimitDaily LimitPrice
Free100 requests1,000 requests$0/month
Early Access ⭐1,000 requests10,000 requestsNo longer available
Coffee ☕1,000+ requests10,000+ requestsBuy a coffee on Ko-fi
Pro5,000 requests50,000 requests€20/month
Ultra7,000 requests70,000 requests€29/month
BusinessCustomCustomContact us
All new users start on the Free plan. Upgrade from your dashboard.
Early Access was our initial launch tier and is no longer available for new users.
Please note: After upgrading your plan, activation may require a couple of hours.

Rate Limit Headers

Every API response includes rate limit information:

X-RateLimit-Limit-Hour: 100
X-RateLimit-Remaining-Hour: 95
X-RateLimit-Limit-Day: 1000
X-RateLimit-Remaining-Day: 823

Rate Limit Exceeded (429)

When you exceed your rate limit, you'll receive a 429 Too Many Requests response:

{
  "error": "Rate limit exceeded",
  "message": "Hourly limit exceeded",
  "limits": {
    "hourly": {
      "limit": 100,
      "used": 100,
      "remaining": 0
    },
    "daily": {
      "limit": 1000,
      "used": 523,
      "remaining": 477
    }
  }
}

Public Endpoints

No Authentication Required: These endpoints are publicly accessible.
GET/healthNo Auth Required

Check API status, database, cache, and storage health with response times.

Example Request:

cURL
curl "https://api.pokewallet.io/health"

Response Example (Healthy):

200 OK
{
  "status": "healthy",
  "timestamp": "2025-12-16T10:30:00.000Z",
  "version": "1.1.0",
  "checks": {
    "database": {
      "status": "healthy",
      "responseTime": 45
    },
    "cache": {
      "status": "healthy",
      "responseTime": 3
    },
    "storage": {
      "status": "healthy",
      "responseTime": 12
    }
  },
  "responseTime": 60,
  "region": "FRA"
}

Response Example (Unhealthy):

503 Service Unavailable
{
  "status": "unhealthy",
  "timestamp": "2025-12-16T10:30:00.000Z",
  "version": "1.1.0",
  "message": "Critical services unavailable - API may not function correctly",
  "checks": {
    "database": {
      "status": "unhealthy",
      "responseTime": null,
      "message": "Connection failed"
    },
    "cache": {
      "status": "healthy",
      "responseTime": 3
    },
    "storage": {
      "status": "healthy",
      "responseTime": 12
    }
  },
  "responseTime": 1050,
  "region": "FRA"
}
GET/No Auth Required

Get API information, version, and available endpoints.

Example Request:

cURL
curl "https://api.pokewallet.io/"

Response Example:

200 OK
{
  "name": "PokeWallet API",
  "version": "1.1.0",
  "status": "production",
  "authentication": {
    "required": true,
    "method": "API Key",
    "header": "X-API-Key",
    "format": "pk_live_xxxxxxxxxxxxx"
  },
  "endpoints": {
    "health": { "path": "/health", "auth_required": false },
    "search": { "path": "/search?q=charizard&limit=20", "auth_required": true },
    "cardDetail": { "path": "/cards/:id", "auth_required": true },
    "sets": { "path": "/sets", "auth_required": true },
    "setDetails": { "path": "/sets/:setCode?page=1&limit=50", "auth_required": true },
    "images": { "path": "/images/:id?size=high", "auth_required": true }
  },
  "rate_limits": {
    "per_hour": 100,
    "per_day": 1000,
    "plan": "free"
  }
}
GET/gamesNo Auth Required

Lists the games available under their own prefix (/mtg, /ygo, …) with their routes. Pokémon and One Piece are not in this list: they use /cards, /sets… and /op/….

Example Request:

cURL
curl "https://api.pokewallet.io/games"

Response Example (first of ten games):

200 OK
{
  "success": true,
  "data": [
    {
      "code": "mtg",
      "name": "Magic: the Gathering",
      "endpoints": {
        "sets": "/mtg/sets",
        "set": "/mtg/sets/:set",
        "card": "/mtg/cards/:id",
        "search": "/mtg/search?q=",
        "image": "/mtg/images/:id"
      }
    }
  ]
}
Yu-Gi-Oh! PRO endpoints: Ultra plan required

The Pro plan does not include them: Pro covers Pokémon and One Piece only. Ultra (€29/month) includes everything in Pro plus the paid endpoints of all 12 games. Free endpoints (sets, cards, search, images) work on every plan.

Compare plans →

Yu-Gi-Oh!

All Yu-Gi-Oh! endpoints live under /ygo. Same API key, same rate limits and the same response format as the Pokémon endpoints.

Card IDs

FormatExampleUsed for
ygo_ + hexygo_9a3718ca91c2b4423f3b…Every card with a TCGPlayer product, even if it also has CardMarket data
64 hex characters, no prefixe26f12b8b1fabf19…Cards that exist only on CardMarket
A ygo_… ID only works under /ygo/. Finishes of the same product (Normal, Foil, …) are one card with one ID; each finish has its own TCGPlayer price. If you request a card by its CardMarket ID and it is linked to a TCGPlayer product, the response uses the canonical ygo_… ID.

Response Format

Same shape as the Pokémon API: card_info, images, tcgplayer.prices and cardmarket.prices as arrays, pagination, errors as { "error", "message" }. Differences:

FieldYu-Gi-Oh!
Game fields in card_info Instead of Pokémon's hp, stage, attacks…, the game's own fields in snake_case (present when the card has them): attribute, attack, defense, monster_type, link_rating, link_arrows, upc
card_type, card_textFilled from the game's card type and rules text. card_text may contain HTML (<strong>, <em>…) as provided by TCGPlayer.
card_info.variants, card_info.set_idAlways present, on every endpoint
product_type"card", "sealed" or null when unknown — see Data Notes
release_dateISO format, e.g. "2025-03-07T00:00:00" (Pokémon uses "16th June, 2023")
images.languages["en"], or [] when there is no image

Yu-Gi-Oh! Endpoints

GET/ygo/sets

All Yu-Gi-Oh! sets.

Response Fields:

FieldTypeDescription
namestringSet name
set_codestring | nullShort code. Not unique: several sets can share it.
set_idstringUnique set identifier. Negative for sets that exist only on CardMarket.
card_countintegerCards in the set (sealed products excluded). Omitted, not 0, if temporarily unavailable.
sealed_countintegerSealed products in the set (booster boxes, displays, decks). Omitted, not 0, if temporarily unavailable.
languagestring | nullSet language
release_datestring | nullISO date

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/ygo/sets"

Response Example (first two sets):

200 OK
{
  "success": true,
  "data": [
    {
      "name": "2-Player Starter Deck Yuya & Declan",
      "set_code": "ys15",
      "set_id": "-70",
      "card_count": 42,
      "sealed_count": 0,
      "language": "eng",
      "release_date": null
    },
    {
      "name": "2-Player Starter Set",
      "set_code": "TPSS",
      "set_id": "23269",
      "card_count": 88,
      "sealed_count": 2,
      "language": "eng",
      "release_date": "2024-01-26T00:00:00"
    }
  ],
  "total": 706
}
GET/ygo/sets/:set

Cards of one set, paginated. Prices are empty in set listings, as on the Pokémon API: use /ygo/cards/:id for prices.

Parameters:

ParameterTypeRequiredDescription
setstringRequiredset_id (recommended, always unique) or set_code (exact match, case-insensitive)
pagenumberOptionalPage number (default: 1)
limitnumberOptionalResults per page (default: 50, max: 200)

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/ygo/sets/24707?limit=1"

Response Example:

200 OK
{
  "success": true,
  "set": {
    "name": "Magnificent Monsters",
    "set_code": "MAMO",
    "set_id": "24707",
    "total_cards": 231,
    "language": "eng",
    "release_date": "2026-09-04T00:00:00"
  },
  "cards": [
    {
      "id": "ygo_9a3718ca91c2b4423f3bd02f650c59e4ee88601dc34d7cf38563f2a33db17bebe508528b418815d5975ee98f02fa261d04cec9",
      "card_info": {
        "name": "Dark Magician, the Pharaoh's Servant",
        "clean_name": "Dark Magician the Pharaohs Servant",
        "set_name": "Magnificent Monsters",
        "set_code": "MAMO",
        "set_id": "24707",
        "card_number": "MAMO-EN001",
        "rarity": "Ultra Rare",
        "card_type": "Effect Monster",
        "product_type": "card",
        "variants": [
          "1st Edition"
        ],
        "card_text": "This card's name becomes \"Dark Magician\" while on the field or in the GY. You can only use 1 of the following effects of \"Dark Magician, the Pharaoh's Servant\" per turn, and only once that turn. If this card is in your hand: You can reveal 1 Spell in your hand; Special Summon this card, then you can Set 1 Spell/Trap that mentions \"Dark Magician\" from your Deck. (Quick Effect): You can discard 1 Spell; destroy all Spells/Traps your opponent controls.",
        "attack": "2500",
        "defense": "2100",
        "attribute": "DARK",
        "monster_type": "Spellcaster"
      },
      "images": {
        "languages": [
          "en"
        ]
      },
      "tcgplayer": {
        "prices": [],
        "url": "https://www.tcgplayer.com/product/714701/yugioh-magnificent-monsters-dark-magician-the-pharaohs-servant"
      },
      "cardmarket": {
        "product_name": "Dark Magician, the Pharaoh's Servant (V.1 - Ultra Rare)",
        "prices": [],
        "product_url": "https://www.cardmarket.com/en/YuGiOh/Products/Singles/Magnificent-Monsters/Dark-Magician-the-Pharaohs-Servant-V1-Ultra-Rare"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 231,
    "total_pages": 231
  }
}

Disambiguation Response:

When a set_code is shared by several sets, the API returns the candidates instead of a set (status 200, as on the Pokémon API). Call again with the set_id you need.

200 OK — /ygo/sets/BPT
{
  "disambiguation": true,
  "message": "Multiple sets found for set_code 'BPT'. Use set_id to specify which one.",
  "matches": [
    {
      "set_id": "126",
      "set_code": "BPT",
      "name": "2003 Collectors Tin",
      "language": "eng",
      "release_date": "2003-09-01T00:00:00"
    },
    {
      "set_id": "1341",
      "set_code": "BPT",
      "name": "2002 Collectors Tin",
      "language": "eng",
      "release_date": "2002-10-04T00:00:00"
    }
  ],
  "total": 2
}
GET/ygo/cards/:id

Full card with prices. id is a ygo_… ID or a 64-character CardMarket ID.

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/ygo/cards/ygo_9a3718ca91c2b4423f3bd02f650c59e4ee88601dc34d7cf38563f2a33db17bebe508528b418815d5975ee98f02fa261d04cec9"

Response Example:

200 OK
{
  "id": "ygo_9a3718ca91c2b4423f3bd02f650c59e4ee88601dc34d7cf38563f2a33db17bebe508528b418815d5975ee98f02fa261d04cec9",
  "card_info": {
    "name": "Dark Magician, the Pharaoh's Servant",
    "clean_name": "Dark Magician the Pharaohs Servant",
    "set_name": "Magnificent Monsters",
    "set_code": "MAMO",
    "set_id": "24707",
    "card_number": "MAMO-EN001",
    "rarity": "Ultra Rare",
    "card_type": "Effect Monster",
    "product_type": "card",
    "variants": [
      "1st Edition"
    ],
    "card_text": "This card's name becomes \"Dark Magician\" while on the field or in the GY. You can only use 1 of the following effects of \"Dark Magician, the Pharaoh's Servant\" per turn, and only once that turn. If this card is in your hand: You can reveal 1 Spell in your hand; Special Summon this card, then you can Set 1 Spell/Trap that mentions \"Dark Magician\" from your Deck. (Quick Effect): You can discard 1 Spell; destroy all Spells/Traps your opponent controls.",
    "attack": "2500",
    "defense": "2100",
    "attribute": "DARK",
    "monster_type": "Spellcaster"
  },
  "images": {
    "languages": [
      "en"
    ]
  },
  "tcgplayer": {
    "prices": [
      {
        "low_price": 2.6,
        "mid_price": 4.99,
        "high_price": 40,
        "market_price": 3.23,
        "direct_low_price": null,
        "updated_at": "2026-09-30T20:39:18.568656+00:00",
        "sub_type_name": "1st Edition"
      }
    ],
    "url": "https://www.tcgplayer.com/product/714701/yugioh-magnificent-monsters-dark-magician-the-pharaohs-servant"
  },
  "cardmarket": {
    "product_name": "Dark Magician, the Pharaoh's Servant (V.1 - Ultra Rare)",
    "prices": [
      {
        "variant_type": "normal",
        "avg": 6.26,
        "low": 1.25,
        "trend": 0.02,
        "avg1": 6.41,
        "avg7": 9.47,
        "avg30": 9.66,
        "updated_at": "2026-09-30T14:49:49.858181+00:00"
      }
    ],
    "product_url": "https://www.cardmarket.com/en/YuGiOh/Products/Singles/Magnificent-Monsters/Dark-Magician-the-Pharaohs-Servant-V1-Ultra-Rare"
  }
}
One entry in tcgplayer.prices per finish, identified by sub_type_name, and one entry in cardmarket.prices per finish, identified by variant_type (normal, foil). updated_at is when that price last changed, not when it was last checked. A CardMarket-only card has tcgplayer: null and empty variants.
GET/ygo/images/:id

The card image, one resolution (X-Image-Size: unsized): the size parameter of the Pokémon image endpoint does not apply. Cached for 24 hours.

Example Request:

cURL
curl -H "X-API-Key: pk_live_your_key_here" \
     "https://api.pokewallet.io/ygo/images/ygo_9a3718ca91c2b4423f3bd02f650c59e4ee88601dc34d7cf38563f2a33db17bebe508528b418815d5975ee98f02fa261d04cec9" \
     --output card

Ultra endpoints

Available on Ultra and Business plans, or during the 7-day trial. The Pro plan covers Pokémon and One Piece only: with Pro these endpoints answer 403 with an upgrade_url. Ultra includes everything in Pro. Same parameters and response format as the Pokémon endpoints of the same name.

EndpointWhat it returns
GET /ygo/prices/:setTCGPlayer and CardMarket prices for every card of a set, one row per finish. ?source=tcg|cm
GET /ygo/sets/:set/statisticsPrice statistics and rarity breakdown. Sealed products excluded. ?variant=normal|foil
GET /ygo/sets/:set/completion-valueCost of one copy of every card in the set. Sealed products excluded.
GET /ygo/sets/trendingSets whose CardMarket prices moved most: 7-day average against 30-day average, cards from 1 € up. ?period=7d ?limit=
GET /ygo/analytics/top-cardsMost expensive cards, or fastest-growing on CardMarket (7-day average against 30-day average, cards from 1 € up; current_price is the 7-day average). ?metric=price|growth ?source=tcg|cm ?limit=
Price history is a Pokémon feature: for this game there is no /cards/:id/price-history. Current prices are in the card detail and in /ygo/prices/:set; metric=growth works with source=cm only, and trending supports period=7d only.

GET /ygo/prices/:set (first rows)

200 OK
{
  "success": true,
  "source": "both",
  "set_code": "MAMO",
  "set_id": "24707",
  "data": [
    {
      "id": "ygo_9a3718ca91c2b4423f3bd02f650c59e4ee88601dc34d7cf38563f2a33db17bebe508528b418815d5975ee98f02fa261d04cec9",
      "card_number": "MAMO-EN001",
      "name": "Dark Magician, the Pharaoh's Servant",
      "product_type": "card",
      "variant": "1st Edition",
      "tcgplayer": {
        "low_price": 2.6,
        "mid_price": 4.99,
        "high_price": 40,
        "market_price": 3.23,
        "direct_low_price": null,
        "updated_at": "2026-09-30T20:39:18.568656+00:00"
      },
      "cardmarket": {
        "avg": 6.26,
        "low": 1.25,
        "trend": 0.02,
        "avg1": 6.41,
        "avg7": 9.47,
        "avg30": 9.66,
        "updated_at": "2026-09-30T14:49:49.858181+00:00"
      }
    },
    {
      "id": "ygo_57511f682870f1384352f6179ca6b07c0d21be965845052bd23653b88bdf3cae3bc36087a7037b5c5c9dd76464aa97b253e1d9",
      "card_number": "MAMO-EN001",
      "name": "Dark Magician, the Pharaoh's Servant (Extended Art)",
      "product_type": "card",
      "variant": "1st Edition",
      "tcgplayer": {
        "low_price": 137.99,
        "mid_price": 178.96,
        "high_price": 450,
        "market_price": 149.33,
        "direct_low_price": null,
        "updated_at": "2026-09-30T20:39:18.568656+00:00"
      },
      "cardmarket": {
        "avg": 120.19,
        "low": 99.95,
        "trend": 101.9,
        "avg1": 134.3,
        "avg7": 130.47,
        "avg30": 130.47,
        "updated_at": "2026-09-30T14:49:49.858181+00:00"
      }
    },
    {
      "id": "ygo_c5442172fc9e80d37925fe3a4edc43fd0bff86dbb230e48cf302839f18edc6ee77da2da647cd60895f91d21d2595e74ebf9fdd",
      "card_number": "MAMO-EN001",
      "name": "Dark Magician, the Pharaoh's Servant (GMR)",
      "product_type": "card",
      "variant": "Normal",
      "tcgplayer": null,
      "cardmarket": {
        "avg": 15000,
        "low": 24989.49,
        "trend": 15000,
        "avg1": null,
        "avg7": null,
        "avg30": null,
        "updated_at": "2026-09-30T14:49:49.858181+00:00"
      }
    }
  ],
  "total": 234
}

GET /ygo/sets/:set/statistics

200 OK
{
  "set_info": {
    "name": "Magnificent Monsters",
    "set_code": "MAMO",
    "set_id": "24707",
    "total_cards": 228
  },
  "price_statistics": {
    "tcgplayer": {
      "avg_market_price": "66.09",
      "min_price": 0.1,
      "max_price": 5000,
      "most_expensive": {
        "id": "ygo_8223703af179aafc319780b7a0da99f0b25cc80d7c0770fec800f85cd6b1c1b2b4726f9f6990db204a4ca9a38984ed8d480a38",
        "name": "Winged Kuriboh Sabatiel LV10 (GMR)",
        "price": 5000
      }
    },
    "cardmarket": {
      "avg_price": "252.54",
      "min_price": 0.11,
      "max_price": 15000,
      "most_expensive": {
        "id": "ygo_c5442172fc9e80d37925fe3a4edc43fd0bff86dbb230e48cf302839f18edc6ee77da2da647cd60895f91d21d2595e74ebf9fdd",
        "name": "Dark Magician, the Pharaoh's Servant (GMR)",
        "price": 15000
      },
      "trend_direction": "stable"
    }
  },
  "rarity_breakdown": {
    "Ultra Rare": 138,
    "Grand Master Rare": 18,
    "Starlight Rare": 46,
    "Secret Rare": 26
  }
}

GET /ygo/sets/:set/completion-value

200 OK
{
  "set_info": {
    "name": "Magnificent Monsters",
    "set_code": "MAMO",
    "set_id": "24707",
    "total_cards": 228
  },
  "completion_cost": {
    "tcgplayer": {
      "currency": "USD",
      "low_estimate": 189772.1,
      "market_estimate": 171007.03,
      "high_estimate": 375141.96
    },
    "cardmarket": {
      "currency": "EUR",
      "low_estimate": 118951.11,
      "avg_estimate": 101620.96,
      "trend_estimate": 37853.28
    },
    "note": "One copy per card (base finish). TCGPlayer prices in USD, CardMarket prices in EUR. Cross-currency comparison not available."
  },
  "breakdown_by_rarity": {
    "Ultra Rare": {
      "count": 138,
      "total_cost": 993.78
    },
    "Grand Master Rare": {
      "count": 18,
      "total_cost": 5001
    },
    "Starlight Rare": {
      "count": 46,
      "total_cost": 8002.46
    },
    "Secret Rare": {
      "count": 26,
      "total_cost": 13.49
    }
  }
}

GET /ygo/analytics/top-cards

200 OK
{
  "metric": "price",
  "source": "tcg",
  "top_cards": [
    {
      "id": "ygo_8223703af179aafc319780b7a0da99f0b25cc80d7c0770fec800f85cd6b1c1b2b4726f9f6990db204a4ca9a38984ed8d480a38",
      "card_info": {
        "name": "Winged Kuriboh Sabatiel LV10 (GMR)",
        "clean_name": "Winged Kuriboh Sabatiel LV10 GMR",
        "set_name": "Magnificent Monsters",
        "set_code": "MAMO",
        "set_id": "24707",
        "card_number": "MAMO-EN006",
        "rarity": "Grand Master Rare",
        "card_type": "Effect Monster",
        "product_type": "card",
        "variants": [
          "1st Edition"
        ],
        "card_text": "You can reveal this card in your hand and pay half your LP; add 1 \"Polymerization\" Spell or \"Fusion\" Spell from your Deck to your hand, and if you do, shuffle this card into the Deck, also for the rest of this turn, you cannot Special Summon from the Extra Deck, except \"HERO\" monsters. During your opponent's turn, if your LP are 1000 or less (Quick Effect): You can Special Summon this card from your hand, then you can inflict damage to your opponent equal to the highest ATK among the monsters they control. You can only use each effect of \"Winged Kuriboh Sabatiel LV10\" once per turn.",
        "attack": "300",
        "defense": "200",
        "attribute": "LIGHT",
        "monster_type": "Fairy"
      },
      "current_price": 5000
    },
    {
      "id": "ygo_d83dc4e4fa55aa433ac4605dd7b2753e9090c2b1abba39583707349e938d7c13b50f8bf48cddf05fce458cdf800bcc91",
      "card_info": {
        "name": "Black Rose Dragon (Ghost Rare)",
        "clean_name": "Black Rose Dragon Ghost Rare",
        "set_name": "Crossroads of Chaos",
        "set_code": "CSOC",
        "set_id": "158",
        "card_number": "CSOC-EN039",
        "rarity": "Ghost Rare",
        "card_type": "Synchro/Effect Monster",
        "product_type": "card",
        "variants": [
          "1st Edition",
          "Unlimited"
        ],
        "card_text": "1 Tuner + 1 or more non-Tuner monsters\r\n<br>When this card is Synchro Summoned, you can destroy all cards on the field. Once per turn, you can remove from play 1 Plant-Type monster from your Graveyard to change 1 monster your opponent controls to face-up Attack Position, and reduce its ATK to 0 until the End Phase.",
        "attack": "2400",
        "defense": "1800",
        "attribute": "FIRE",
        "monster_type": "Dragon"
      },
      "current_price": 1499.09
    },
    {
      "id": "ygo_7ff73e5dab2d5fead97db9c226bdd065649303f1759447a621567f33e9e737b06695cc65a9cc5a2e823b0f2b46ae",
      "card_info": {
        "name": "Blue-Eyes White Dragon (Dark Duel Stories)",
        "clean_name": "Blue Eyes White Dragon Dark Duel Stories",
        "set_name": "Yu-Gi-Oh! Video Game Promotional Cards",
        "set_code": "VDP",
        "set_id": "1921",
        "card_number": "DDS-001",
        "rarity": "Prismatic Secret Rare",
        "card_type": "Normal Monster",
        "product_type": "card",
        "variants": [
          "Unlimited"
        ],
        "card_text": "<em>This legendary dragon is a powerful engine of destruction. Virtually invincible, very few have faced this awesome creature and lived to tell the tale.</em>",
        "attack": "3000",
        "defense": "2500",
        "attribute": "LIGHT",
        "monster_type": "Dragon"
      },
      "current_price": 1450.56
    }
  ]
}

GET /ygo/analytics/top-cards?metric=growth&source=cm

200 OK
{
  "metric": "growth",
  "source": "cm",
  "top_cards": [
    {
      "id": "ygo_f260d6bf06b66ba33234a65e4ab1a3419645ee082a8be0c264a95d961c69c44b1cf89c231a079f65f27aabf1caf86e0616",
      "card_info": {
        "name": "Jerry Beans Man",
        "clean_name": "Jerry Beans Man",
        "set_name": "Dark Revelation Volume 4",
        "set_code": "DR04",
        "set_id": "1279",
        "card_number": "DR04-EN004",
        "rarity": "Common",
        "card_type": "Normal Monster",
        "product_type": "card",
        "variants": [
          "Unlimited"
        ],
        "card_text": "Jerry, a bean soldier, believes he is the strongest warrior in the world, but his true abilities are still untested.",
        "attack": "1750",
        "defense": "0",
        "attribute": "EARTH",
        "monster_type": "Plant"
      },
      "current_price": 134.11,
      "change_7d": "+433.9%"
    },
    {
      "id": "d069f3c9f9d02f573d7ba6f3d8754adfd22f17c08cb626bda54d425ca33573ea",
      "card_info": {
        "name": "Worm Bait",
        "clean_name": "Worm Bait",
        "set_name": "5D's Tag Force 4 Promotional Cards",
        "set_code": "tf04",
        "set_id": "-45",
        "card_number": "002",
        "rarity": null,
        "card_type": null,
        "product_type": "card",
        "variants": [],
        "card_text": null
      },
      "current_price": 9.69,
      "change_7d": "+402.1%"
    },
    {
      "id": "ygo_22e2be379321c4d637efb9921ebb8e167caf0fd8cc35d04f02757713a561bc15981a94fd1e816427351fca8b91",
      "card_info": {
        "name": "The Statue of Easter Island",
        "clean_name": "The Statue of Easter Island",
        "set_name": "Tournament Pack 1",
        "set_code": "TP1",
        "set_id": "333",
        "card_number": "TP1-019",
        "rarity": "Common",
        "card_type": "Normal Monster",
        "product_type": "card",
        "variants": [
          "Unlimited"
        ],
        "card_text": "<em>A stone monument from Easter Island that launches laser blasts from its rock-hewn lips.</em>",
        "attack": "1100",
        "defense": "1400",
        "attribute": "EARTH",
        "monster_type": "Rock"
      },
      "current_price": 12.76,
      "change_7d": "+381.5%"
    }
  ]
}

GET /ygo/sets/trending

200 OK

Data Notes

Prices. TCGPlayer and CardMarket prices are refreshed daily. CardMarket has one entry per finish (normal, foil); a finish CardMarket does not price is left out, so cardmarket.prices can be empty. updated_at is when that price last changed, not when it was last checked: a stable price keeps an older date.
product_type. Cards and sealed products are told apart using TCGPlayer data, then CardTrader. Tokens, emblems and oversized cards count as "card". For the very few products whose type cannot be determined, product_type is null, not "card".
CardMarket-only sets. Sets with a negative set_id exist only on CardMarket: their cards have 64-character IDs and tcgplayer: null.
Missing links. cardmarket.product_url is absent for some cards; the card data is still valid. Sets with no cards are not listed: they appear as soon as cards are added.

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

200
OK

Request successful

400
Bad Request

Invalid parameters or malformed request

401
Unauthorized

Missing or invalid API key

403
Forbidden

Paid endpoint without the required plan or an active trial: Pro for Pokémon and One Piece, Ultra for the other games. The body includes redeem_url (trial not activated yet) or upgrade_url (trial expired).

404
Not Found

Card, set or image does not exist

405
Method Not Allowed

The API only accepts GET requests.

409
Conflict

/sets/:setCode/image: the set code matches several sets. Retry with ?language= or the numeric set_id.

429
Too Many Requests

Rate limit exceeded

500
Internal Server Error

Something went wrong on our side

502
Bad Gateway

An image could not be fetched from its source. Temporary: retry later.

Errors on game endpoints (/mtg, /ygo, …)

StatuserrorWhen
400Invalid or corrupted card IDID is neither <game>_… nor 64 hex, or belongs to another game
400Query parameter requiredq missing, shorter than 2 or longer than 100 characters
400Search query rejectedq contains SQL-like text: rephrase it
400Invalid or corrupted card ID + did_you_meanThe ID belongs to another game (e.g. a lor_… ID on /mtg/cards): did_you_mean has the right path
404Set not found + suggestionsNo set with that set_id/set_code. If you wrote the set name, suggestions lists the matching sets with their set_id
404Card not found, Image not foundCard or image does not exist
502Image not availableImage source temporarily unreachable
503Search temporarily unavailableThe search took too long under load. Retry after the seconds in the Retry-After header, or use more specific words

Error Response Format

Every error has error (short, stable) and message (what to fix). When the API can tell what you meant, did_you_mean contains the corrected path:

// GET /magic/sets
  {
    "error": "Endpoint not found",
    "message": "Did you mean /mtg/sets?",
    "did_you_mean": "/mtg/sets",
    "docs": "https://pokewallet.io/api-docs"
  }

Authentication errors (401) also include an example request. A trailing slash is ignored: /sets/ and /sets are the same endpoint.

Best Practices

Use Environment Variables

Never hardcode API keys. Always use environment variables or secure secret management.

Handle Rate Limits Gracefully

Implement exponential backoff when you receive a 429 response. Check rate limit headers to avoid hitting limits.

Cache Results

Cache API responses when appropriate to reduce requests and improve performance.

Use Search Endpoint

Always use /search for the most complete and accurate data.

Monitor Your Usage

Check your dashboard regularly to track API usage and avoid unexpected rate limit hits.

Error Handling

Always implement proper error handling for network failures, rate limits, and invalid responses.

Security Reminder: Keep your API keys secure. If you suspect a key has been compromised, revoke it immediately from your dashboard and generate a new one.

Need Help?

If you have questions or run into issues, we're here to help!