Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Temtem API

A JSON API to return data about the game Temtem from the Official Wiki, that is updated every 4 hours.


git clone
cd temtem-api

I used node@10.17.0 to develop it.

NPM Scripts

Script Description
dev Starts the local development server on http://localhost:3000, or whatever PORT is specified in env.
build Builds server.
start Started built server.
lint Runs tslint against project.
prettier Runs prettier against project, writing corrections.
prettier:check Runs prettier against project, used by CI to check project.
test ⚠️ TODO ⚠️
data Runs data fetching scripts, you can filter them with a comma-separated list of codecs, and pass -D or --dry to do a dry run with no writes.
assets Runs asset fetching scripts.
summary Generates summary of fetched data.
checker Checks generated data against codecs in ./scripts/checker/codecs using io-ts.
sync Sequentially runs yarn data, yarn assets, and yarn summary.
push Pushes ./data and ./public changes to GitHub.
sync:push Sequentially runs yarn sync followed by yarn push.


Environment Variable Description
CIRCLECI_TOKEN Token for CircleCI, used in the /api/info endpoint to get status of last build.
GA_TOKEN Token for google analytics, used on server to see API endpoint usage numbers.


URL Docs

Data / Asset Fetching

The data and asset scripts can be found in ./scripts/data and ./scripts/assets.

The data scripts are executed first, with get[Entity] which gets the list of items with basic information from a category page or something similar, followed by embellish[Entity], that goes to each items page directly to embellish it with extra information. The data files are written to the ./data directory.

got is used as the request library, and cheerio is used to parse the fetched HTML.

Once the data scripts are done, assets are collected, usually from items found in the data scripts execution and in the resulting .json files in ./data.

After this a summary file is created, listing all produced data files, and when they were updated.

Then the files in ./data are checked against codecs in ./scripts/checker/codecs to see if the produced shapes conform to what's expected, using io-ts.

The ./data and ./public directories are then pushed to GitHub, where now will deploy the changes.


Some extremely fuzzy and out of date types are available from @maael/temtem-types.


  • Make sure prettier has been run, it should do it as a pre-commit hook thanks to husky and pretty-quick.

Also fair warning, I made this quick, so while it is Typescript, it's super loose with anys all over the place.



  • Breeding API endpoint
  • Maybe automatic typing with quicktype or something
  • Finish making data available under graphql endpoint. (minimal example here)



🐾 An API for Temtem data, from the official wiki, updated every 4 hours.