What is this?
This website provides a RESTful API interface to highly detailed objects built from thousands of lines of data related to Pokémon. We specifically cover the video game franchise. Using this website, you can consume information on Pokémon, their moves, abilities, types, egg groups and much, much more.
What is an API?
An API (Application Programming Interface) is a contract that allow developers to interact with an application through a set of interfaces. In this case, the application is a database of thousands of Pokémon-related objects, and the interfaces are URL links.
A RESTful API is an API that conforms to a set of loose conventions based on HTTP verbs, errors, and hyperlinks.
Aren't there 101 other Pokémon websites already?
Yes and that's exactly the problem!
101 instances of the same website means 101 instances of the same data.
We aim to provide a single source of data that any number of other websites can consume and use.
Often, and especially when new Pokémon games or updates are released, those 101+ websites take weeks to update as people have to enter the same information in all those different places.
This solves that problem. If all those sites consumed their data from here, they would have the exact same information that is updated at exactly the same time, with no errors between each website. The overall benefit is a better collaboration and consistency across all the different Pokémon websites and applications. It's good for all!
How much information is stored here?
We currently have tens of thousands of individual items in our database, including:
- Pokémon (including various forms)
- Egg Groups
- Game Versions
- Pokémon Evolution Chains
And that's just scratching the surface! To see all the different types of data we have, check out the docs.
The API is missing stuff!
We know! Feel free to contribute to open issues on GitHub.
So who built this?
This is where Zane Adickes jumped in. Zane thought the original project was a fantastic idea and wanted to help it grow. With direction from Paul, Zane created the V2 API using an exact mirror of Veekun's data related to the main series of games.
During summer 2018, Paul decided to hand over the project to the community. This is where Tim Malone, Mark Tse, Sargun Vohra, Charles Marttinen, Alessandro Pezzé, Alberto Oliveira da Silva, and Lucio Merotta came together and started planning how to change the infrastructure in order to improve performance and cut down on hosting costs. An important step was to convert the API to serve static JSON files, which was made possible by Sargun and his excellent PokeAPI/ditto tool. The frontend website was also re-built by Charles at the same time. The whole process was completed in October 2018.
After this massive redesign, PokéAPI gained many new consumers due to its new blazing fast performance. To give a quick reference, the loading of the infamous Magikarp pokemon resouce passed from seconds to ~80ms. An important milestone for the PokéAPI project happened shortly after in summer 2020, when its GitHub repository reached 2000 stargazers and in a single month fulfilled 100 million API calls.
In August 2020 the PokéAPI community decided to temporarily fork veekun/pokedex, which was the primary and only source of data. This operation was planned in order to add new generation-8 data, which Veekun lacked. The following people contributed to fetching and formatting generation-8 data: Alessandro Pezzé, Hoang Quoc Trung, Chandler Mahkorn, André Sousa, Alexander Whan, Austin Jones, tomi-912 and Eric Donders.
We also have a GitHub organisation of contributors that you are welcome to join!
Where did you get all of this data?
We gathered the information on this site from various resources:
- Veekun has a fantastic Pokedex which is also an open source project containing a ton of csv data. We used this to flesh out the database that powers Pokéapi.
- Generation 8 data is currently being added to the API by the PokeAPI community. The data is scraped from different resources which are considered to be trustful. Keep in mind that this data might be subject to changes and to corrections. If you want to partecipate and help us adding new generation 8 data, read more here.
We'd also like to thank:
- Laven Pillay, who scraped together most of the sprites used on the site.
- Alessandro Pezzé, who worked tirelessly to add the Sun/Moon updates.
What's the technology stack?
Up until November 2018, the API and website were built together in a single Python project using the Django framework and paired with a PostgreSQL database to store the data. Django REST Framework was used to expose the data through a RESTful API. The entire stack was deployed at DigitalOcean, initially paid by Paul and then sponsored directly by DigitalOcean itself.
In October 2018, the API was converted to serve static JSON files in a fully backwards compatible manner. This allowed PokéAPI to move its hosting to a cheap static hosting solution (Firebase Hosting + Cloudflare Caching), which increased performance and stability by a huge margin.
The move to static hosting was solved by introducing a build step before deployment performed by CircleCI, our build system. This build step starts a local Django copy of PokeAPI/pokeapi and saves each possible endpoint as a JSON file using PokeAPI/ditto. All these JSON files are then uploaded to Firebase and served to the public through a Firebase function actioned by CircleCI.