API Directory › 🎮 Games › Scryfall
No authHTTPSCORS

Scryfall API

Comprehensive Magic: The Gathering card data and images — no key.

Category
Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Scryfall docs ↗

What it does

Scryfall is a comprehensive Magic: The Gathering card API. Search the entire card database with Scryfall’s powerful query syntax, fetch any card by name or ID, get every printing, prices, rulings, set data and high-resolution card images.

Base URL

https://api.scryfall.com

Authentication

None. Scryfall is free and keyless. They ask that you set a descriptive User-Agent and an Accept header, and that you insert 50–100 ms between requests.

Code examples

curl
curl -s "https://api.scryfall.com/cards/named?fuzzy=sol+ring" \
  -H "User-Agent: MyApp/1.0" -H "Accept: application/json"
Python
import requests, time

S = requests.Session()
S.headers.update({"User-Agent": "MyApp/1.0", "Accept": "application/json"})

def search(q):
    url = "https://api.scryfall.com/cards/search"
    while url:
        r = S.get(url, params={"q": q} if "?" not in url else None, timeout=10)
        r.raise_for_status()
        data = r.json()
        yield from data["data"]
        url = data.get("next_page")
        time.sleep(0.1)

for c in search("t:legendary c:r cmc<=3"):
    print(c["name"], c["mana_cost"])
JavaScript
const res = await fetch(
  "https://api.scryfall.com/cards/named?fuzzy=sol+ring",
  { headers: { "User-Agent": "MyApp/1.0", Accept: "application/json" } }
);
const card = await res.json();
console.log(card.name, card.prices.usd, card.image_uris?.normal);

Rate limits & quotas

No key, but Scryfall asks for 50–100 ms between requests (about 10 req/s max) and a real User-Agent. Ignore this and you’ll get 429s and eventually an IP block. For bulk needs, download their daily bulk data files (all cards as one JSON) instead of crawling the API.

Key response fields

name / mana_cost / type_line / oracle_textCore card text
colors / color_identityFor deck-building and Commander legality
image_uris.normal / .art_cropCard images (double-faced cards use card_faces[] instead)
prices.usd / .usd_foil / .eur / .tixLatest prices from partner marketplaces
set / set_name / rarity / collector_numberPrinting details
legalitiesFormat-by-format legal / not_legal / banned / restricted
next_page (on /cards/search)Cursor URL for the next 175 results

Common errors

404No card matches — /cards/named?fuzzy= is forgiving; ?exact= is not.
422Malformed search query (bad Scryfall syntax).
429Requesting too fast. Add the 50–100 ms delay.

When to use it (and alternatives)

Scryfall is the standard for anything MTG — deck builders, price trackers, collection tools, Discord bots. For game rules logic use the comprehensive rules text; for other card games see the Pokémon TCG API or the Yu-Gi-Oh! (YGOPRODeck) API.

FAQ

Does Scryfall require an API key?

No. It’s free and open. Just send a descriptive User-Agent and keep to ~10 requests per second.

How do I get all cards without hammering the API?

Use the bulk data endpoint (/bulk-data) — it links daily-updated files containing every card as a single JSON download.

Why does a card have no image_uris?

Double-faced and split cards put images under card_faces[0].image_uris and card_faces[1].image_uris instead of the top level.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related Games APIs

← Back

More Games APIs · All 196 APIs