Skip to content
· 10 min read

Magic: The Gathering API in 2026 — The Complete Developer Guide

Compare every Magic: The Gathering API available in 2026. From Scryfall to MTGJSON to TCG API — find the right API for your MTG project.

guidemagic the gatheringcomparisonapi

Building a Magic: The Gathering app? You need card data, and there are several APIs to choose from. Each one has different strengths — some focus on card metadata, others on images, and others on pricing.

This guide covers every major MTG API available in 2026, what each does best, and how to pick the right one for your project.

Why Developers Need MTG APIs

The Magic: The Gathering ecosystem is massive. Over 27,000 unique cards across 30+ years of sets, multiple printings of the same card, foils, alternate art, and prices that fluctuate daily. Manually maintaining this data is impossible.

Common use cases for MTG APIs include:

  • Deck builders — Card search, mana costs, oracle text, legality
  • Collection managers — Track what you own and what it’s worth
  • Price trackers — Monitor market values and find deals
  • Store tools — Inventory management, price comparisons
  • Analytics — Metagame analysis, price trends, set EV calculators

No single API does everything perfectly. Here’s what each one brings to the table.

Scryfall

Scryfall is the most popular MTG API and for good reason. It has excellent card data, high-quality images, and a well-designed API.

What it offers:

  • Complete MTG card database with oracle text, rulings, and legality
  • High-resolution card images (normal, art crop, border crop, etc.)
  • Fuzzy name matching and full-text search
  • Bulk data downloads (JSON dumps updated daily)
  • Price data sourced from TCGPlayer, Cardmarket, and Cardhoarder

Limitations:

  • Magic: The Gathering only — no Pokemon, Yu-Gi-Oh!, or other games
  • Pricing data is delayed (not real-time market prices)
  • No historical price data or price change tracking
  • Rate limit: 10 requests per second (generous but no paid tier for higher limits)

Best for: Deck builders, card databases, and apps that need rich card metadata and images.

// Scryfall example: search for a card
const response = await fetch(
'https://api.scryfall.com/cards/named?fuzzy=lightning+bolt'
);
const card = await response.json();
console.log(card.name); // "Lightning Bolt"
console.log(card.prices.usd); // "1.23"

MTGJSON

MTGJSON takes a different approach — instead of a REST API, it provides downloadable JSON files containing the entire MTG card database.

What it offers:

  • Complete MTG card and set data in JSON format
  • Regularly updated bulk downloads
  • Detailed card metadata including foreign language printings
  • TCGPlayer and Cardmarket price data in separate downloads
  • Open source

Limitations:

  • Bulk downloads only — no REST API for individual queries
  • You need to host and index the data yourself
  • Magic: The Gathering only
  • Pricing is in bulk snapshots, not real-time
  • No search functionality — you build that yourself

Best for: Projects that need complete offline data, custom search engines, or want to avoid API rate limits by hosting the data locally.

magicthegathering.io

magicthegathering.io is one of the original MTG APIs. It provides a straightforward REST API for card data.

What it offers:

  • REST API with card search and filtering
  • Basic card data (name, text, colors, types)
  • No authentication required

Limitations:

  • Deprecated/unmaintained — data updates have been inconsistent
  • No pricing data
  • Missing newer sets
  • Magic: The Gathering only
  • Slower response times compared to alternatives

Best for: Legacy projects already using it. For new projects, Scryfall or TCG API are better choices.

TCG API

TCG API focuses on what the other APIs lack: real-time market pricing across multiple games.

What it offers:

  • Real-time market pricing from TCGPlayer (updated daily for top games)
  • 89+ games including Magic, Pokemon, Yu-Gi-Oh!, Lorcana, Flesh & Blood, One Piece, and more
  • Normal and Foil prices tracked separately
  • Price change data (24h, 7d, 30d)
  • Card search with filtering by game, set, and name
  • Price movers endpoint (biggest gainers and losers)
  • Bulk price data endpoints (Pro tier and above)

