Getting Started

Version 2 is now available!

Version 1 of this API is officially deprecated and will be unavailable as of August 1, 2021. It is highly recommended you upgrade to Version 2 as soon as possible. More details can be found within these docs.

Welcome to the Pokémon TCG API! You can use the API to access Pokémon TCG API endpoints, which can get information on cards and sets. All API access is performed over HTTPS and accessed from the https://api.pokemontcg.io domain.

Get an API Key

For V2 of the API, it is highly recommended to make an account over at https://dev.pokemontcg.io and get an API key. This API key has higher rate limits, and if necessary, those limits can be adjusted for you if they don’t meet your needs.

To use your API key, put it in the X-Api-Key header of your request.

To use the API endpoints, the format is as follows:

https://api.pokemontcg.io/<version>/<resource>

For example:

https://api.pokemontcg.io/v2/cards

There are multiple SDKs available to make it even easier to consume the API. To chat with other developers and discuss the API and SDKs, check out the Discord Server!

pokemontcg-developers on discord

V1 to V2 Migration

Version 2 of this API has quite a few differences:

Usage

  • Support for more advanced queries with more operators
  • New q parameter for performing queries. Individual fields are no longer used as query string parameters. Look at the /cards endpoint documentation for more details.
  • API Keys now accepted to get access to better rate limits (and the potential to be changed on a per user basis). Provide API keys via the X-Api-Key header. Signup for an API Key at https://dev.pokemontcg.io. If you encounter issues, feel free to contact me at [email protected] or on Discord.

Card JSON Response Changes

  • subtype is now subtypes (array of strings)
  • ability is now abilities to support cards with multiple abilities
  • nationalPokedexNumber is now nationalPokedexNumbers to support cards that feature more than one pokemon on them (like TAG TEAM)
  • imageUrl and imageUrlHiRes have been replaced by an images section which currently has small and large fields on it. This could potentially hold other art like unlimited versions, etc.
  • legalities has been added to each card. Every card will now specify what format it is legal or banned in. If the legality does not exist on a given card, that means it is simply not a legal card for that format. {“standard”: “Banned”, “expanded”: “Legal”, “unlimited”: “Legal”}
  • set info is now embedded in a card, instead of having a setCode and a set (name) field.
  • Pagination info is now included in the body of response versus the headers. You can access the page, pageSize, count and totalCount from here.
  • ALL card/set response bodies will be inside a data element in the response body, versus sets or cards. It will now always be data (same with other endpoints like /subtypes).
  • text is now rules. In a similar manner to text, rules contains any rule information on a given card.
  • tcgplayer contains pricing information from TCGPlayer, and the URL to the page to purchase the card.
  • legalities is a new field specifying the legality of a card in Standard, Expanded, Or legal. If a legality does not exist on a given card, that means it is simply not a legal card for that format (different from banned.) If Legal or Banned, it will be specified.
  • flavorText contains the flavor text for a card.
  • evolvesTo is an array of strings for which pokemon the card evolves to

Set JSON Response Changes

  • legalities has replaced all legality info, similar to the card response. standardLegal and expandedLegal fields have been removed.
  • printedTotal is the total shown on a card. This replaces totalCards.
  • total is the printed total PLUS the additional secret rares or any other card actually part of this set
  • images is a new field that contains a symbol and logo. This replaces the symbolUrl and logoUrl fields.

General Updates

ALL endpoints that return data all have their data in a data field, versus having a cards or sets or subtypes field.

Data Changes

BREAKING - Aquapolis and Skyridge H1-H32 cards have new IDs. The new IDs follow the expected pattern of {set id}-{card number}. Examples include ecard2-H1, ecard3-H32, etc.

Full rebuild - Every single set has been rebuilt with tons of updates ranging from typos, to missing attacks, to simply incorrect data.

Developer SDKs

There are multiple developer SDKs available. To see how to install and use them, refer to the links below:

Note: Some of these SDKs are in the process of upgrading to support V2.

Rate Limits

Overview

Rate limits are enforced for all third-party applications and services. This document is an overview of the rate limits themselves, as well as how they are enforced and best practices for handling the errors returned when a rate limit is reached.

V2 Rate Limits

Third-party application rate limits depend on your API key. By default, requests are limited to 20,000/day. If you need a higher rate limit, feel free to contact me via Discord or email and we can discuss.

