/w/rest.php/v1/page/.
GET /v1/page/{title}
Returns the latest revision’s wikitext source, metadata, and license information for a page.Path parameters
The page title, URL-encoded. Use underscores instead of spaces (e.g.,
Talk:Main_Page).Response
The page ID.
The page title in URL-key form (with underscores).
The page title with spaces as it appears on the wiki.
Information about the most recent revision.
The content model identifier (e.g.,
wikitext, json, css).The license under which this page’s content is available.
The raw wikitext source of the latest revision.
Present only when the page is a redirect and the
redirect=no query parameter was passed. Contains the URL of the redirect target.GET /v1/page/{title}/bare
Returns page metadata without the wikitext source, plus a URL pointing to the HTML representation. Useful for clients that need only page identity and a pointer to rendered content.Path parameters
The page title, URL-encoded.
Response
The page ID.
The page title in URL-key form.
The page title with spaces.
Latest revision ID and timestamp.
The content model identifier.
License URL and title.
The URL from which the Parsoid HTML for this page can be fetched (points to the
/html endpoint).GET /v1/page/{title}/html
Returns the Parsoid HTML for the latest revision of a page. The response body istext/html, not JSON.
Path parameters
The page title, URL-encoded.
Headers
A BCP 47 language tag for variant conversion (e.g.,
zh-hans for Simplified Chinese). When provided, the HTML is variant-converted before being returned.The response is
text/html, not JSON. The HTML is produced by Parsoid and conforms to the MediaWiki Parsoid HTML specification.GET /v1/page/{title}/with_html
Returns the same metadata as/v1/page/{title} (without the source field) combined with the Parsoid HTML in a single JSON response.
Path parameters
The page title, URL-encoded.
Response
Same fields as the/bare endpoint, plus:
The full Parsoid HTML of the page as a string.
Present only when the page is a redirect and
redirect=no was passed.GET /v1/page/{title}/history
Returns up to 20 revisions of a page per request, ordered from newest to oldest by default. Supports cursor-based pagination and optional filtering by revision type.Path parameters
The page title, URL-encoded.
Query parameters
Return revisions older than this revision ID. Cannot be combined with
newer_than.Return revisions newer than this revision ID. Cannot be combined with
older_than.Limit results to revisions of a specific type. One of:
anonymous, bot, reverted, minor.Response
Up to 20 revision objects, each containing:
URL to this endpoint without pagination parameters (the canonical URL for this page’s history).
URL to fetch the next (older) page of results. Absent when there are no older revisions.
URL to fetch the previous (newer) page of results. Absent when there are no newer revisions.
GET /v1/page/{title}/history/counts/{type}
Returns a count of revisions of the specified type. Counts are capped at a type-specific maximum and cached.Path parameters
The page title, URL-encoded.
The type of revision to count. One of:
anonymous, temporary, bot, editors, edits, minor, reverted.Query parameters
Count revisions starting from this revision ID (inclusive). Only valid for
edits and editors types; both from and to must be provided together.Count revisions up to this revision ID (inclusive). Only valid for
edits and editors types.Response
The count of revisions. Capped at a maximum that varies by type (e.g., 30,000 for
edits, 25,000 for editors, 1,000 for minor).true when the actual count exceeds the maximum and the returned count is the cap value.GET /v1/page/{title}/links/language
Returns all interlanguage links for a page — links to the same topic in other language wikis.Path parameters
The page title, URL-encoded.
Response
An array of language link objects, ordered by language code:BCP 47 language code (e.g.,
fr, de, zh).The language name in the content language of the current wiki.
The page title in the target wiki in DB-key form (with underscores).
The page title in the target wiki with spaces.
GET /v1/page/{title}/links/media
Returns a list of media files (images, videos, audio files) used on the page.Path parameters
The page title, URL-encoded.
Response
See the Files API for the structure of individual file objects. The response is an array of file metadata objects.PUT /v1/page/{title}
Creates a new page or updates an existing one by replacing its wikitext. Requires authentication.Path parameters
The page title to create or update, URL-encoded.
Body parameters
The full wikitext source for the new revision.
The edit summary.
The content model for the page (e.g.,
wikitext, json). Defaults to the page’s existing content model or wikitext for new pages.Must be provided when updating an existing page. Contains
id (integer) — the revision ID the edit is based on. If the page has been edited since this revision, a 409 Conflict edit-conflict response is returned.Required when authenticating with cookies. Retrieve via
action=query&meta=tokens. Not required when using OAuth.Response
On success, returns the same structure asGET /v1/page/{title} (page source and metadata) with HTTP 200 for an update or 201 for a creation.
POST /v1/page
Creates a new page. Returns409 Conflict if a page with the given title already exists. Requires authentication.
Body parameters
The title of the page to create.
The full wikitext source for the new page.
The edit summary for the creation.
The content model for the new page. Defaults to
wikitext.Required when authenticating with cookies. Not required when using OAuth.
Response
On success, returnsHTTP 201 Created with the page source and metadata (same structure as GET /v1/page/{title}), plus a Location response header pointing to the newly created page’s canonical REST URL.