Limitations:

  • Focused on pricing — card metadata is less detailed than Scryfall for MTG-specific fields (oracle text, rulings, legality)
  • No card images hosted (provides TCGPlayer product URLs)
  • Requires API key (free tier: 100 req/day)

Best for: Price tracking, collection valuation, store tools, and any project that needs pricing across multiple TCGs.

// TCG API example: get Magic card prices
const API_KEY = 'your-api-key';
const response = await fetch(
'https://api.tcgapi.dev/v1/search/cards?q=lightning+bolt&game=magic&per_page=3',
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
);
const data = await response.json();
data.data.forEach(card => {
console.log(`${card.name} (${card.set_name})`);
for (const [printing, prices] of Object.entries(card.prices || {})) {
console.log(` ${printing}: $${prices.market_price.toFixed(2)}`);
}
});

Feature Comparison

Here’s how the APIs stack up across key features:

Card Data & Search

  • Scryfall — Excellent. Full oracle text, rulings, legality, fuzzy search
  • MTGJSON — Excellent data, but no search API (bulk download only)
  • magicthegathering.io — Basic card data, outdated
  • TCG API — Good card data, full-text search with game/set filters

Card Images

  • Scryfall — High-res images in multiple crops
  • MTGJSON — No images (links to Scryfall/Gatherer)
  • magicthegathering.io — Basic images
  • TCG API — Links to TCGPlayer product pages

Pricing

  • Scryfall — Basic (delayed, no history)
  • MTGJSON — Bulk snapshots (no real-time)
  • magicthegathering.io — None
  • TCG API — Real-time market prices with 24h/7d/30d changes

Multi-Game Support

  • Scryfall — MTG only
  • MTGJSON — MTG only
  • magicthegathering.io — MTG only
  • TCG API — 89+ games (Pokemon, Yu-Gi-Oh!, Lorcana, etc.)

Rate Limits

  • Scryfall — 10 req/sec (free, no paid tier)
  • MTGJSON — N/A (bulk download)
  • magicthegathering.io — Varies (unreliable)
  • TCG API — 100 req/day free, up to 50K/day on paid plans

When to Use Each API

Use Scryfall when you’re building a deck builder, card database, or any app where rich MTG card metadata (oracle text, rulings, legality) is the priority. Scryfall is the gold standard for MTG card data.

Use MTGJSON when you want to host the data yourself, need offline access, or are building a custom search engine. Great for apps that need the full card database without making API calls.

Use TCG API when pricing is important to your project. If you’re building a collection tracker, price alert system, store tool, or anything that needs to know what cards are worth — and especially if you want to support multiple games beyond just Magic — TCG API is the right choice.

Combine them for the best of both worlds. Many developers use Scryfall for card data and images alongside TCG API for pricing. The APIs complement each other well.

Getting Started with TCG API for Magic

Here’s a quick example that fetches the most valuable Magic cards from a specific set:

const API_KEY = 'your-api-key';
const BASE_URL = 'https://api.tcgapi.dev/v1';
async function getSetPrices(setSlug) {
const response = await fetch(
`${BASE_URL}/games/magic/sets/${setSlug}/cards?sort=price_desc&per_page=10`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
);
const data = await response.json();
console.log(`Top 10 Most Valuable Cards:\n`);
data.data.forEach((card, i) => {
const price = card.prices?.Normal?.market_price || card.prices?.Foil?.market_price || 0;
console.log(`${i + 1}. ${card.name} — $${price.toFixed(2)}`);
});
}
getSetPrices('foundations');

For a deeper dive into building with TCG API, check out:

Get Started

Ready to add pricing to your Magic project? Sign up for a free TCG API key and follow the quickstart guide. The free tier gives you 100 requests per day to test with, and paid plans start at $9.99/month when you need more.


Questions about choosing the right API? Join us on Discord — we’re happy to help you figure out the best stack for your project.

Ready to get started?

Free tier includes 100 requests per day. No credit card required.