Warning, The documentation is in progress

Getting Started

This documentation is for developpers who wants to use the API endpoints

This API is available as both HTTPS (Recommended) or HTTP

You can use the switch to change the wrapper to use one of the supported
list at the bottom of the document

The whole API is Open Source at these urls

Note: every images can have the following extension: .webp, .png, .jpg

Base Url

https://api.tcgdex.net/v1/

Wrapper Selector (Also include raw requests as "Curl")

Global Usage
To use this wrapper you need to execute this before in your code

// Available at https://www.npmjs.com/package/@tcgdex/sdk
// Or by doing yarn add @tcgdex/sdk in your projet
import TCGdex from '@tcgdex/sdk';
const tcgdex = new TCGdex(); // optional parameter for the language

Get Cards

This is discouraged as it take some time to fetch

Get the whole list of cards

NameDescriptionType
countGet the length of the listinteger
listget the list of CardSimpleCardSimple

Request

const resp = await tcgdex.getCards(); // Optional parameter for the set to search in

Response


{
	"count": 13000,
	"list": [
		{
			"id": "base1-1",
			"localId": 1,
			"name": "Alakazam",
			"image": "https://assets.tcgdex.net/en/base/base1/1/low"
		},
		...
	]
}
						

Get a Single Card

Get a single card with all it's informations

interface source
NameDescriptionType
idCard Global IDstring
localIdCard Set Idstring or integer
nameCard Namestring
image (Optional)Card imagesObject
image.lowCard Low resolution imagestring
image.high (Optional)Card High resolution imagestring
tagsCard Additionnal tagsTagSimple
illustrator (Optional)Card IllustratorIllustratorSimple
rarityCard RarityRaritySimple
categoryCard Category (use it to define what a card can have)CategorySimple
setCard set InformationsObject
set.nameCard Set Namestring
set.codeCard set Codestring
item (Optional)Card ItemObject
item.nameCard Item Namestring
item.effectCard item Effectstring
hp (Optional)Card HP (Some fossils have HP)number
dexId (Optional)Pokémon Pokédex ID (to use it use PokéAPI)number
lvl (Optional)Pokémon Levelnumber
type (Optional)Pokémon Type(s) (some Cards have multiple types)TypeSimple
evolveFrom (Optional)Previous Pokémon in the evolutionary linestring
evolveTo (Optional)Potential Pokémon this Pokémon can evolve intostring array
abilities (Optional)List of pokémon abilities (some Pokémons have multiple abilities)AbilitySimple array
attacks (Optional)List of pokémon attacksAttackSimple array
weaknesses (Optional)List of Pokémon's WeaknessesObject list
weaknesses[index].typeWeakness TypeTypeSimple
weaknesses[index].valueWeakness change to attackTypeSimple
resistances (Optional)List of Pokémon's ResistancesObject list
resistances[index].typeResistance TypeTypeSimple
resistances[index].valueResistance change to attackTypeSimple
effectCard Effect (Used for Trainers and Special Energy cards)string

Request

const resp = await tcgdex.getCard("card id")
// or
const resp = await tcgdex.getCard("card set", "card localId")

Response


{
	"id": "base1-1",
	"localId": 1,
	"dexId": 65,
	"name": "Alakazam",
	"hp": 80,
	"type": [
		{
			"id": 9,
			"name": "Psychic"
		}
	],
	"image": {
		"low": "https://assets.tcgdex.net/en/base/base1/1/low",
		"high": "https://assets.tcgdex.net/en/base/base1/1/high"
	},
	"evolveFrom": "Kadabra",
	"tags": [
	{
		"id": 15,
		"name": "Stage 2"
	}
	],
	"illustrator": {
		"id": 0,
		"name": "Ken Sugimori"
	},
	"abilities": [
	{
		"name": "Damage Swap",
		"text": "As often as you like during your turn (before your attack), you may move 1 damage counter from 1 of your Pokémon to another as long as you don't Knock Out that Pokémon. This power can't be used if Alakazam is Asleep, Confused, or Paralyzed.",
		"type": {
			"id": 1,
			"name": "Poké-Power"
		}
	}
	],
	"attacks": [
		{
			"name": "Confuse Ray",
			"cost": [
				"Psychic",
				"Psychic",
				"Psychic"
			],
			"text": "Flip a coin. If heads, the Definding Pokémon is now Confused.",
			"damage": 30
	}
	],
	"weaknesses": [
	{
		"type": {
		"id": 9,
		"name": "Psychic"
		},
		"value": "×2"
	}
	],
	"rarity": {
		"id": 2,
		"name": "Rare"
	},
	"category": {
		"id": 0,
		"name": "Pokémon"
	},
	"set": {
		"name": "Base",
		"code": "base1"
	}
}
						

CardSimple

Basic Card Element

NameDescriptionType
idCard Unique IDstring
localIdCard Id in Setstring or Integer
nameCard namestring
imageLow Resolution card image (See top of the page for formats)string

Loading...