Scryfall REST API Methods

Scryfall exposes the following REST API methods at https://api.scryfall.com. For information about the object types returned by these methods, please see the API Overview.

Request Formats

Several API endpoints that return cards support a format parameter to request cards in a different media type. The possible formats are:

  • json: Request a JSON blob with full information.

  • csv: Request a CSV blob with tabular information

  • text: Request a plaintext version of the card. The API will return a copy-pasteable text snippet.

  • image: Request the card as an image. The API will return an HTTP 302 Found response, and redirect you to a URL that contains a JPEG image of the card.

When you request the text or image format, the API will also set two additional HTTP headers:

  • X-Scryfall-Card: A URI the Scryfall permapage for the returned card.
  • X-Scryfall-Card-Image: A URI to a JPEG image of the returned card.

When you request the csv format, the API will set these additional additional HTTP headers:

  • X-Scryfall-Has-More: Will have the value true if there is another page of CSV data beyond this one
  • X-Scryfall-Next-Page: A URI to the next CSV page

/cards/named?{fuzzy,exact}=X → Card

Supported formats: json, text, image

Returns a Card based on a name search string. This method is designed for building chat bots, forum bots, and other services that need card details quickly.

If you provide the exact parameter, a card with that exact name is returned. Otherwise, a 404 Error is returned because no card matches.

If you provide the fuzzy parameter and a card name matches that string, then that card is returned. If not, a fuzzy search is executed for your card name. The server allows misspellings and partial words to be provided. For example: jac bel will match Jace Beleren.

When fuzzy searching, a card is returned if the server is confident that you unambiguously identified a unique name with your string. Otherwise, you will receive a 404 Error object describing the problem: either more than 1 one card matched you search, or zero cards matched.

For both exact and fuzzy, card names are case-insensitive and punctuation is optional (you can drop apostrophes and periods). For example: fIReBALL is the same as Fireball and smugglers copter is the same as Smuggler's Copter.

/cards/autocomplete?q=X → Catalog

Supported formats: json

Returns a Catalog object containing up to 25 full card names that could be autocompletions of the given string parameter q.

This method is designed for creating assistive UI elements that allow users to free-type card names.

The names are sorted with the nearest match first.

Spaces, punctuation, and capitalization are ignored.

If q is less than 2 characters long, or if no names match, the Catalog will contain 0 items (instead of returning any errors).

/cards/:set/:collector_number → Card

/cards/multiverse/:multiverse_id → Card

/cards/mtgo/:mtgo_id → Card

/cards/:id → Card

Supported formats: json, text, image

Returns a single Card object. The URL path may use the card’s set and collector_number, the card’s multiverse_id, the card’s mtgo_id, or the card’s Scryfall id.

Returns a 404 Error for invalid routes and IDs.

/cards/random → Card

Supported formats: json, text, image

Returns a single random Card object.

Supported formats: json and csv

Returns a cards found using the fulltext search string parameter q. This string supports the same fulltext search system that the main site uses.

An optional parameter sort may be provided, to sort card results by name (default), set, tix, usd, eur, cmc, pow, tou, rarity, or color.

If only one card is found, this method will still return a List.

If using the json format, review the documentation for paginating the JSON List type, and the Error type type to understand all of the possible output from this method.

/cards?page=X → List[Card]

Supported formats: json

Returns a List object that contains all cards in Scryfall’s database. This methods is paginated, returning 150 cards at a time. The cards are ordered roughly newest to oldest. Review the documentation for paginating the List type.

Scryfall currently has 35,619 cards which means this endpoint has 238 pages. This represents more than 150 MB of JSON data, beware your memory and storage limits if you are downloading the entire database.

Every card type is returned, including planar cards, schemes, Vanguard cards, tokens, emblems, and funny cards. Make sure you’ve reviewed documentation for the Card type.

/sets → List[Set]

Supported formats: json

Returns a List object that contains every Set on Scryfall. This method accepts no parameters.

/sets/:code → Set

Supported formats: json

Returns the Set with the given code. This method accepts no parameters.

/symbology → List[CardSymbol]

Supported formats: json

Returns a List object that contains all Magic CardSymbols that Scryfall currently processes. Refer to the documentation for CardSymbol for more information.

This method accepts no parameters.

/symbology/parse-mana?cost=X → ManaCost

Supported formats: json

Parses the given mana cost parameter and returns Scryfall’s interpretation.

The server understands most community shorthand for mana costs (such as 2WW for {2}{W}{W}). Symbols can also be out of order, lowercase, or have multiple colorless costs (such as 2{g}2 for {4}{G}).

The server will return an object that describes the mana cost, including a new cost string with the normalized and correctly-ordered mana symbols, the cmc, the colors, and if Scryfall thinks the mana cost is colorless, monocolored, or multicolored.

If part of the string could not be understood, the server will return an Error object describing the problem.

/catalog/card-names → Catalog

Supported formats: json

Returns a Catalog object that contains an array of all English Magic card names. The names are drawn from Scryfall’s current databases, updated as soon as we have a new card name entered for any set.

This catalog has more than 10,000 items; beware your memory limits.

/catalog/creature-types → Catalog

Supported formats: json

Returns a Catalog object that contains an array of all creature types. Values are drawn from the official rules. This method accepts no parameters.

/catalog/land-types → Catalog

Supported formats: json

Returns a Catalog object that contains an array of all land types. Values are drawn from the official rules. This method accepts no parameters.

/catalog/planeswalker-types → Catalog

Supported formats: json

Returns a Catalog object that contains an array of all planeswalker types. Values are drawn from the official rules. This method accepts no parameters.

/catalog/word-bank → Catalog

Supported formats: json

Returns a Catalog object that contains every word longer than 3 letters that appears in a Magic card name.

Values are collected from all cards currently in Scryfall’s database. This catalog has more than 10,000 items; beware your memory limits. This method accepts no parameters.

/catalog/powers → Catalog

Supported formats: json

Returns a Catalog object that contains an array of all possible values for a card’s power. Note that some cards have noninteger powers like * or 1+*.

Values are collected from all cards currently in Scryfall’s database. This method accepts no parameters.

/catalog/toughnesses → Catalog

Supported formats: json

Returns a Catalog object that contains a list of all possible values for a card’s toughness. Note that some cards have noninteger toughnesses like *.

Values are collected from all cards currently in Scryfall’s database. This method accepts no parameters.

/catalog/loyalties → Catalog

Supported formats: json

Returns a Catalog object that contains a list of all possible values for a card’s loyalty. The values will be strings.

Values are collected from all cards currently in Scryfall’s database. This method accepts no parameters.

Supported formats: json

Returns a List of objects representing the featured links on Scryfall’s homepage. This method accepts no parameters.