Skip to content

MediaWiki API ​

Your wiki also serves MediaWiki's Action API at /api.php. You sign in once for both APIs; see Authentication. MediaWiki client libraries exist for most languages.

An edit to a Subject, Schema, Layout, or Mapping is an edit to its page and shows in page history and recent changes.

ToUse
Find a page's ID from its title, for the {pageId} endpointsaction=query&titles=
List a page's revisions with editor and time, then read a Subject as of one with ?revisionId=prop=revisions
Poll for what changed since your last sync, deletions includedlist=recentchanges
List the wiki's accounts and their groupslist=allusers
Search pages, including by their Subjects' valueslist=search; for which values it matches, see Making Subjects searchable
Create, edit, move, or delete a pageaction=edit, action=move, action=delete

Rendered page HTML from the Action API leaves out the Subjects that Views and {{#main_subject}} show. Read and write Subjects through NeoWiki's REST API, not through a page's revision slots.

To see every module your wiki offers, open Special:ApiSandbox on it.