The Nookipedia API is a free RESTful service provides endpoints for retrieving Animal Crossing data pulled from the Nookipedia wiki, the largest community-driven encyclopedia about the series. Built using Python and Flask, the key benefit of using this API is access to clean structured data spanning the entire Animal Crossing series, pulled from information that is constantly updated and expanding as editors work on the wiki.
Visit https://api.nookipedia.com/ for more information.
Our primary method of supporting users and developers is through the Nookipedia Discord; API users and contributors are granted access to the private #wiki-api channel where they can participate in a community of practice and receive near round-the-clock support.
You may also open an issue here on GitHub if you need help, would like to request a feature, or have a bug to report.
Anyone is welcome and encouraged to contribute to this API!
See the contributing guide for full details and guidance.
Nookipedia, which runs on the MediaWiki wiki software (same as Wikipedia), utilizes the Cargo extension. Cargo lets editors store data from templates in structured databases. For example, if you visit any villager's article on Nookipedia (e.g. Rosie), there is an infobox at the top-right of the page; all that information as defined in the infobox is also stored in a database on the backend so that it can be queried elsewhere on the wiki, or externally by third parties. See Nookipedia's Project Database for more information.
This API is essentially a wrapper for the MediaWiki Cargo API that comes as part of the extension. See the MediaWiki cargoquery endpoint for how Cargo tables can be queried directly.
While the Cargo API is freely available for querying, we have our custom-built API for the following reasons:
This application requires Python 3 and venv.
This application has the following dependencies from apt get
:
software-properties-common
memcached
libmemcached-dev
sqlite3
Before running this application:
python3 -m venv env && source env/bin/activate
.
Check if this is successful if (env)
is added at the beginning of your prompt.
activate
with activate.csh
or activate.fish
.pip install -r requirements.txt
<>
values with your desired values.
Note that the API requires a UUID key (<uuid>
) to make calls$ sudo sqlite3 <desired_db_name>.db
sqlite3> CREATE TABLE <keys_table_name> ( key varchar(32), email TEXT, project TEXT );
sqlite3> CREATE TABLE <admin_keys_table_name> ( key varchar(32) );
sqlite3> INSERT INTO <keys_table_name> VALUES ( "<uuid>", "test", "test" );
sqlite3> .exit 0;
config.ini
:
SECRET_KEY
with a long random string of bytes (used for securely signing the session cookie; learn more)DATABASE
, DB_KEYS
, and DB_ADMIN_KEYS
with <desired_db_name>.db
, <keys_table_name>
, and <admin_keys_table_name>
(fill in values respective to what was used to instantiate the database above)dashboard-config.cfg
, change the dashboard's password to something other than the default admin
.flask run --host=0.0.0.0
. Easy.
Note that Flask's built-in server is not suitable for production.
There are a variety of options out there for setting up a proper production server (cloud services, Gunicorn, uWSGI, etc.). Visit Flask's deployment page for a list of options.
Nookipedia's API is deployed via uWSGI and nginx. If you'd like to set up something similar and need help, feel free to get in touch.
The Nookipedia API codebase is licensed under the MIT license. See license file for full text.
Dependencies are copyright their respective authors and used under their respective licenses.