Skip to contents

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

Usage

scry_sets()

scry_set(id, source = "code")

Arguments

id

Unique set indentifier. May refer to any supported source.

source

Source to which id refers. Can be any one of code (the regular three to five-letter set code), scryfall or tcgplayer. See details.

Value

A data frame with 1 or more rows and the following columns:

  • id [chr]: A unique ID for this set on Scryfall that will not change.

  • code [chr]: The unique three to five-letter code for this set. See details.

  • name [chr]: The English name of the set.

  • mtgo_code [chr]: The unique code for this set on MTGO, which may differ from the regular code.

  • arena_code [chr]: The unique code for this set on MTG Arena, which may differ from the regular code.

  • tcgplayer_id [int]: This set’s ID on TCGplayer’s API, also known as the groupId.

  • uri [chr]: A link to this set on Scryfall’s API.

  • scryfall_uri [chr]: A link to this set’s permapage on Scryfall’s

  • search_uri [chr]: A Scryfall API URI that you can request to begin paginating over the cards in this set.

  • released_at [date]: The date the set was released or the first card was printed in the set (in GMT-8 Pacific time).

  • set_type [chr]: Scryfall provides an overall categorization for each Set in the set_type property. The options are:

    • core: A yearly Magic core set (Tenth Edition, etc).

    • expansion: A rotational expansion set in a block (Zendikar, etc).

    • masters: A reprint set that contains no new cards (Modern Masters, etc).

    • masterpiece: Masterpiece Series premium foil cards.

    • arsenal: A Commander-oriented gift set.

    • from_the_vault: From the Vault gift sets.

    • spellbook: Spellbook series gift sets.

    • premium_deck: Premium Deck Series decks.

    • duel_deck: Duel Decks.

    • draft_innovation: Special draft sets, like Conspiracy and Battlebond.

    • treasure_chest: Magic Online treasure chest prize sets.

    • commander: Commander preconstructed decks.

    • planechase: Planechase sets.

    • archenemy: Archenemy sets.

    • vanguard: Vanguard card sets.

    • funny: A funny un-set or set with funny promos (Unglued, Happy. Holidays, etc).

    • starter: A starter/introductory set (Portal, etc).

    • box: A gift box set.

    • promo: A set that contains purely promotional cards.

    • token: A set made up of tokens and emblems..

    • memorabilia: A set made up of gold-bordered, oversize, or trophy cards. that are not legal.

  • card_count [int]: The number of cards in this set.

  • parent_set_code [chr]: The set code for the parent set, if any. promo and token sets often have a parent set.

  • printed_size [int]: The denominator for the set’s printed collector numbers.

  • digital [lgl]: Whether this set was only released in a video game.

  • nonfoil_only [lgl]: Whether this set contains only nonfoil cards.

  • foil_only [lgl]: Whether this set contains only foil cards.

  • block_code [chr]: The block code for this set, if any.

  • block [chr]: The block or group name code for this set, if any.

  • icon_svg_uri [chr]: A URI to an SVG file for this set’s icon on Scryfall’s CDN. Hotlinking this image isn’t recommended, because it may change slightly over time. You should download it and use it locally for your particular user interface needs.

Details

Due to Magic's long and complicated history, Scryfall includes many un-official sets as a way to group promotional or outlier cards together. Such sets will likely have a code that begins with p or t, such as pcel or tori. Official sets always have a three-letter set code, such as zen.

Examples

# \donttest{
# Get all sets
scry_sets()
#> # A tibble: 721 × 19
#>    id     code  name  uri   scryfall_uri search_uri released_at set_type
#>    <chr>  <chr> <chr> <chr> <chr>        <chr>      <date>      <chr>   
#>  1 a6012… tunf  Unfi… http… https://scr… https://a… 2022-04-01  token   
#>  2 b314f… unf   Unfi… http… https://scr… https://a… 2022-04-01  funny   
#>  3 b11b2… pw22  Wiza… http… https://scr… https://a… 2022-03-05  promo   
#>  4 5bd03… tnec  Neon… http… https://scr… https://a… 2022-02-18  token   
#>  5 8bb11… tneo  Kami… http… https://scr… https://a… 2022-02-18  token   
#>  6 5b4d9… nec   Neon… http… https://scr… https://a… 2022-02-18  command…
#>  7 59a20… neo   Kami… http… https://scr… https://a… 2022-02-18  expansi…
#>  8 78a7f… cc2   Comm… http… https://scr… https://a… 2022-01-28  command…
#>  9 5c163… dbl   Inni… http… https://scr… https://a… 2022-01-28  draft_i…
#> 10 8a673… y22   Alch… http… https://scr… https://a… 2021-12-09  expansi…
#> # … with 711 more rows, and 11 more variables: card_count <int>,
#> #   parent_set_code <chr>, digital <lgl>, nonfoil_only <lgl>,
#> #   foil_only <lgl>, icon_svg_uri <chr>, tcgplayer_id <int>,
#> #   mtgo_code <chr>, arena_code <chr>, block_code <chr>, block <chr>

# Get set using an ID
scry_set("vow")
#> # A tibble: 1 × 19
#>   id    code  name  mtgo_code arena_code tcgplayer_id uri   scryfall_uri
#>   <chr> <chr> <chr> <chr>     <chr>             <int> <chr> <chr>       
#> 1 8144… vow   Inni… vow       vow                2862 http… https://scr…
#> # … with 11 more variables: search_uri <chr>, released_at <date>,
#> #   set_type <chr>, card_count <int>, printed_size <int>,
#> #   digital <lgl>, nonfoil_only <lgl>, foil_only <lgl>,
#> #   block_code <chr>, block <chr>, icon_svg_uri <chr>
# }