Search cards
Search for one or many cards given a search query.
HTTP Request#
URL Parameters#
None
Body Parameters#
None
Query Parameters#
All 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 Matching#
Search 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 Matching#
Search for any card named "charizard." That is, no other word except for "charizard" appears in the name field.
Range Searches#
Some 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 fields#
To 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 Data#
You 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