Static API

All rules data. One namespace.

Auto-generated JSON and Markdown endpoints for every game, variant, oracle table, and entity. No auth, no rate limits, no manual updates.

Games
Variants
Oracle Tables
Entities
Endpoints

Quick Links

Per-Game Endpoints

Every published game gets its own namespace. The pattern is consistent — only the slug changes.

Metadata /api/rules/{slug}/meta.json
Rulebook /api/rules/{slug}/rulebook.md
Variants /api/rules/{slug}/variants/{variant}.md
Component games /api/rules/{slug}/games/{game}.md
Sub-pages /api/rules/{slug}/pages/{section}/{page}.md
Data files /api/rules/{slug}/data/{file}.json
Oracle tables /api/rules/{slug}/oracles.json

All Endpoints

Loaded live from /api/index.json. This list updates automatically on every build.

PathTypeDescription

Deprecations

Old bundled snapshots being replaced. Consumers should migrate to the /api/ equivalents.

Old LocationReplacementConsumer

How It Works

The API is a build artifact. No server, no database, no Worker. Adding a game or variant to the source automatically exposes it at a predictable URL on the next deploy.

Source games/backgammon/content/variants/standard.md
Build output dist/api/rules/backgammon/variants/standard.md
Live URL https://rules.moddable.games/api/rules/backgammon/variants/standard.md

To extend the API with new metadata fields, add them to rulebook frontmatter. The build reads whatever is there — no registration, no schema to update.