cardcorpus

Printed card text

What each card prints, word for word, read off the card itself: its attacks and abilities, trainer and energy text, rule boxes, weakness, resistance, retreat and flavor text.

Get a set's text

Text comes one file a set: GET /v1/text/{set}.json, by the same set id as sets/{set}.json. A set's id starts with its catalog, so Base Set (english/base-set) is text/english/base-set.json. Its cards are in the set file's order, each a card pointer (set and id) with what the card prints under text.

It is kept apart from the set file because most apps don't need it, and a card browser shouldn't have to download every attack to draw a checklist.

Every English set has a text file, and so does every set in another language that has any text yet. A card whose text isn't known yet is left out of it, so cardCount can be lower than the set's.
text.js
const get = (path) =>
  fetch(`https://pokemon.cardcorpus.com/v1/${path}`).then((res) => res.json());

// One file a set, by the set's id; cards in the set file's order
const { cards } = await get("text/english/base-set.json");
const { text, checked } = cards.find((c) => c.id === "4");

console.log(text.name, "·", text.hp, "HP ·", text.types.join(", "));
for (const power of text.abilities) {
  console.log(`${power.label}: ${power.name}`);
}
for (const attack of text.attacks) {
  const cost = attack.cost.join(" ");
  console.log(`[${cost}] ${attack.name} ${attack.damage}`);
  console.log(" ", attack.text);
}
console.log("Checked:", checked);
Prints
Charizard · 120 HP · Fire
Pokémon Power: Energy Burn
[Fire Fire Fire Fire] Fire Spin 100
Discard 2 Energy cards attached to Charizard in order to use this attack.
Checked: agreed

A Pokémon's text

A Pokémon has its stage, hp, types and evolvesFrom as printed, then its abilities and attacks. An ability keeps the label its card prints, such as Pokémon Power, Poké-Body or Ability. An attack has its cost, name, damage as printed (30, 40+) and its text.

Energy symbols are written as their type's name: Fire, Colorless in a cost or a type list, and in braces inside text, {Water}. An attack that costs nothing has an empty cost.

weakness and resistance give a value only where the card prints one. Older cards print a bare weakness symbol, which means ×2, so their value is empty.

curl https://pokemon.cardcorpus.com/v1/text/english/base-set.json
{
  "set": { "$kind": "set", "id": "english/base-set" },
  "cardCount": 102,
  "cards": [
    {
      "$kind": "card",
      "set": "english/base-set",
      "id": "4",
      "name": "Charizard",
      "text": {
        "name": "Charizard",
        "level": 76,
        "kind": "pokemon",
        "stage": "Stage 2",
        "evolvesFrom": "Charmeleon",
        "hp": 120,
        "types": ["Fire"],
        "abilities": [
          {
            "label": "Pokémon Power",
            "name": "Energy Burn",
            "text": "As often as you like during your turn (before your attack), you may turn all Energy attached to Charizard into {Fire} Energy for the rest of the turn. This power can't be used if Charizard is Asleep, Confused, or Paralyzed."
          }
        ],
        "attacks": [
          {
            "label": null,
            "cost": ["Fire", "Fire", "Fire", "Fire"],
            "name": "Fire Spin",
            "damage": "100",
            "text": "Discard 2 Energy cards attached to Charizard in order to use this attack."
          }
        ],
        "weakness": [{ "type": "Water", "value": "" }],
        "resistance": [{ "type": "Fighting", "value": "-30" }],
        "retreat": 3,
        // … 5 more fields
      },
      "checked": "agreed",
      // … 1 more field
    },
    // … 101 more
  ]
}
200application/json: Base Set Charizard's printed text

Trainers and Energy

A trainer or a Special Energy card's text is in effect, one string a paragraph, and its printed category in subtype: Item, Supporter, Stadium, Pokémon Tool, or plain Trainer on older cards. Rule boxes (the ex, V or ACE SPEC rules) and the smaller rule lines are in rules.

A LEGEND or V-UNION is printed in pieces, each its own card. Each piece holds the text of the whole card, read across all its pieces.

