Magic: The Gathering Card Database & Pricing API - Scryfall avatar

Magic: The Gathering Card Database & Pricing API - Scryfall

Pricing

from $0.40 / 1,000 record scrapeds

Go to Apify Store
Magic: The Gathering Card Database & Pricing API - Scryfall

Magic: The Gathering Card Database & Pricing API - Scryfall

Magic: The Gathering card database with search, name/ID lookup, set walks, and bulk corpus dumps via Scryfall. Returns mana cost, oracle text, format legality (Standard/Modern/Commander/etc), and USD/EUR/TIX prices, plus TCGPlayer and Cardmarket IDs for joins.

Pricing

from $0.40 / 1,000 record scrapeds

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 hours ago

Last modified

Share

Magic: The Gathering Card Database & Pricing API — Scryfall

Pull structured Magic: The Gathering card data from Scryfall, the card database every serious MTG deck-builder already relies on. Search by query syntax, look up cards by name or ID, walk an entire set, or pull a full corpus dump — all six modes return the same clean row: mana cost, oracle text, format legality across 20+ formats, and USD/EUR/TIX prices.


Scryfall MTG Cards Scraper Features

  • Searches with full Scryfall query syntax — c:r t:creature cmc:3 f:standard and friends
  • Looks up cards by exact name, fuzzy name, or Scryfall ID, and skips a bad entry in a batch instead of failing the whole run
  • Walks every printing in a set by three-letter code
  • Pulls the full card corpus via a bulk dump — oracle text only, full reprint history, or every language and variant
  • Returns format legality for Standard, Modern, Commander, Pioneer, Pauper, Legacy, Vintage, and 15 more formats in one field
  • Includes USD, USD foil, EUR, and MTGO (tix) prices, plus TCGPlayer, Cardmarket, MTGO, and Arena IDs for joining against other data sources

Who Uses Magic: The Gathering Card Data?

  • Deck-building tool developers — power a card search box or price tracker without maintaining your own card corpus
  • Collectors and sellers — cross-reference TCGPlayer and Cardmarket IDs to compare prices across marketplaces, or track a want-list's value over time
  • Content creators and set reviewers — walk a new set the day it's indexed and pull every card's text and art in one pass
  • Format and metagame analysts — filter by format legality to build Standard or Commander card pools, which is the tedious part nobody enjoys doing by hand
  • Data engineers — bulk-ingest the whole catalogue (or just Oracle text) as a seed table for a larger MTG dataset

How Scryfall MTG Cards Scraper Works

  1. Pick a mode — Search Query, By Name, By Scryfall ID, Walk a Set, Bulk Dump, or Random Card.
  2. Give it the matching input: a query string, a list of names or IDs, a set code, or a bulk dump type. Everything else is optional.
  3. The scraper paginates or streams through the results and stops once it reaches your Max Items cap, so a five-card test run and a full-set walk cost exactly what they should.
  4. You get back one flat row per card printing — same field set regardless of which mode you ran.

Input

{
"mode": "search",
"query": "t:creature f:standard",
"maxItems": 50
}
FieldTypeDefaultDescription
modeStringsearchsearch, by_name, by_id, set_walk, bulk, or random
queryStringt:creatureScryfall query syntax. Required when mode is Search Query
cardNamesArray—Card names to look up. Required when mode is By Name
fuzzyNameBooleanfalseWhen mode is By Name, match loosely instead of requiring the exact name
cardIdsArray—Scryfall card IDs to fetch. Required when mode is By Scryfall ID
setCodeString—Three-letter set code (eld, znr). Required when mode is Walk a Set
bulkTypeStringoracle_cardsoracle_cards, unique_artwork, default_cards, or all_cards. Used when mode is Bulk Dump
includePricesBooleantrueInclude USD/EUR/TIX prices in the output
maxItemsInteger15Maximum cards to return. 0 = unlimited (Random Card mode caps at 50 regardless)

By name, skipping a miss

{
"mode": "by_name",
"cardNames": ["Llanowar Elves", "Lightning Bolt", "Not A Real Card"],
"fuzzyName": false
}

A name that doesn't resolve is logged and skipped — the other two still come back.

Walking a whole set

{
"mode": "set_walk",
"setCode": "eld",
"maxItems": 0
}

Bulk corpus dump

{
"mode": "bulk",
"bulkType": "oracle_cards",
"maxItems": 0
}

