get_cards_by_search: Search for cards on Scryfall

Description Usage Arguments Details Value Examples

View source: R/get_cards.R

Description

Get a list of cards found using a fulltext search string. This string uses the same syntax as Scryfall's site This is pagenated, returning a maximum of 175 cards at a time

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
get_cards_by_search(
  q = "*",
  unique = "cards",
  order = "name",
  dir = "auto",
  include_extras = FALSE,
  include_variations = FALSE,
  page = 1,
  format = "csv",
  pretty = FALSE
)

Arguments

q

the string query using Scryfall Syntax

unique

the roll-up mode for removing duplicates. See details

order

the method to sort returned cards. See details

dir

direction to sort cards

include_extras

Should the search include extra cards (tokens, planes, vanguards, etc)

include_variations

Should rare card varients be included Defaults to false

page

the page to return defaults to 1

format

The format to return the data in. json or CSV

pretty

Should the JSON be prettified

Details

unique This parameter specifies if Scryfall should remove duplicate results in your query. The options are:

order This parameter determines how Scryfall should sort the returned cards.

Value

A list or data.frame depending on output selected

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Find Jace Planeswalker Cards

jace_pw_cards <- get_cards_by_search(
  'jace t:planeswalker',
  include_variations = TRUE,
  format = 'csv'
)

# Number Crunch lands between Creeping Tar Pit and Dark Depths

  lands_poss <- get_cards_by_search(
  'crunch>"creeping tar pit"
  crunch<"dark depths"
  f:vintage -in:ptk
  not:reserved',
  order = 'usd',
  format = 'csv'
)

# Get unique arts of a Card

unique_arts <- get_cards_by_search(
  'stone rain',
  format = 'csv',
  unique = 'art'
)

unique_prints <- get_cards_by_search(
  'giant spider',
  format = 'json',
  unique = 'prints'
)

delabj/scryAnotherDay documentation built on May 13, 2021, 9:22 p.m.