Wiki API

An open, read-only API: articles, history, search and recent changes as JSON. For bots, widgets, apps and whatever else you think of.

Read-onlyWhat a guest sees: live pages and accepted edits. Drafts and edits waiting for review are left out.
No keyNo sign-up. There is a per-minute limit per address, the same as the site's own.
From a browserAny site may call it directly: answers carry Access-Control-Allow-Origin: *.

Base address

https://beta.filian.wiki/api/v1

Every path below starts here. The full description, for client generators: openapi.json

What there is

RequestWhat it givesParameters
GET /The wiki and the API's addresses
GET /pagesLive pages by address, 50 at a time (up to 200)ns locale limit after
GET /pages/{path}A page: Markdown text, ready HTML, categories, translations, the last editlocale format=markdown|html|both
GET /pages/{path}/historyA page's accepted edits, newest firstlocale limit before
GET /revisions/{id}One accepted edit in full
GET /searchArticles by title and text, with passagesq locale all limit offset
GET /recentRecent edits across the wikilocale limit before
GET /categories/{key}Pages in a categorylimit after

Try it

The links below open real answers from this wiki:

curl

curl -s "https://beta.filian.wiki/api/v1/pages/chronology" | jq '.title, .revision.created_at'

JavaScript

const res = await fetch("https://beta.filian.wiki/api/v1/search?q=" + encodeURIComponent("chronology"));
const { items } = await res.json();
for (const hit of items) console.log(hit.title, hit.url);

An answer

Dates are UTC, in RFC 3339. Every link in an answer is absolute, and the HTML has absolute addresses already, so it can go anywhere.

{
  "path": "chronology",
  "title": "…",
  "locale": "en",
  "url": "…",
  "revision": { "id": "…", "created_at": "…", "author": { "name": "…" } },
  "categories": [{ "key": "…", "name": "…", "url": "…" }],
  "translations": [{ "locale": "…", "title": "…", "url": "…" }],
  "markdown": "…",
  "license": "https://beta.filian.wiki/license"
}

Paging

Lists carry a next field. Pass it as after (pages, categories) or before (history, recent changes) for the next part. When next is empty, there is no more.

{ "items": [ … ], "next": "…" }
GET /pages?after=…
GET /pages/{path}/history?before=…

Errors

An error always looks the same:

{ "error": { "code": "not_found", "message": "no such page" } }
HTTPWhen
400A bad parameter: message says which
404No such page, edit or category
429Too often: wait as many seconds as Retry-After says

Rules