cardcorpus

Pokémon, artists and promos

Besides sets, the cards are filed by who is on them, who drew them and how they were given out. Each has a list file and one file per entry, with its cards oldest first.

Pokémon

GET /v1/pokemon.json lists every species with its National Pokédex number (dex), its name in every language it has one, its types, its forms and its artwork.

dexintegeralways present
Its National Pokédex number.
namestringalways present
Its name.
namesmap of string
Its name in other languages, by language code.
generationintegeralways present
The generation the species first appeared in.
typeslist of stringalways present
Its default form's types.
formslist of objectalways present
Every form but the first, the default, with how many cards show it.
picturesobject
Its picture, a picture id: the official artwork.
cardCountintegeralways present
How many cards that show it in any form but a regional one; always present, 0 included.
6 more fields
categorystring
Its Pokédex category ("Mouse Pokémon").
statusenum
Where it is one: a baby, legendary or mythical Pokémon.
familypointeralways present
Its evolution family, by pointer.
taglinestring
Its one-line description.
catalogslist of vocabulary
The catalogs with cards of it in any form, each with a file of them (pokemon-cards/{catalog}/{dex}.json); none where it has no cards.
totalCardCountintegeralways present
How many cards that show it in any form, regional ones included, each card once; always present, 0 included.

A card names the species it shows under species, each with its name. An entry has forms only when the card shows something other than the ordinary form. Most cards have none. A Mega, Gigantamax or regional card has one. A card that shows several forms of one Pokémon lists them all, the ordinary one included where it is among them.

curl https://pokemon.cardcorpus.com/v1/pokemon.json
{
  "species": [
    {
      "dex": 6,
      "name": "Charizard",
      "generation": 1,
      "names": {
        "en": "Charizard",
        "fr": "Dracaufeu",
        "ja": "リザードン",
        // … 7 more fields
      },
      "types": ["fire", "flying"],
      "pictures": { "artwork": "a4b8b1ced10c763b903a69cd9e5f8800" },
      "cardCount": 390,
      // … 6 more fields
    },
    // … 1,024 more
  ],
  // … 6 more fields
}
200application/json, cut down here to the fields this page covers

Every card of a Pokémon

GET /v1/pokemon-cards/{catalog}/{dex}.json returns every card of one catalog that shows a species, oldest first. Each row has the card's name, number, rarity, language, release date and image, so a Pokémon page in one language is one request. A species in pokemon.json lists the catalogs that have cards of it; for every language, fetch each and merge by released.sort.

pokemon.js
const get = (path) =>
  fetch(`https://pokemon.cardcorpus.com/v1/${path}`).then((res) => res.json());

// Every card of one Pokémon, oldest first. Charizard is No. 6. Its cards
// come a catalog at a time, and pokemon.json says which catalogs have any.
const { species } = await get("pokemon.json");
const { catalogs } = species.find((s) => s.dex === 6);
const parts = await Promise.all(catalogs.map((catalog) => get(`pokemon-cards/${catalog}/6.json`)));
const cards = parts
  .flatMap((part) => part.cards ?? [])
  .sort((a, b) => (a.released.sort < b.released.sort ? -1 : 1));
const { language } = await get("vocabulary.json");

const counts = {};
for (const card of cards) {
  const name = language[card.language].label;
  counts[name] = (counts[name] ?? 0) + 1;
}
console.log(cards.length, "cards, the first from", cards[0].released.date);
for (const [name, count] of Object.entries(counts)) {
  console.log(count, name);
}

Artists and characters

artists.json lists every illustrator with a card count, and artists/{catalog}/{id}.json has one artist's cards in one catalog, with the artist's catalogs saying which exist. A card names its artists under artists, each with the id to use here.

characters.json and characters/{catalog}/{id}.json do the same for trainers and other people who appear on cards.

artist.js
const get = (path) =>
  fetch(`https://pokemon.cardcorpus.com/v1/${path}`).then((res) => res.json());

// Every Japanese card an artist drew, oldest first. An artist has one file
// for each catalog they have cards in, listed as `catalogs` in artists.json.
const artist = await get("artists/japanese/mitsuhiro-arita.json");

console.log(artist.name, "·", artist.cards.length, "cards");
for (const card of artist.cards.slice(0, 3)) {
  console.log(card.released.date, card.name, card.set);
}
Prints
Mitsuhiro Arita · 831 cards
1996-10-20 フシギダネ japanese/expansion-pack-base-set
1996-10-20 フシギバナ japanese/expansion-pack-base-set
1996-10-20 ヒトカゲ japanese/expansion-pack-base-set

How promos were given out

A promo is only half described by its card: the other half is how it reached people. A distribution is one way cards were given out: a tournament prize, a staff gift, a magazine insert, a theme deck.

distributions.json lists them all, and distributions/{id}.json has the variants each one handed out. A variant names its own under distributions.

curl https://pokemon.cardcorpus.com/v1/distributions/brushfire-theme-deck.json
{
  "id": "brushfire-theme-deck",
  "name": "Brushfire Theme Deck",
  "category": "product_promotion",
  "variants": [
    {
      "$kind": "card",
      "set": "english/base-set",
      "id": "12",
      "name": "Ninetales",
      "number": { "printed": "12/102" },
      // … 12 more fields
    }
  ]
}
200application/json, cut down to two of its variants