If you aren’t using an API key, you are rate limited to 1000 requests a day, and a maxium of 30 per minute.

V1 (Deprecated) Rate Limits

Third-party applications are currently throttled to 30 requests per minute. As this API continues to age, the rate limits may be updated to provide better performance to users

Rationale

As previously mentioned, the primary goal is to provide a responsive interface for developers and users to use when accessing the Pokémon TCG data. Since each request made to the API incurs a computational cost, it’s in the best interest of both the Pokémon TCG API and its developer partners that these costs be minimized to the greatest degree possible.

Rate limiting also helps third-party developers by encouraging them to build their integrations to make economical use of API requests.

By donating to this API via Patreon or Kofi, you can help ensure that the server performance will meet your application needs.

Errors

Code Name Description
400 Bad Request We could not process that action
403 Forbidden You exceeded the rate limit
404 Not Found The requested resource could not be found
500 Internal Server Error We had a problem with our server. Please try again later
503 Service Unavailable We are temporarily offline for maintenance. Please try again later
{
  "status": 404,
  "error": "error message here"
}

Headers

This section pertains to V1 only.

There are quite a few custom response headers available when making a request. Some of these will only show up when the results are paginated.

  1. Link: Link headers with prev, last, next, first links (when appropriate)
  2. Page-Size: The page size for the request
  3. Count: The number of elements returned
  4. Total-Count: The total number of elements (across all pages)
  5. Ratelimit-Limit: The ratelimit for a given user
  6. Ratelimit-Remaining: The number of requests left before the ratelimit is exceeded.
HTTP/1.1 200 Ok
Link: <https://api.pokemontcg.io/v1/cards?page=94>; rel="last", <https://api.pokemontcg.io/v1/cards?page=2>; rel="next"
Page-Size: 100
Count: 100
Total-Count: 9320
Ratelimit-Limit: 5000
Ratelimit-Remaining: 4999

/cards

Get All Cards

This call will return a maximum of 250 cards. The default is 250.

These are the supported query string parameters:

Parameters
q
The search query. Examples can be found below.
page
The page of data to access. Defaults to 1.
pageSize
The maximum amount of cards to return. Defaults to 250 (max is also 250).
orderBy
The field(s) to order the results by. Examples can be found below.

Simple usage:

# Get all cards
curl "https://api.pokemontcg.io/v2/cards"

# Filter cards
curl "https://api.pokemontcg.io/v2/cards?q=supertype:pokemon types:dragon"

# Get specific page of data
curl "https://api.pokemontcg.io/v2/cards?page=5"

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.

name:charizard

Search for the phrase “venusaur v” in the name field.

name:"venusaur v"

Search for “charizard” in the name field AND the type “mega” in the subtypes field.

name:charizard subtypes:mega

Search for “charizard” in the name field AND either the subtypes of “mega” or “vmax.”

name:charizard (subtypes:mega OR subtypes:vmax)

Search for all “mega” subtypes, but NOT water types.

subtypes:mega -types:water

Wildcard Matching

Search for any card that starts with “char” in the name field.

name:char*

Search for any card that starts with “char” in the name and ends with “der.”

name:char*der

Exact Matching

Search for any card named “charizard.” That is, no other word except for “charizard” appears in the name field.

!name:charizard

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.

nationalPokedexNumbers:[1 TO 151]

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.

hp:[* TO 100]

Search for cards with any HP greater than or equal to 150.

hp:[150 TO *]

Search on nested fields

To search nested fields, use a period . as a separator. For example, to filter by the set id:

set.id:sm1

Or to filter on cards where they have an attack named “Spelunk”:

attacks.name:Spelunk

Find cards that are banned in Standard.

legalities.standard:banned

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.

?orderBy=number

Order all cards from Sun & Moon by their name (ascending) and then their number (descending)

