Skip to content

Pokemon

Fetch all Pokemon

fetch('https://dummyapi.online/api/pokemon')
.then((response) => response.json())
.then((json) => console.log(json));
Output
[
{
"id": 1,
"pokemon": "Bulbasaur",
"type": "Grass",
"abilities": ["Overgrow"],
"hitpoints": 45,
"evolutions": ["Ivysaur", "Venusaur"],
"location": "Kanto region, Route 2",
"image_url": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png"
},
{
"id": 2,
"pokemon": "Charmander",
"type": "Fire",
"abilities": ["Blaze"],
"hitpoints": 39,
"evolutions": ["Charmeleon", "Charizard"],
"location": "Kanto region, Route 24",
"image_url": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/4.png"
},
...
]

Fetch a single Pokemon

Getting a single Pokemon by ID. In this example, we use the /api/pokemon/1 route.

fetch('https://dummyapi.online/api/pokemon/1')
.then((response) => response.json())
.then((json) => console.log(json));
Output
{
"id": 1,
"pokemon": "Bulbasaur",
"type": "Grass",
"abilities": ["Overgrow"],
"hitpoints": 45,
"evolutions": ["Ivysaur", "Venusaur"],
"location": "Kanto region, Route 2",
"image_url": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png"
}

Show All Available Pokemon

To view all available Pokemon, you can open the Pokemon Endpoint in your browser.