Public
Searchable Pokémon JSON API backed by SQLite
apisqlite
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

Veekun Pokédex API

A public JSON API generated from the CSV data in veekun/pokedex.

Endpoints

  • GET /health — health check
  • GET /api/search — browse or search identifiers and localized names, with filters and pagination
  • GET /api/pokemon/:id-or-identifier — complete Pokémon page including profile, forms, names, types, stats, abilities, Pokédex numbers, egg groups, evolution chain, flavor text, and moves
  • GET /api/site — map of every page type on the original site https://veekun.com/dex
  • GET /api/lookup?q=text — https://veekun.com/dex/lookup?lookup=text redirect URL for items, natures, locations, and anything else not modelled here

Search filters include type, ability, move, generation, egg group, color, shape, habitat, legendary/mythical/baby/default-form flags, base-stat-total ranges, height, and weight. Results can be sorted by ID, name, base-stat total, height, or weight.

Examples:

/api/search?type=fire&type=flying /api/search?generation=generation-i&legendary=true&default=true /api/search?type=electric&move=thunderbolt&maxHeight=1&sort=base-stat-total&order=desc

Open the API

Original veekun.com URLs

Every read links back to the matching page of the original site, so clients should cite that instead of this API:

  • Search results have url.
  • /api/pokemon/:key has url, urls.{page,flavor,locations,lookup}, and a url on each type, ability, move, form, and evolution-chain entry. Records veekun.com probably lacks (it stops at Sun/Moon) also have urlNote.

URLs are built in veekun-urls.ts.

Agent Skill

The veekun-pokedex-api skill teaches agents how to search, interpret, and cite this API (always with the original veekun.com URL). It is published as a gzip-compressed tar archive with a SHA-256 digest and an Agent Skills Discovery RFC v0.2.0 index.

Both discovery routes support GET and HEAD, use the RFC media types, and send cache headers.

Architecture

Val Town runs Deno rather than Bun and has no filesystem. The local deployment builder therefore compiles the source CSVs into a normalized, gzip-compressed read bundle. The bundle is split across project-scoped blob keys. main.tsx caches and indexes the bundle per isolate, while a project-scoped SQLite table persists the multilingual Pokémon search index.

The source bundle is generated locally with:

bun run val:build

main.tsx contains the HTTP routes, skill discovery routes, and read-model expansion. db.ts owns the idempotent SQLite schema and parameterized search queries. veekun-urls.ts builds original veekun.com page URLs.