Crate scryfall[][src]

Scryfall provides a REST-like API for ingesting our card data programatically. The API exposes information available on the regular site in easy-to-consume formats.


The main way to fetch cards from this API is the Card struct.

This allows you to get cards from scryfall using all of their available REST Apis

use scryfall::card::Card;
match Card::named_fuzzy("Light Bolt") {
    Ok(card) => assert_eq!(, "Lightning Bolt"),
    Err(e) => panic!(format!("{:?}", e))


You can also fetch information about a card set.

The available routes for this can be seen on Set

use scryfall::set::Set;
assert_eq!(Set::code("mmq").unwrap().name, "Mercadian Masques")


Finally scryfall also allows you to fetch catalogs which are collections of Magic the Gathering data points.

For example, one could fetch all available card names.

use scryfall::catalog::Catalog;
assert!(Catalog::card_names().unwrap().data.len() > 0)

One of the main features of scryfall is it's advanced search. For this the card_searcher module provides a type safe api to interact and query the search engine.


pub use error::Result;



Scryfall provides daily exports of their card data in bulk files. Each of these files is represented as a bulk_data object via the API. URLs for files change their timestamp each day, and can be fetched programmatically.


This module provides a defenition of a Magic: The Gathering card, as well as, ways to fetch them from scryfall.


This module provides an abstraction over the search parameters provided by scryfall. For a complete documentation, refer to the official site.


A Catalog object contains an array of Magic datapoints (words, card values, etc). Catalog objects are provided by the API as aids for building other Magic software and understanding possible values for a field on Card objects.


This module exposes the possible errors this crate has, and ways to interact with them.


The available magic the gathering formats.


Rulings represent Oracle rulings, Wizards of the Coast set release notes, or Scryfall notes for a particular card.


A Set object represents a group of related Magic cards. All Card objects on Scryfall belong to exactly one set.


Module containing utility functions and structs.