Scryfall MTG Cards Scraper Output Fields

Every mode returns the same row shape — one object per card printing.

{
"id": "6a0b230b-d391-4998-a3f7-7b158a0ec2cd",
"oracle_id": "68954295-54e3-4303-a6bc-fc4547a4e3a3",
"name": "Llanowar Elves",
"lang": "en",
"released_at": "2024-11-15",
"mana_cost": "{G}",
"cmc": 1,
"type_line": "Creature — Elf Druid",
"oracle_text": "{T}: Add {G}.",
"power": "1",
"toughness": "1",
"colors": ["G"],
"legalities": { "standard": "legal", "modern": "legal", "commander": "legal", "pauper": "legal" },
"set": "fdn",
"set_name": "Foundations",
"collector_number": "227",
"rarity": "common",
"artist": "Larry MacDougall",
"prices": { "usd": "0.15", "usd_foil": "0.49", "eur": "0.13", "tix": "0.02" },
"tcgplayer_id": 557921,
"cardmarket_id": 795132,
"scryfall_uri": "https://scryfall.com/card/fdn/227/llanowar-elves"
}
FieldTypeDescription
idStringScryfall card ID (unique per printing)
oracle_idStringScryfall oracle ID (stable across every reprint of this card)
nameStringCard name
langStringLanguage code
released_atStringRelease date of this printing
layoutStringCard layout (normal, transform, split, …)
mana_costStringMana cost string
cmcNumberConverted mana cost / mana value
type_lineStringFull type line
oracle_textStringRules text
power / toughness / loyaltyStringCreature or planeswalker stats where applicable
colors / color_identityArrayCard colors and Commander color identity
keywordsArrayKeyword abilities on this printing
legalitiesObjectFormat legality map — Standard, Modern, Commander, Pioneer, Pauper, Legacy, Vintage, and 17 more formats
set / set_name / set_typeStringSet code, name, and type
collector_numberStringCollector number within the set
rarityStringcommon, uncommon, rare, mythic, or special
artistStringCard illustrator
pricesObjectUSD, USD foil, USD etched, EUR, EUR foil, and MTGO (tix) prices
tcgplayer_id / cardmarket_id / mtgo_id / arena_idNumberMarketplace and platform IDs for joining against other datasets
image_urisObjectImage URLs at several sizes
card_facesStringJSON-encoded face data for double-faced, split, or flip cards — empty for single-faced cards
scryfall_uriStringPermalink to this card on scryfall.com
rulings_uri / prints_search_uriStringAPI URLs for this card's rulings and other printings
edhrec_rankNumberEDHRec popularity rank — lower is more popular

FAQ

How do I search for Magic: The Gathering cards by query?

Set mode to Search Query and give it a query using Scryfall's syntax — color, type, mana value, and format filters all combine, so c:r t:creature cmc:3 f:standard returns red three-mana creatures legal in Standard. Format legality and prices come back on every row.

How much does Scryfall MTG Cards Scraper cost to run?

It's floor-priced — a small per-record charge on top of a flat start fee, with no account or API key required to run it. A maxItems test run of five cards costs a few thousandths of a dollar.

Can I get every printing of a card, not just one?

Yes. Use Walk a Set with a three-letter set code to get every card in that set, or fetch the whole corpus with Bulk Dump and unique_artwork / default_cards, which return one row per distinct printing instead of one row per card name.

What happens if I look up a card name that doesn't exist?

By Name and By Scryfall ID modes skip a miss and keep going — a typo in a list of fifty names costs you one missing row, not a failed run.

Do I need an account or API key for Scryfall?

No. Scryfall is a public, unauthenticated API, and this scraper needs nothing from you beyond the input fields above.


Need More Features?

Need a mode this doesn't cover, or want it paired with TCGPlayer or Cardmarket pricing? File an issue or get in touch.

Why Use Scryfall MTG Cards Scraper?

  • Floor-priced — a fraction of a cent per card, cheaper than maintaining your own polite fetcher with rate-limit retries
  • Six modes in one schema — search, name lookup, ID lookup, set walks, bulk dumps, and random pulls all return the same row shape, so switching modes doesn't mean rewriting your downstream code
  • Join-ready output — TCGPlayer, Cardmarket, MTGO, and Arena IDs ship on every row, which is most of the work of combining this with a pricing or collection tool already done