?orderBy=name,-number
{  
  "data":[  
  {
    "id": "xy1-1",
    "name": "Venusaur-EX",
    "supertype": "Pokémon",
    "subtypes": [
      "Basic",
      "EX"
    ],
    "hp": 180,
    "types": [
      "Grass"
    ],
    "evolvesTo": [
      "M Venusaur-EX"
    ],
    "attacks": [
      {
        "name": "Poison Powder",
        "cost": [
          "Grass",
          "Colorless",
          "Colorless"
        ],
        "convertedEnergyCost": 3,
        "damage": "60",
        "text": "Your opponent's Active Pokémon is now Poisoned."
      },
      {
        "name": "Jungle Hammer",
        "cost": [
          "Grass",
          "Grass",
          "Colorless",
          "Colorless"
        ],
        "convertedEnergyCost": 4,
        "damage": "90",
        "text": "Heal 30 damage from this Pokémon."
      }
    ],
    "weaknesses": [
      {
        "type": "Fire",
        "value": "×2"
      }
    ],
    "retreatCost": [
      "Colorless",
      "Colorless",
      "Colorless",
      "Colorless"
    ],
    "convertedRetreatCost": 4,
    "set": {
      "id": "xy1",
      "name": "XY",
      "series": "XY",
      "printedTotal": 146,
      "total": 146,
      "legalities": {
        "unlimited": "Legal",
        "expanded": "Legal"
      },
      "ptcgoCode": "XY",
      "releaseDate": "02/05/2014",
      "updatedAt": "03/04/2018 10:35:00",
      "images": {
        "symbol": "https://images.pokemontcg.io/xy1/symbol.png",
        "logo": "https://images.pokemontcg.io/xy1/logo.png"
      },
      "_self": "https://beta.pokemontcg.io/sets/xy1"
    },
    "number": "1",
    "artist": "Eske Yoshinob",
    "rarity": "Rare Holo EX",
    "nationalPokedexNumbers": [
      3
    ],
    "legalities": {
      "unlimited": "Legal",
      "expanded": "Legal"
    },
    "images": {
      "small": "https://images.pokemontcg.io/xy1/1.png",
      "large": "https://images.pokemontcg.io/xy1/1_hires.png"
    },
    "tcgplayer": {
      "url": "http://prices.pokemontcg.io/tcgplayer/xy1-1",
      "prices": [
        {
          "holofoil": {
            "low": 0.78,
            "mid": 2.51,
            "high": 12.27,
            "market": 1.38,
            "directLow": 1.99
          }
        }
      ]
    }
  },
  { ... },
  { ... }
  ]
  }

/cards/:id

Get Card

Returns a specific card by id