curl https://pokemon.cardcorpus.com/v1/text/english/base-set.json
{
  "cards": [
    {
      "id": "95",
      "name": "Switch",
      "text": {
        "name": "Switch",
        "kind": "trainer",
        "subtype": "Trainer",
        "effect": ["Switch 1 of your Benched Pokémon with your Active Pokémon."],
        "rules": [],
        // … 12 more fields
      },
      // … 4 more fields
    },
    // … 101 more
  ],
  // … 2 more fields
}
200application/json: Base Set Switch's printed text

How it was checked

Every English card's text was read off its picture, and that read was compared with the text published elsewhere. Each card says how its text is known in checked:

checkedWhat it means
agreedThe read from the picture matches the published text on every part. Most cards.
judgedThey differed, and each difference was settled by a closer look at the picture.
pictureNo published text to compare: the read from the picture is all there is.
sourcePublished text, not yet checked against the card. Every card in a language other than English, for now.

Where a closer look still couldn't settle a part, such as a blurry cost, unsure names it, and text keeps the read.

The print, not the rules

The text is what the card says, not how it plays today. An older card keeps its old wording, and an official erratum doesn't change it: Base Set's Potion still reads "Remove up to 2 damage counters", though every Potion now heals 30.

How a card plays, errata included, and which other cards play the same, is its play.

Other languages

Text in Japanese, Korean, both Chinese, Thai, Indonesian, French, German, Italian, Spanish, Latin American Spanish and Portuguese comes from text published for those cards, and is not yet checked against the card: each of those cards says source in checked. It has the same shape as English. The words stay in the card's language (its name, attack names and text, evolvesFrom), while kind, subtype, stage, types and costs use the English words in every language, and energy symbols in the text are written {Fire} the same way. Some older cards have no published text in their language yet and are left out.

The text object

setstringalways present
The set's id (sets/{catalog}.json).
idstringalways present
The card's id, unique in its set.
namestringalways present
A copy of the target's own name.
textobjectalways present
What the card prints, as printed (case and punctuation kept, italics dropped). Energy symbols are type names: in costs and types as Lightning, Colorless; inside text in braces, {Darkness}.
checkedenumalways present
How the text is known: agreed, a blind read of the picture matches the text other transcriptions give on every part; judged, they differed and each difference was settled by a closer look at the picture; picture, only the picture read gives it; source, a card list gives it and it is not yet checked against the card (languages other than English).
unsurelist of string
Parts a closer look could not settle; text keeps the read.
1 more field
numberobject
A copy of the target's own number. Its number as printed ("4/102", "SWSH001"), and that number without its set total.

What a card prints

namestring
The name as printed, with its suffix (ex, EX, GX, V, LV.X, δ); empty for a basic Energy that prints only ENERGY and its symbol.
levelinteger or null
A printed level, such as 42 for LV.42; null where none is printed.
kindstring
pokemon, trainer or energy.
subtypestring or null
The category of a trainer or energy, in English in every language: Item, Supporter, Stadium, Pokémon Tool, Trainer, Basic Energy, Special Energy, …
stagestring or null
A Pokémon's stage, in English in every language: Basic, Stage 1, Stage 2, BREAK, VMAX, …
evolvesFromstring or null
The printed Evolves from name.
hpinteger or null
Printed HP.
typeslist of string
The type symbols printed beside the HP.
abilitieslist of object
Abilities, Poké-Powers, Poké-Bodies, Pokémon Powers, Ancient Traits and the like, in printed order.
attackslist of object
Attacks, in printed order.
effectlist of string
A trainer's or energy's text, one string a printed paragraph.
ruleslist of object
Rule boxes and rule lines as printed (the Pokémon ex rule, You may play only 1 Supporter card during your turn., …).
weaknesslist of object
Weakness as printed.
resistancelist of object
Resistance as printed.
retreatinteger
How many retreat symbols are printed.
flavorstring or null
The Pokédex text, where printed.
1 more field
markerslist of string
Printed labels that are neither text nor stage: Future, Ancient, Tera, Rapid Strike, Prism Star, ACE SPEC, Team Plasma, …