scry_cards: Query Scryfall Card Search API

Description Usage Arguments Value Examples

View source: R/scry_cards.R

Description

Request card-level information. This API call operates in a similar manner to a manual Scryfall search.

Usage

1
2
3
4
5
6
scry_cards(query, .unique = c("cards", "art", "prints"),
  .order = c("name", "set", "released", "rarity", "color", "usd", "tix",
  "eur", "cmc", "power", "toughness", "edhrec", "artist"),
  direction = c("auto", "asc", "desc"), include_extras = FALSE,
  include_multilingual = FALSE, include_variations = FALSE,
  include_ids = FALSE, include_uris = FALSE, delay = 75)

Arguments

query

search query to pass to the API. A character string that looks the same as a search you'd manually enter into Scryfall. (see: https://scryfall.com/docs/syntax for documentation on searching Scryfall)

.unique

How Scryfall handles cases where different versions of the same card match the query. "cards" (default) returns only one instance of card, "art" returns each instance with a different art "prints" returns all of them.

.order

How Scryfall sorts returned cards. "name" (default): card name, "set": set code and collector number, "released": release date, "rarity": rarity, "color": color, "usd": price in US dollars, "tix"; price in tickets on MTGO, "eur": price in Euros, "cmc": converted mana cost, "power": power, "toughenss": toughness, "edhrec": EDHREC rating, or "artist": artist name.

direction

Which direction cards are sorted in based on .order. "auto" (default): order that makes most sense for .order, "asc": ascending order, and "desc": descending order. "auto" sorts in descending order for prices ("usd", "tix", and "eur"), "release date", and "rarity". For all other .order options, "auto sorts in ascending order.

include_extras

Should results include extras like tokens or schemes.

include_multilingual

Should results include cards in all supported languages.

include_variations

Should results include rare case variants.

include_ids

Should results include ID variables (e.g. Oracle ID)

include_uris

Should results include URI variables (e.g. the URL for the card on Scryfall)

delay

Number of milliseconds scryr should wait between requests. (Scryfall asks for 50-100)

Value

a tibble of cards matching the search parameters

Examples

1
2
scry_cards("set:ktk")
scry_cards("set:ktk wm:mardu")

khailper/scryr documentation built on Aug. 1, 2019, 9:35 p.m.