V1 to V2 Migration
Version 2 of this API has quite a few differences:
Usage#
- Support for more advanced queries with more operators
- New
qparameter for performing queries. Individual fields are no longer used as query string parameters. Look at the/cardsendpoint 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-Keyheader. 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#
subtypeis nowsubtypes(array of strings)abilityis nowabilitiesto support cards with multiple abilitiesnationalPokedexNumberis nownationalPokedexNumbersto support cards that feature more than one pokemon on them (like TAG TEAM)imageUrlandimageUrlHiReshave been replaced by animagessection which currently hassmallandlargefields on it. This could potentially hold other art like unlimited versions, etc.legalitieshas 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
setCodeand aset(name) field. - Pagination info is now included in the body of response versus the headers. You can access the
page,pageSize,countandtotalCountfrom here. - ALL card/set response bodies will be inside a
dataelement in the response body, versussetsorcards. It will now always bedata(same with other endpoints like/subtypes). textis nowrules. In a similar manner totext,rulescontains any rule information on a given card.tcgplayercontains pricing information from TCGPlayer, and the URL to the page to purchase the card.legalitiesis 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.flavorTextcontains the flavor text for a card.evolvesTois an array of strings for which pokemon the card evolves to
Set JSON Response Changes#
legalitieshas replaced all legality info, similar to thecardresponse.standardLegalandexpandedLegalfields have been removed.printedTotalis the total shown on a card. This replacestotalCards.totalis the printed total PLUS the additional secret rares or any other card actually part of this setimagesis a new field that contains asymbolandlogo. This replaces thesymbolUrlandlogoUrlfields.
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.