A local mirror of the Scryfall API.
MTG-DB mirrors Scryfall's card data and re-implements its API on your own server.
Point your apps at this host instead of api.scryfall.com — same
JSON shapes, same routes, no external rate limits.
Drop-in compatible
Your API base URL for this mirror is:
https://api.dtmdeck.com
Swap it in wherever your apps currently call https://api.scryfall.com.
Returned objects keep Scryfall's exact JSON shape, and every Scryfall API/image URL in
the response is rewritten to point back at this server.
What it does
Automatic daily sync
Downloads Scryfall's bulk data (default_cards + rulings) and
refreshes sets every day. Idempotent upserts — safe to re-run.
Full card & set lookups
By Scryfall ID, set + collector number, multiverse / Arena / MTGO / TCGplayer / Cardmarket IDs, exact / fuzzy name, and batch collection lookup.
Scryfall search syntax
A pragmatic subset of /cards/search: colors, types, oracle text,
mana value, power/toughness, rarity, is:, with OR,
negation, and grouping.
Local image mirror
Card images are cached to local disk on first request and served locally thereafter — no repeated CDN hits.
Quick example
# Find a card by exact name
curl "https://api.dtmdeck.com/cards/named?exact=Black+Lotus"
# Search: red cards with mana value 1 or less, cheapest first
curl "https://api.dtmdeck.com/cards/search?q=c:r+mv<=1&order=cmc"
# A card's image (cached locally after the first request)
curl "https://api.dtmdeck.com/cards/<id>/image/normal" --output card.jpg
Full endpoint reference, search operators, and integration notes are on the documentation page.