The Dataset Viewer has been disabled on this dataset.

2009scape wiki knowledge base

The built dataset behind 2009scape-wiki-api: the raw 2009scape game sources (items, NPCs, shops, drop tables, quests, locations) turned into one immutable, searchable SQLite file, served over an HTTP JSON API and an MCP server.

Nothing here is edited by hand. Every release is written by that repository's pipeline and uploaded whole, so a given data_version is one file that can be served again later.

This project is a work in progress. Builds so far are seed sized, enough to exercise the API end to end rather than to cover the whole game. First tier sources have been added so far, next week the full injestation is planned.

What is in it

file what it holds
knowledge.sqlite3 the dataset a deployment serves
tests/knowledge.sqlite3 the hand made build the test suite uses, kept apart so it never stands in for the real one

Both files carry the same schema, so anything that reads one reads the other.

Reading it

import sqlite3
from huggingface_hub import hf_hub_download

path = hf_hub_download(
    "arsalan-anwari/2009scape-wiki-api-data",
    "knowledge.sqlite3",
    repo_type="dataset",
)
db = sqlite3.connect(f"file:{path}?mode=ro", uri=True)
print(dict(db.execute("select key, value from meta")))
print(db.execute("select name from entity where type = 'item' limit 5").fetchall())

The file is a plain SQLite database with an FTS5 index, so sqlite3 on the command line reads it too, and nothing in this repository has to be installed to look at it.

Schema

table what it holds
entity one row per item, NPC, shop, quest or location, with its slug, description, icon, JSON attributes and where it came from
edge one row per relationship between two entities: drops, sells, staffed_by, rewards, uses_ammunition, located_in, part_of
entity_alias retired slugs, shorthand and alternate names, so a name that moved still resolves
entity_fts the FTS5 index behind search and near name matching
price_history daily Grand Exchange values per item, dated ISO-8601
meta which build this is

Variants are recorded rather than dropped: a noted, bound, placeholder or duplicate row points at its canonical entity through canonical_id, and visibility says whether a row is published or hidden. Every row names its source, source_file and game_version.

Which build this is

meta carries five keys, which is how a client tells builds apart:

key what it means
data_version the build's identity, and what the API reports and caches against
content_hash the hash of the content, equal for two builds that say the same thing
schema_version the shape of the tables above
game_version the game sources the build was made from
built_at when it was written

Where it comes from

Built from the 2009scape server's own configuration and code, Grand Exchange price snapshots, and a small set of hand written overlays. The pipeline and this card are Apache-2.0; the game data it derives from belongs to the 2009scape project and is covered by that project's terms.

Downloads last month
44