Creatures, trainers and a battle simulator. Practice CRUD, Bearer auth, nested resources, pagination and optimistic concurrency.
The Pokémon API holds creatures, trainers and a battle endpoint that resolves a fight from the two teams you send it. The battle result is computed, not stored, which makes it the catalog's clearest example of a POST that is neither a create nor idempotent — and a good target for contract tests over a non-trivial response shape.
Base URL: https://funapi.dev/api/pokemon/v1 · 10 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
GET https://funapi.dev/api/pokemon/v1/pokemon — List Pokémon (paginated, filter by type). No token, no signup:
curl -i https://funapi.dev/api/pokemon/v1/pokemon
answers 200 OK with:
{
"page": 1,
"pageSize": 4,
"total": 8,
"totalPages": 2,
"data": [
{
"id": 1,
"name": "Pikachu",
"type": "electric",
"level": 12,
"hp": 60,
"_v": 1
},
{
"id": 2,
"name": "Bulbasaur",
"type": "grass",
"level": 10,
"hp": 65,
"_v": 1
},
{
"id": 3,
"name": "Charmander",
"type": "fire",
"level": 11,
"hp": 58,
"_v": 1
},
{
"id": 4,
"name": "Squirtle",
"type": "water",
"level": 10,
"hp": 63,
"_v": 1
}
]
}
eight starters and friends
GET /pokemon/v1/pokemon — List Pokémon (paginated, filter by type) · Responds with 200 400 404 Link to this endpointGET /pokemon/v1/pokemon/{id} — Get one Pokémon · Responds with 200 404 Link to this endpointGET /pokemon/v1/pokemon/random — A random Pokémon (wild encounter) · Responds with 200 Link to this endpointPOST /pokemon/v1/pokemon — Catch a new Pokémon (create) (requires Bearer auth) · Responds with 201 400 401 Link to this endpointPUT /pokemon/v1/pokemon/{id} — Update a Pokémon (level up, heal, etc.) (requires Bearer auth) · Responds with 200 400 401 404 412 Link to this endpointDELETE /pokemon/v1/pokemon/{id} — Release a Pokémon (requires Bearer auth) · Responds with 204 401 403 404 412 Link to this endpointthree trainers, their rosters
GET /pokemon/v1/trainers — List all trainers · Responds with 200 Link to this endpointGET /pokemon/v1/trainers/{id}/pokemon — Get a trainer's roster (nested resource) · Responds with 200 404 Link to this endpointsimulate a fight, get a random winner
POST /pokemon/v1/battles — Simulate a battle between two Pokémon (requires Bearer auth) · Responds with 201 400 401 Link to this endpointGET /pokemon/v1/battles — List battle history (empty until you POST one) · Responds with 200 Link to this endpointHow this Pokémon API differs from PokeAPI
Unofficial and fan-made. The Pokémon API is a practice API that borrows a theme; it is not affiliated with, sponsored or endorsed by the owners of the names it references, which belong to them. Every record it returns is test data for exercising HTTP behaviour, not an authoritative source on the subject.
Last updated