Search cards
Search for one or many cards given a search query.
#
HTTP Request#
URL ParametersNone
#
Body ParametersNone
#
Query ParametersAll query parameters are optional.
Parameter | Description | Default Value |
---|---|---|
q | The search query. Examples can be found below. | |
page | The page of data to access. | 1 |
pageSize | The maximum amount of cards to return. | 250 (max of 250) |
orderBy | The field(s) to order the results by. Examples can be found below. | |
select | A comma delimited list of fields to return in the response (ex. ?select=id,name). By default, all fields are returned if this query parameter is not used. |
To perform search queries, you use the q
parameter. The search syntax is a very familiar Lucene like syntax.
#
Keyword matching:Search for all cards that have "charizard" in the name field.
Search for the phrase "venusaur v" in the name field.
Search for "charizard" in the name field AND the type "mega" in the subtypes field.
Search for "charizard" in the name field AND either the subtypes of "mega" or "vmax."
Search for all "mega" subtypes, but NOT water types.
#
Wildcard MatchingSearch for any card that starts with "char" in the name field.
Search for any card that starts with "char" in the name and ends with "der."
#
Exact MatchingSearch for any card named "charizard." That is, no other word except for "charizard" appears in the name field.
#
Range SearchesSome fields support searching on a range. This includes fields with numerical data like hp
and nationalPokedexNumbers
.
Search for only cards that feature the original 151 pokemon.
Using square brackets [
and ]
means to do an inclusive range search, while using curly braces {
and }
means exclusive.
Search for cards with a max HP up to 100.
Search for cards with any HP greater than or equal to 150.
#
Search on nested fieldsTo search nested fields, use a period .
as a separator. For example, to filter by the set id:
Or to filter on cards where they have an attack named "Spelunk":
Find cards that are banned in Standard.
Every field in the response is searchable.
#
Ordering DataYou can also order data using the orderBy
query parameter.
Order all cards from Sun & Moon by their number.
Order all cards from Sun & Moon by their name (ascending) and then their number (descending)
#
Code Samples- Python
- Ruby
- Javascript
- cURL