PikaServe (pokemon-api) 2.0.0
This documentation is to help you use the front-end portal, as well as the query endpoint. Please go through the specefic sections carefully to avoid any error. You can always skip to sections from the navigation sidebar present on the left. Quick tip: Use your browser's "find on page" feature to search for a specific resource ( Ctrl+F or Cmd+F )
This project was made for educational purposes. It was recently moved to a payed hosting in the favour of server over a secure connection(https) for modern broswers, which also means faster queries. Please consider supporting me by buying me a coffee if you would like to support development and hosting costs!
This is a consumption-only API — only. No authentication is required to access this API, and all resources are open and available. The API is rate limited to 2500 calls as of now.
The front-end API module is under development, please watch this space for updates
Using the language / framework of your choice:
body.id
or body.name.english
)Confused? You can try pokemon/pikachu, pokemon/500, moves/aerialace, items/masterball, etc.
Getting the hang of it? Navigate using the navigation sidebar to specific endpoints to learn more about them!
/pokemon
/pokemon/all
Retrieves the complete pokemon database.
Request URL : https://api.pikaserve.xyz/pokemon/all
/pokemon/random
Retrives a random pokemon from the database.
Request URL : https://api.pikaserve.xyz/pokemon/random
/pokemon/{name}
Searches the database and retrives pokemon named {name}.
Request URL : https://api.pikaserve.xyz/pokemon/infernape
/pokemon/{pokedexID}
Searches the database and retrives pokemon numbered {pokedexID}.
Request URL : https://api.pikaserve.xyz/pokemon/696
/moves
/moves/all
Retrieves the complete moves database.
Request URL : https://api.pikaserve.xyz/moves/all
/moves/random
Retrives a random move from the database.
Request URL : https://api.pikaserve.xyz/moves/random
/moves/{name}
Searches the database and retrives move named {name}.
Request URL : https://api.pikaserve.xyz/moves/watershuriken
/moves/{movesID}
Searches the database and retrives move numbered {movesID}.
Request URL : https://api.pikaserve.xyz/pokemon/500
/items
/items/all
Retrieves the complete items database.
Request URL : https://api.pikaserve.xyz/items/all
/items/random
Retrives a random item from the database.
Request URL : https://api.pikaserve.xyz/items/random
/items/{name}
Searches the database and retrives item named {name}.
Request URL : https://api.pikaserve.xyz/items/bicycle
/items/{itemsID}
Searches the database and retrives item numbered {itemsID}.
Request URL : https://api.pikaserve.xyz/items/420
/types
/types/all
Retrieves the complete types database.
Request URL : https://api.pikaserve.xyz/types/all
/types/random
Retrives a random type from the database.
Request URL : https://api.pikaserve.xyz/types/random
/types/{name}
Searches the database and retrives type named {name}.
Request URL : https://api.pikaserve.xyz/types/fairy
/types/{typesID}
Searches the database and retrives type numbered {typesID}.
Request URL : https://api.pikaserve.xyz/types/15
fetch
using npm (or yarn)npm i fetch
or
yarn add node-fetch
PikaServe.js
const fetchUrl = require("fetch ").fetchUrl;
const url = 'https://api.pikaserve.xyz/pokemon/random';
fetchUrl(url, function(error, meta, body) {
if (!error) {
var data = new String();
data = JSON.parse(body)
// Do something with data
console.log(data)
}
});
node PikaServe.js
// Sample Output
{
id: 799,
name: {
english: 'Guzzlord',
japanese: 'アクジキング',
chinese: '恶食大王',
french: 'Necrozma'
},
type: [ 'Dark', 'Dragon' ],
base: {
HP: 223,
Attack: 101,
Defense: 53,
'Sp. Attack': 97,
'Sp. Defense': 53,
Speed: 43
}
}
requests
using pip or any other package managerpip install requests
PikaServe.py
import requests
import json # For formatting the output
response = requests.get("https://api.pikaserve.xyz/pokemon/random")
# Do something with response data
print(json.dumps(response.json(), sort_keys=True, indent=4)) #Or simply print(response.json())
python -u "{pathToFile}\PikaServe.py"
{
"base": {
"Attack": 65,
"Defense": 95,
"HP": 40,
"Sp. Attack": 60,
"Sp. Defense": 45,
"Speed": 35
},
"id": 109,
"name": {
"chinese": "\u74e6\u65af\u5f39",
"english": "Koffing",
"french": "Smogo",
"japanese": "\u30c9\u30ac\u30fc\u30b9"
},
"type": [
"Poison"
]
}
You can see a live example with this Google Colab notebook.
-----------------------------------------------------------------------------------------
Version 2.0.0 - Apr 6th, 2022
-----------------------------------------------------------------------------------------
- domain changed and updated
- project name changed (from pokemon-api to pikaserve)
-----------------------------------------------------------------------------------------
Version 1.4.0 - Oct 24th, 2020
-----------------------------------------------------------------------------------------
- /items structure changed
- /items returns name in English, Japanese and Chinese
-----------------------------------------------------------------------------------------
Version 1.3.0 - Oct 24th, 2020
-----------------------------------------------------------------------------------------
- Added image links (hires,thumbs,sprites) in /pokemon
Check the file versionHistory.md in the Github repository for the full version history
Source code released under GNU GPLv3 License.
For more information about copyright and license check choosealicense.com.
Pokémon and Pokémon character names are trademarks of Nintendo and The Pokémon Company.