curl "https://api.pokemontcg.io/v2/cards/xy7-54"
{
"data": {
  "id": "xy1-1",
  "name": "Venusaur-EX",
  "supertype": "Pokémon",
  "subtypes": [
    "Basic",
    "EX"
  ],
  "hp": 180,
  "types": [
    "Grass"
  ],
  "evolvesTo": [
    "M Venusaur-EX"
  ],
  ...
}

/sets

Get All Sets

These are the supported query string parameters:

Parameters
q
The search query. Examples can be found below.
page
The page of data to access. Defaults to 1.
pageSize
The maximum amount of cards to return. Defaults to 250 (max is also 250).
orderBy
The field(s) to order the results by. Examples can be found below.
# Get all sets
curl "https://api.pokemontcg.io/v2/sets"

# Filter cards
curl "https://api.pokemontcg.io/v2/sets?q=legalities.standard:legal"

# Get specific page of data
curl "https://api.pokemontcg.io/v2/sets?page=2&pageSize=10"

Look at the /cards endpoint for more details on the advanced query syntax.

  {
    "data": [
      {
        "id": "base1",
        "name": "Base",
        "series": "Base",
        "printedTotal": 102,
        "total": 102,
        "legalities": {
          "unlimited": "Legal"
        },
        "ptcgoCode": "BS",
        "releaseDate": "1999/01/09",
        "updatedAt": "2020/08/14 09:35:00",
        "images": {
          "symbol": "https://images.pokemontcg.io/base1/symbol.png",
          "logo": "https://images.pokemontcg.io/base1/logo.png"
        }
      },
      {
        "id": "base2",
        "name": "Jungle",
        "series": "Base",
        "printedTotal": 64,
        "total": 64,
        "legalities": {
          "unlimited": "Legal"
        },
        "ptcgoCode": "JU",
        "releaseDate": "1999/06/16",
        "updatedAt": "2020/08/14 09:35:00",
        "images": {
          "symbol": "https://images.pokemontcg.io/base2/symbol.png",
          "logo": "https://images.pokemontcg.io/base2/logo.png"
        }
      },
      {...},
      {...}
  ]
  }

/sets/:id

Get Set

Returns a specific set by the set code

curl "https://api.pokemontcg.io/v2/sets/sm1"
{
  "data": {
    "id": "sm1",
    "name": "Sun & Moon",
    "series": "Sun & Moon",
    "printedTotal": 149,
    "total": 149,
    "legalities": {
      "unlimited": "Legal",
      "expanded": "Legal"
    },
    "ptcgoCode": "SUM",
    "releaseDate": "2017/02/03",
    "updatedAt": "2019/04/10 19:59:00",
    "images": {
      "symbol": "https://images.pokemontcg.io/sm1/symbol.png",
      "logo": "https://images.pokemontcg.io/sm1/logo.png"
    }
  }
}

/types

Get All Types

curl "https://api.pokemontcg.io/v2/types"
{
  "data": [
    "Colorless",
    "Darkness",
    "Dragon",
    "Fairy",
    "Fighting",
    "Fire",
    "Grass",
    "Lightning",
    "Metal",
    "Psychic",
    "Water"
  ]
}

/subtypes

Get All Sub Types

curl "https://api.pokemontcg.io/v2/subtypes"
{
  "data": [
    "BREAK",
    "Baby",
    "Basic",
    "EX",
    "GX",
    "Goldenrod Game Corner",
    "Item",
    "LEGEND",
    "Level-Up",
    "MEGA",
    "Pokémon Tool",
    "Pokémon Tool F",
    "Restored",
    "Rocket's Secret Machine",
    "Special",
    "Stadium",
    "Stage 1",
    "Stage 2",
    "Supporter",
    "TAG TEAM",
    "Technical Machine",
    "V",
    "VMAX"
  ]
}

/supertypes

Get All Super Types

curl "https://api.pokemontcg.io/v2/supertypes"
{
  "data": [
    "Energy",
    "Pokémon",
    "Trainer"
  ]
}

/rarities

Get All Rarities

curl "https://api.pokemontcg.io/v2/rarities"
{
  "data": [
      "Amazing Rare",
      "Common",
      "LEGEND",
      "Promo",
      "Rare",
      "Rare ACE",
      "Rare BREAK",
      "Rare Holo",
      "Rare Holo EX",
      "Rare Holo GX",
      "Rare Holo LV.X",
      "Rare Holo Star",
      "Rare Holo V",
      "Rare Holo VMAX",
      "Rare Prime",
      "Rare Prism Star",
      "Rare Rainbow",
      "Rare Secret",
      "Rare Shining",
      "Rare Shiny",
      "Rare Shiny GX",
      "Rare Ultra",
      "Uncommon"
  ]
}

/cards

Get All Cards

This call will return a maximum of 1000 cards. The default is 100.

Paginate the response using the page parameter.

Each field below can be used as a query parameter. By default, fields that have a singular value such as rarity, set, and name will always use a logical “or” operator when querying with a list of values. Fields that can have multiple values such as types can use a logical “and” or a logical “or” operator.

The accepted delimiters when querying fields are the pipe character or a comma character. The pipe represents a logical “or”, and a comma represents a logical “and”. The comma can only be used with fields that accept multiple values (like types).

Example:name=blastoise|charizard

More examples: types=fire,metal versus colors=fire|metal

Parameters
name
The card name. Put the name in double quotes for an exact match, otherwise partial matching will be applied.
id
A unique id for this card. It is made up by taking the set code and concatenating the card number to it. (ex. xy1-1)
nationalPokedexNumber
The national pokedex number for a card that features a Pokémon supertype.
types
The types of the card. These typically appear in the top right of card, and are denoted by energy symbol (ex. Fire, Fighting, Psychic, etc.)
subtype
The subtype of the card. Examples include MEGA, Stage 1, BREAK, Supporter, etc.
supertype
The supertype of the card. Either Pokémon, Trainer, or Energy.
hp
The hit points of the card. This typically appears in the top right corner of the card.
number
The number of the card for the set it was released in. Found on the bottom right side of the card.
artist
The artist of the card.
rarity
The rarity of the card (ex. Rare, Rare Holo, Common, etc.)
series
The series the card appears in (ex. Base, XY, EX, etc.)
set
The set the card appears in (ex. BREAKthrough, Phantom Forces, Jungle, etc.)
setCode
The unique code of the set (ex. base1, xy5, ex3)
retreatCost
The amount of energy it takes to retreat. Found on the bottom of the card.
convertedRetreatCost
The retreat cost represented as a number.
text
Any additional text on a card. This includes special rules (like MEGA rules or EX), and text that appears on Trainer cards.
attackDamage
The attack damage of any given attack for a card
attackCost
The energy cost of a given attack for a card
attackName
The name of an attack
attackText
The text description of an attack
weaknesses
The weaknesses of the card (ex. Fire, Water, Grass)
resistances
The resistances of the card (ex. Fire, Water, Grass)
ancientTrait
The Ancient Trait of the card (if exists)
abilityName
The name of the ability
abilityText
The text of the ability
abilityType
The type of the ability (such as Poké-Power, Poké-Body, Pokémon Power or Ability)
evolvesFrom
The evolution of a card (what Pokémon it evolves from)
contains
Filter on cards that contain a specific field in the JSON response (ex. ?contains=ancientTrait)

Other Fields in Response

The fields below are also part of the response (if not null), but cannot currently be used as query parameters

Parameters
imageUrl
The image url for a card.
imageUrlHiRes
The high resolution image url for a card.
ability
A passive effect during battle. Also known as Poké-Powers and Poké-Bodies from older set. With the release of Black & White, all Pokémon Powers are known as Abilities.
attacks
The attacks for a given card.
require 'pokemon_tcg_sdk'

# Get all Cards
cards = Pokemon::Card.all

# Filter Cards
# The keys of the hash should be the URL parameter you are trying to filter on
cards = Pokemon::Card.where(supertype: "pokemon", types: "dragon|fire|flying", hp: "gt100")

# Get cards on a specific page / pageSize
cards = Pokemon::Card.where(page: 50, pageSize: 500)
from pokemontcgsdk import Card

# Get all Cards
cards = Card.all()

# Filter Cards
# The keys of the hash should be the URL parameter you are trying to filter on
cards = Card.where(supertype='pokemon', types='dragon|fire|flying', hp='gt100')

# Get cards on a specific page / pageSize
cards = Card.where(page=50, pageSize=500)
# Get all Cards
cards = Pokemon.Card.all

# Filter Cards
cards = Pokemon.Card.where(supertype: "pokemon", types: "dragon|fire|flying", hp: "gt100")

# Get cards on a specific page / pageSize
cards = Pokemon.Card.where(page: 5, pageSize: 100)
const pokemon = require('pokemontcgsdk')

// Get all cards
pokemon.card.all()
.on('data', function (card) {
  console.log(card.name)
});

// Filter Cards
pokemon.card.all({ supertype: 'pokemon', types: 'dragon|fire|flying', hp: 'gt100' })
.on('data', function (card) {
    console.log(card.name)
});

// Get cards on a specific page / pageSize
pokemon.card.where({ page: 50, pageSize: 500})
.then(cards => {
    console.log(cards[0].name)
})
<?php

# Get all Cards
$cards = Pokemon::Card()->all();

# Filter Cards
$cards = Pokemon::Card()->where([
  'supertype' => 'pokemon', 
  'types' => 'dragon|fire|flying',
  'hp' => 'gt100'
])->all();

# Get cards on a specific page / pageSize
$cards = Pokemon::Card()->where([
    'page'     => 50,
    'pageSize' => 100
])->all();
# Get all cards
curl "https://api.pokemontcg.io/v1/cards"

# Filter cards
curl "https://api.pokemontcg.io/v1/cards?supertype=pokemon&types=dragon|fire|flying&hp=gt100"

# Get specific page of data
curl "https://api.pokemontcg.io/v1/cards?page=50&pageSize=500"
{  
  "cards":[  
  {
    "id": "base5-20",
    "name": "Dark Blastoise",
    "nationalPokedexNumber": 9,
    "imageUrl": "https://images.pokemontcg.io/base5/20.png",
    "imageUrlHiRes": "https://images.pokemontcg.io/base5/20_hires.png",
    "types": [
        "Water"
    ],
    "supertype": "Pokémon",
    "subtype": "Stage 2",
    "evolvesFrom": "Wartortle",
    "hp": "70",
    "retreatCost": [
      "Colorless",
      "Colorless"
    ],
    "number": "20",
    "artist": "Mitsuhiro Arita",
    "rarity": "Rare",
    "series": "Base",
    "set": "Team Rocket",
    "setCode": "base5",
    "attacks": [
      {
        "cost": [
          "Water",
          "Water"
        ],
        "name": "Hydrocannon",
        "text": "Does 30 damage plus 20 more damage for each Energy attached to Dark Blastoise but not used to pay for this attack. You can't add more than 40 damage in this way.",
        "damage": "30+",
        "convertedEnergyCost": 2
      },
      {
        "cost": [
          "Colorless",
          "Colorless",
          "Water"
        ],
        "name": "Rocket Tackle",
        "text": "Dark Blastoise does 10 damage to itself. Flip a coin. If heads, prevent all damage done to Dark Blastoise during your opponent's next turn. (Any other effects of attacks still happen.)",
        "damage": "40",
        "convertedEnergyCost": 3
      }
    ],
    "weaknesses": [
      {
        "type": "Lightning",
        "value": "×2"
      }
    ]
  },
  { ... },
  { ... }
  ]
  }

/cards/:id

Get Card

Returns a specific card by id

require 'pokemon_tcg_sdk'

card = Pokemon::Card.find('xy7-54')

from pokemontcgsdk import Card

card = Card.find('xy7-54')
card = Pokemon.Card.find("xy7-54")
const pokemon = require('pokemontcgsdk')

pokemon.card.find('xy7-54')
.then(result => {
    console.log(result.card.name)
})
<?php

$card = Pokemon::Card()->find('xy7-54');
curl "https://api.pokemontcg.io/v1/cards/xy7-54"
{
  "card": {
    "id": "xy7-54",
    "name": "Gardevoir",
    "imageUrl": "https://images.pokemontcg.io/xy7/54.png",
    "subtype": "Stage 2",
    "supertype": "Pokémon",
    ...
  }
}

/sets

Get All Sets

Each field below can be used as a query parameter:

Parameters
name
The name of the set
ptcgoCode
The Pokémon Trading Card Game Online Code
series
The series the set belongs to
totalCards
The number of cards in the set (excluding secret rares)
standardLegal
Whether or not the set is tournament legal for standard format
expandedLegal
Whether or not the set is tournament legal for expanded format
page
The page of data to return
pageSize
The number of cards to return (max 100)
updatedSince
Filter on a set’s updatedAt field by retrieving all sets greater than or equal to the updatedSince field. Date can be formatted in MM/DD/YYYY or MM-DD-YYYY. Time is optional, but if supplied is formatted HH24:MM:SS.

Other Fields In Reponse

The fields below are also part of the response (if not null), but cannot currently be used as query parameters.

Parameters
code
The code name of the set
releaseDate
The date the set was released
symbolUrl
The symbol of the set
logoUrl
The logo of the set
updatedAt
The date the set was updated (ex. additional cards added, fixing errors, etc). Format of this field is MM-DD-YYYY HH24:MM:SS
require 'pokemon_tcg_sdk'

# Get all Sets
sets = Pokemon::Set.all

# Filter Sets
sets = Pokemon::Set.where(standardLegal: true)

# Get sets on a specific page / pageSize
sets = Pokemon::Set.where(page: 2, pageSize: 10)

# Get sets updated since a particular date
sets = Pokemon::Set.where(updatedSince: '02-10-2018')

# Get sets updated since a particular date/time
sets = Pokemon::Set.where(updatedSince: '02-10-2018 15:30:00')
from pokemontcgsdk import Set

# Get all Sets
sets = Set.all()

# Filter Sets
sets = Set.where(standardLegal=true)

# Get sets on a specific page / pageSize
sets = Set.where(page=2, pageSize=10)

# Get sets updated since a particular date
sets = Set.where(updatedSince='02-10-2018')

# Get sets updated since a particular date/time
sets = Set.where(updatedSince='02-10-2018 15:30:00')
# Get all Sets
sets = Pokemon.Set.all

# Filter sets
sets = Pokemon.Set.where(standardLegal: true)

# Get sets on a specific page / pageSize
sets = Pokemon.Set.where(page: 2, pageSize: 10)

# Get sets updated since a particular date
sets = Pokemon.Set.where(updatedSince: '02-10-2018')

# Get sets updated since a particular date/time
sets = Pokemon.Set.where(updatedSince: '02-10-2018 15:30:00')
// todo
<?php

# Get all Sets
$sets = Pokemon::Set()->all();

# Filter Sets
$set = Pokemon::Set()->where(['standardLegal' => 'true'])->all();

# Get sets on a specific page / pageSize
$sets = Pokemon::Set()->where([
    'page'     => 2,
    'pageSize' => 10
])->all();

# Get sets updated since a particular date
$sets = Pokemon::Set()->where([
    'updatedSince'     => '02-10-2018'
])->all();

# Get sets updated since a particular date/time
$sets = Pokemon::Set()->where([
    'updatedSince'     => '02-10-2018 15:30:00'
])->all();

# Get all sets
curl "https://api.pokemontcg.io/v1/sets"

# Filter cards
curl "https://api.pokemontcg.io/v1/sets?standardLegal=true"

# Get specific page of data
curl "https://api.pokemontcg.io/v1/sets?page=2&pageSize=10"

# Get sets updated since a particular date
curl "https://api.pokemontcg.io/v1/sets?updatedSince=02-10-2018"

# Get sets updated since a particular date/time
curl "https://api.pokemontcg.io/v1/sets?updatedSince=02-10-2018 15:30:00"
  {  
  "sets":[  
      {
        "code": "base1",
        "ptcgoCode": "BS",
        "name": "Base",
        "series": "Base",
        "totalCards": 102,
        "standardLegal": false,
        "expandedLegal": false,
        "releaseDate": "01/09/1999",
        "symbolUrl": "https://images.pokemontcg.io/base1/symbol.png",
        "logoUrl": "https://images.pokemontcg.io/base1/logo.png"
      },
      {
        "code": "base2",
        "ptcgoCode": "JU",
        "name": "Jungle",
        "series": "Base",
        "totalCards": 64,
        "standardLegal": false,
        "expandedLegal": false,
        "releaseDate": "06/16/1999",
        "symbolUrl": "https://images.pokemontcg.io/base2/symbol.png",
        "logoUrl": "https://images.pokemontcg.io/base2/logo.png"
      },
      {...},
      {...}
  ]
  }

/sets/:id

Get Set

Returns a specific set by the set code

require 'pokemon_tcg_sdk'

set = Pokemon::Set.find('xy1')
from pokemontcgsdk import Set

set = Set.find('xy1')
set = Pokemon.Set.find("base1")
// todo
<?php

$set = Pokemon::Set()->find('base1');
curl "https://api.pokemontcg.io/v1/sets/xy1"
{  
  "set":{  
    "code":"xy1",
    "name":"XY",
    "series":"XY",
    "totalCards":140,
    "standardLegal":true,
    "releaseDate":"02/05/2014"
  }
}

/types

Get All Types

require 'pokemon_tcg_sdk'

types = Pokemon::Type.all
from pokemontcgsdk import Type

types = Type.all()
types = Pokemon.Type.all
// todo
<?php

$types = Pokemon::Type()->all();
curl "https://api.pokemontcg.io/v1/types"
{
  "types": [
    "Colorless",
    "Darkness",
    "Dragon",
    "Fairy",
    "Fighting",
    "Fire",
    "Grass",
    "Lightning",
    "Metal",
    "Psychic",
    "Water"
  ]
}

/subtypes

Get All Sub Types

require 'pokemon_tcg_sdk'

types = Pokemon::Subtype.all
from pokemontcgsdk import Type

types = Subtype.all()
types = Pokemon.Subtype.all
// todo
<?php

$types = Pokemon::Subtype()->all();
curl "https://api.pokemontcg.io/v1/subtypes"
{
  "subtypes": [
    "EX",
    "Special",
    "Restored",
    "Level Up",
    "MEGA",
    "Technical Machine",
    "Item",
    "Stadium",
    "Supporter",
    "Stage 1",
    "GX",
    "Pokémon Tool",
    "Basic",
    "LEGEND",
    "Stage 2",
    "BREAK",
    "Rocket's Secret Machine"
  ]
}

/supertypes

Get All Super Types

require 'pokemon_tcg_sdk'

types = Pokemon::Supertype.all
from pokemontcgsdk import Type

types = Supertype.all()
types = Pokemon.Supertype.all
// todo
<?php

$types = Pokemon::Supertype()->all();
curl "https://api.pokemontcg.io/v1/supertypes"
{
  "supertypes": [
    "Energy",
    "Pokémon",
    "Trainer"
  ]
}