Quick start
The easiest way to build with the database is to start with the index, pick a Pokémon, then fetch its battle data or metadata.
const index = await fetch('/api').then(r => r.json());
const garchomp = await fetch('/api/pokemon/garchomp?format=Doubles').then(r => r.json());
const battle = await fetch('/api/battle/Doubles/garchomp').then(r => r.json());
Main API endpoint
/api returns the generated manifest used by the Explorer. This is the fastest endpoint for listing Pokémon, filtering by stats or type, and discovering available CSV files.
GET /api
GET /api/index
GET /data/pokemon-index.json
| generatedAt | Build time for the generated index. |
| assetRoot | Root asset folder, usually pokemon_champions_assets. |
| pokemon | Array of indexed Pokémon entries. |
| metadataCsv | Path to that Pokémon's metadata CSV. |
| battleDataCsvs | Available Singles and Doubles battle-data CSV paths. |
| summary | Sprite, types, forms, stats, and precomputed battle summaries. |
Manifest shape
The index is optimized for speed, so it contains summaries and the static file paths needed for deeper requests.
{
"generatedAt": "2026-05-18T09:01:00.000Z",
"assetRoot": "pokemon_champions_assets",
"pokemon": [
{
"name": "Garchomp",
"metadataCsv": "pokemon_champions_assets/metadata/Garchomp.csv",
"battleDataCsvs": [
{ "format": "Doubles", "path": "pokemon_champions_assets/battle_data/Doubles/Garchomp.csv" },
{ "format": "Singles", "path": "pokemon_champions_assets/battle_data/Singles/Garchomp.csv" }
],
"summary": {
"sprite": "pokemon_champions_assets/pokemon/Garchomp.png",
"types": ["Dragon", "Ground"],
"forms": [],
"baseStats": { "hp": 108, "attack": 130, "defense": 95, "sp_attack": 80, "sp_defense": 85, "speed": 102 },
"baseStatTotal": 600,
"battleSummary": {
"Doubles": { "top": {}, "values": {}, "rows": [] },
"Singles": { "top": {}, "values": {}, "rows": [] }
}
}
}
]
}
Pokémon endpoint
Returns one indexed Pokémon record. Add a format query to include the selected format summary and direct battle-data CSV path at the top level.
GET /api/pokemon/garchomp
GET /api/pokemon/garchomp?format=Doubles
GET /api/pokemon/vaporeon?format=Singles
Battle data endpoint
Returns parsed JSON rows for one Pokémon and one format. Rows include a source position plus ranked categories such as move, held item, teammate, stat alignment, stat points, and ability.
GET /api/battle/Doubles/garchomp
GET /api/battle/Singles/garchomp
{
"pokemon": "Garchomp",
"format": "Doubles",
"source": "pokemon_champions_assets/battle_data/Doubles/Garchomp.csv",
"columns": ["pokemon", "position", "category", "rank", "name", "percentage"],
"rows": [
{ "pokemon": "Garchomp", "position": 1, "category": "move", "rank": 1, "name": "Earthquake", "percentage": "90.3%" }
]
}
Battle CSV format
The raw battle data is also available as CSV for users who prefer direct downloads, notebooks, spreadsheets, or custom parsers.
GET /pokemon_champions_assets/battle_data/Doubles/garchomp.csv
GET /pokemon_champions_assets/battle_data/Singles/garchomp.csv
pokemon,position,category,rank,name,percentage,stat_up,stat_down,hp_points,attack_points,defense_points,sp_atk_points,sp_def_points,speed_points
Metadata endpoint
Returns parsed metadata rows for one Pokémon, including each saved form, typing, abilities, image path, stats, and total stats.
GET /api/metadata/garchomp
GET /api/metadata/abomasnow
{
"pokemon": "Abomasnow",
"source": "pokemon_champions_assets/metadata/Abomasnow.csv",
"rows": [
{
"title": "Abomasnow",
"base_name": "Abomasnow",
"saved_name": "Abomasnow",
"types": "Grass/Ice",
"abilities": "Snow Warning|Soundproof",
"image_path": "pokemon_champions_assets/pokemon/Abomasnow.png",
"form": "",
"hp": 165,
"atk": 112,
"def": 95,
"spa": 112,
"spd": 105,
"spe": 80,
"total": 614
}
]
}
Metadata CSV format
The raw metadata CSV uses the current compact stat headers used by the website.
GET /pokemon_champions_assets/metadata/Garchomp.csv
title,base_name,saved_name,types,abilities,image_path,form,hp,atk,def,spa,spd,spe,total
Sprites and type icons
Use image paths from the index or metadata rows. Type icons are stored by display type name.
GET /pokemon_champions_assets/pokemon/Garchomp.png
GET /pokemon_champions_assets/types/Dragon.png
GET /pokemon_champions_assets/types/Ground.png
Filtering example
For client-side filtering, load the index and filter the summary data before requesting full battle rows.
const index = await fetch('/api').then(r => r.json());
const fastGroundTypes = index.pokemon.filter(entry => {
const stats = entry.summary?.baseStats ?? {};
const types = entry.summary?.types ?? [];
return types.includes('Ground') && Number(stats.speed ?? 0) >= 100;
});
Response behavior
- All public API responses are JSON.
- Raw CSV and image assets remain available at their static paths.
- Names are matched case-insensitively in API routes.
- CORS is enabled so browser apps on other domains can request the data.