scry-cards {scryr} | R Documentation |
Retrieve information about cards
Description
Cards represent individual Magic: The Gathering playing cards that players could obtain and add to their collection (with a few minor exceptions).
Cards are the API's most complex object. You are encouraged to thoroughly
read this document and also vignette("layouts")
.
Usage
scry_cards(
q,
unique = "cards",
order = "name",
dir = "auto",
include_extras = FALSE,
include_multilingual = FALSE,
include_variations = FALSE,
page = NULL
)
scry_card(id, source = "scryfall")
scry_card_name(name, mode = c("fuzzy", "exact"), set = NULL)
scry_card_number(number, set, lang = "en")
scry_card_random(q = NULL)
Arguments
q |
A search query using the same fulltext search system that Scryfall
uses. For more information see |
unique |
The strategy for omitting similar cards. The options are:
|
order |
The method to sort returned cards. The options are:
|
dir |
The direction to sort cards. The options are:
|
include_extras |
If |
include_multilingual |
If |
include_variations |
If |
page |
The results' page number to return. If |
id |
Unique card identifier. May refer to any supported |
source |
Source to which |
name |
A string with a card's name (or part of it). |
mode |
Search mode. Can be either |
set |
The three to five-letter set code. |
number |
The card's collector number for a set. |
lang |
The 2-3 character language code. For more information, see
|
Value
A data frame with 1 or more rows and the following columns:
-
id
[chr]: A unique ID for this card in Scryfall's database. -
name
[chr]: The name of this card. If this card has multiple faces, this column will contain both names separated by␣//␣
. -
set
[chr]: This card's set code. -
lang
[chr]: A language code for this printing. For more information, seevignette("languages")
-
colors
[list]: This card's colors, if the overall card has colors defined by the rules. Otherwise the colors will be on thecard_faces
column, see below. -
color_identity
[list]: This card's color identity. -
color_indicator
[list]: The colors in this card's color indicator, if any. ANULL
value for this column indicates the card does not have one. -
mana_cost
[chr]: The mana cost for this card. This value will be any empty string""
if the cost is absent. Remember that per the game rules, a missing mana cost and a mana cost of{0}
are different values. Multi-faced cards will report this value incard_faces
, see below. -
cmc
[dbl]: The card's converted mana cost. Note that some funny cards have fractional mana costs. -
oracle_text
[chr]: The Oracle text for this card, if any. -
power
[chr]: This card's power, if any. Note that some cards have powers that are not numeric, such as*
. -
toughness
[chr]: This card's toughness, if any. Note that some cards have toughnesses that are not numeric, such as*
. -
type_line
[chr]: The type line of this card. -
edhrec_rank
[int]: This card's overall rank/popularity on EDHREC. Not all cards are ranked. -
hand_modifier
[chr]: This card's hand modifier, if it is Vanguard card. This value will contain a delta, such as-1
. -
keywords
[list]: A vector of keywords that this card uses, such asFlying
andCumulative upkeep
. -
layout
[chr]: A code for this card's layout. For more information seevignette("layouts")
-
legalities
[list]: A data frame describing the legality of this card across play formats. Possible legalities arelegal
,not_legal
,restricted
, andbanned
. -
life_modifier
[chr]: This card's life modifier, if it is Vanguard card. This value will contain a delta, such as+2
. -
loyalty
[chr]: This loyalty if any. Note that some cards have loyalties that are not numeric, such asX
. -
oversized
[lgl]: Whether this card is oversized. -
produced_mana
[list]: Colors of mana that this card could produce. -
reserved
[lgl]: Whether this card is on the Reserved List. -
oracle_id
[chr]: A unique ID for this card's oracle identity. This value is consistent across reprinted card editions, and unique among different cards with the same name (tokens, Unstable variants, etc). -
arena_id
[int]: This card's Arena ID, if any. A large percentage of cards are not available on Arena and do not have this ID. -
mtgo_id
,mtgo_foil_id
[int]: This card's Magic Online ID (also known as the Catalog ID), if any. A large percentage of cards are not available on Magic Online and do not have this ID. -
multiverse_ids
[list]: This card's multiverse IDs on Gatherer, if any, as a vector of integers. Note that Scryfall includes many promo cards, tokens, and other esoteric objects that do not have these identifiers. -
tcgplayer_id
,tcgplayer_etched_id
[int]: This card's ID on TCGplayer's API, also known as theproductId
. -
cardmarket_id
[int]: This card's ID on Cardmarket's API, also known as theidProduct
. -
uri
[chr]: A link to this card on Scryfall's API. -
scryfall_uri
[chr]: A link to this card's permapage on Scryfall's -
rulings_uri
[chr]: A link to this card's rulings list on Scryfall's API. For more information seescry_ruling()
-
prints_search_uri
[chr]: A link to where you can begin paginating all re/prints for this card on Scryfall's API. website. -
all_parts
[list]: If this card is closely related to other cards, this column will be a data frame with the following columns:-
id
[chr]: An unique ID for this card in Scryfall's database. -
object
[chr]: A content type for this object, alwaysrelated_card
. -
component
[chr]: A column explaining what role this card plays in this relationship, one oftoken
,meld_part
,meld_result
, orcombo_piece
. -
name
[chr]: The name of this particular related card. -
type_line
[chr]: The type line of this card. -
uri
[chr]: A URI where you can retrieve a full object describing this card on Scryfall's API.
-
-
card_faces
[list]: A data frame of card faces (if this card is multifaced) with the following columns. For more information seevignette("layouts")
.-
name
[chr]: The name of this particular face. -
colors
[list]: This face's colors, if the game defines colors for the individual face of this card. -
color_indicator
[list]: The colors in this face's color indicator, if any. -
mana_cost
[chr]: The mana cost for this face. This value will be any empty string""
if the cost is absent. Remember that per the game rules, a missing mana cost and a mana cost of{0}
are different values. -
cmc
[dbl]: The mana value of this particular face, if the card is reversible. -
oracle_text
[chr]: The Oracle text for this face, if any. -
power
[chr]: This face's power, if any. Note that some cards have powers that are not numeric, such as*
. -
toughness
[chr]: This face's toughness, if any. -
type_line
[chr]: The type line of this particular face, if the card is reversible. -
layout
[chr]: The layout of this card face, if the card is reversible. -
loyalty
[chr]: This face's loyalty, if any. -
oracle_id
[chr]: The Oracle ID of this particular face, if the card is reversible. -
artist
[chr]: The name of the illustrator of this card face. Newly spoiled cards may not have this column yet. -
artist_id
[chr]: This faces's illustrator's unique identifier. -
flavor_name
[chr]: The just-for-fun name printed on the card (such as for Godzilla series cards). -
flavor_text
[chr]: The flavor text printed on this face, if any. -
illustration_id
[chr]: A unique identifier for the card face artwork that remains consistent across reprints. Newly spoiled cards may not have this column yet. -
image_uris
[list]: A data frame providing URIs to imagery for this face, if this is a double-sided card. If this card is not double-sided, then theimage_uris
column will be part of the parent object instead. -
printed_name
[chr]: The localized name printed on this face, if any. -
printed_text
[chr]: The localized text printed on this face, if any. -
printed_type_line
[chr]: The localized type line printed on this face, if any. -
watermark
[chr]: The watermark on this particularly card face, if any.
-
-
artist
[chr]: The name of the illustrator of this card. Newly spoiled cards may not have this column yet. -
booster
[lgl]: Whether this card is found in boosters. -
border_color
[chr]: This card's border color:black
,white
,borderless
,silver
, orgold
. -
card_back_id
[chr]: The Scryfall ID for the card back design present on this card. -
collector_number
[chr]: This card's collector number. Note that collector numbers can contain non-numeric characters, such as letters or stars. -
content_warning
[lgl]:TRUE
if you should consider avoiding use of this print downstream. -
digital
[lgl]: Whether this card was only released in a video game. -
finishes
[list]: A vector of computer-readable flags that indicate if this card can come infoil
,nonfoil
,etched
, orglossy
finishes. -
flavor_name
[chr]: The just-for-fun name printed on the card (such as for Godzilla series cards). -
flavor_text
[chr]: The flavor text, if any. -
frame_effects
[list]: This card's frame effects, if any. For more information seevignette("frames")
. -
frame
[chr]: This card's frame layout. For more information seevignette("frames")
. -
full_art
[lgl]: Whether this card's artwork is larger than normal. -
games
[list]: A vector of games that this card print is available in,paper
,arena
, and/ormtgo
. -
highres_image
[lgl]: Whether this card's imagery is high resolution. -
illustration_id
[chr]: A unique identifier for the card artwork that remains consistent across reprints. Newly spoiled cards may not have this column yet. -
image_status
[chr]: A computer-readable indicator for the state of this card's image, one ofmissing
,placeholder
,lowres
, orhighres_scan
. -
image_uris
[list]: A data frame listing available imagery for this card. For more information seevignette("imagery")
. -
preview
[list]: A data frame providing information about this card's preview. -
prices
[list]: A data frame containing daily price information for this card, includingusd
,usd_foil
,usd_etched
,eur
, andtix
prices, as strings. -
printed_name
[chr]: The localized name printed on this card, if any. -
printed_text
[chr]: The localized text printed on this card, if any. -
printed_type_line
[chr]: The localized type line printed on this card, if any. -
promo
[lgl]: Whether this card is a promotional print. -
promo_types
[list]: A vector of strings describing what categories of promo cards this card falls into. -
purchase_uris
[list]: A data frame providing URIs to this card's listing on major marketplaces. -
rarity
[chr]: This card's rarity. One ofcommon
,uncommon
,rare
,special
,mythic
, orbonus
. -
related_uris
[list]: A data frame providing URIs to this card's listing on other Magic: The Gathering online resources. -
released_at
[date]: The date this card was first released. -
reprint
[lgl]: Whether this card is a reprint. -
scryfall_set_uri
[chr]: A link to this card's set on Scryfall's website. -
set_name
[chr]: This card's full set name. -
set_search_uri
[chr]: A link to where you can begin paginating this card's set on the Scryfall API. -
set_type
[chr]: The type of set this printing is in. -
set_uri
[chr]: A link to this card's set on Scryfall's API. For more information see?scry_sets()
. -
set_id
[chr]: This card's set Scryfall ID. -
story_spotlight
[lgl]: Whether this card is a Story Spotlight. -
textless
[lgl]: Whether the card is printed without text. -
variation
[lgl]: Whether this card is a variation of another printing. -
variation_of
[chr]: The printing ID of the printing this card is a variation of. -
security_stamp
[chr]: The security stamp on this card, if any. One ofoval
,triangle
,acorn
, orarena
. -
watermark
[chr]: This card's watermark, if any.
References
https://scryfall.com/docs/api/cards
Examples
# Get all legendary vampires
scry_cards("t:vampire t:legend")
# Get card using an ID
scry_card("913dd06f-ed2f-4128-9c9d-9cd0d8a55425")
# Get card using a name
scry_card_name("Anje Falkenrath")
# Get card using a collector number and a set
scry_card_number(37, "c19")
# Just get a random legendary vampires
scry_card_random("t:vampire t:legend")