K
Docs
🐾

Pokédex

info.pokemonThe AlmanacLook-ups

Finds a Pokémon by name or Pokédex number — “Pikachu”, “Mr. Mime”, “#25” — and brings back its types, abilities, base stats, height and weight, its Pokédex entry, generation and official artwork.

When to use this
  • →{{pokemon.stats}} lists every base stat in one line; {{pokemon.total}} adds them up
  • →Forms work too: “charizard-mega-x”, “deoxys-attack”

On the canvas

This is what Pokédex looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🐾
Pokédex
info.pokemon
Look-ups
queryrequired
e.g. {{input.options.pokemon}}
asrequired
pokemon
found
missing
error

Config fields

FieldTypeReqWhat it does
query
e.g. {{input.options.pokemon}}
textyesWhich Pokémon 🔎
as
pokemon
textyesSave it as ✨

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{pokemon.name}}stringThe Pokémon's name
{{pokemon.number}}numberPokédex number
{{pokemon.types}}stringTypes, like Grass / Poison
{{pokemon.abilities}}stringAbilities
{{pokemon.genus}}stringLike “Mouse Pokémon”
{{pokemon.entry}}stringIts Pokédex entry
{{pokemon.generation}}stringLike Generation I
{{pokemon.stats}}stringHP 35 · Attack 55 · Defense 40 · …
{{pokemon.total}}numberBase stat total
{{pokemon.height}}stringHeight, like 0.4 m
{{pokemon.weight}}stringWeight, like 6.0 kg
{{pokemon.legendary}}booleanTrue for legendary and mythical Pokémon
{{pokemon.image}}stringLink to the official artwork
{{pokemon.sprite}}stringLink to the small game sprite
{{pokemon.url}}stringLink to its Pokédex page
{{pokemon.query}}stringWhat was looked up
{{pokemon.error}}stringWhy it couldn't be looked up

Output ports

foundThe Pokémon is in your spark — {{pokemon.name}} #{{pokemon.number}}
missingNothing matched — {{…query}} says what they asked for
errorCouldn't ask right now (busy or down) — {{…error}} says why
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const species = await (await fetch("https://pokeapi.co/api/v2/pokemon-species/pikachu")).json();
const mon = await (await fetch("https://pokeapi.co/api/v2/pokemon/pikachu")).json();
const types = mon.types.map((t) => t.type.name).join(" / "); // {{pokemon.types}}
const entry = species.flavor_text_entries.findLast((e) => e.language.name === "en"); // {{pokemon.entry}}
const art = mon.sprites.other["official-artwork"].front_default; // {{pokemon.image}}