Fetch Pokémon data including stats, types, abilities, and sprites.
pokemonpassing, 0.1s/v1/games:pokeapi/pokemon5m cache1 paramchecking key…// npm i zpi-sdk
import { ZpiClient } from "zpi-sdk";
const client = new ZpiClient({ apiKey: "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" });
const data = await client.run("games:pokeapi", "pokemon", {
"name": "pikachu"
});
console.log(data);curl -X GET "https://api.zpi.web.id/v1/games:pokeapi/pokemon?name=pikachu" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"/v1/games:pokeapi/pokemonGet Pokémon details by name or ID.namestringrequiredcurl -X GET "https://api.zpi.web.id/v1/games:pokeapi/pokemon?name=pikachu" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"id": 25,
"ok": true,
"name": "pikachu",
"stats": [
{
"base": 35,
"name": "hp",
"effort": 0
},
{
"base": 55,
"name": "attack",
"effort": 0
},
{
"base": 40,
"name": "defense",
"effort": 0
},
{
"base": 50,
"name": "special-attack",
"effort": 0
},
{
"base": 50,
"name": "special-defense",
"effort": 0
},
{
"base": 90,
"name": "speed",
"effort": 2
}
],
"types": [
"electric"
],
"height": 4,
"weight": 60,
"species": "pikachu",
"sprites": {
"back": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/25.png",
"home": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/home/25.png",
"front": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/25.png",
"official": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/25.png",
"shinyFront": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/25.png"
},
"abilities": [
{
"name": "static",
"slot": 1,
"isHidden": false
},
{
"name": "lightning-rod",
"slot": 3,
"isHidden": true
}
],
"baseExperience": 112
}