MediaWiki Get Page Content icon

MediaWiki Get Page Content

Retrieve the content of a MediaWiki page

MediaWiki Get Page Content

AI-generated

Summary

Fetches a MediaWiki page by title and returns its content as raw wikitext, plain-text extract, or rendered HTML, with optional page metadata. Logs in with bot credentials on each input item before reading.

Inputs

  • Page Title (required) — Title of the page to retrieve (e.g. "Main Page"). Errors if the page doesn't exist or has no retrievable revision.
  • Wiki URL — Overrides the site URL from the mediaWikiApi credentials. "/api.php" is appended if missing.
  • Content — Representation to return. Raw Wiki Code (default) gives the latest revision's wikitext from the main slot. Parsed Page gives a plain-text extract (TextExtracts, redirects followed). HTML gives the rendered page from index.php?action=render.
  • Options > Include Metadata — Defaults to true. When on, adds pageId, title, contentModel, lastModified and lastModifiedBy to the output.

Output shape

One output item per input item, with json containing content (string) and contentType (the selected option). With metadata enabled it also contains pageId, title, contentModel, lastModified and lastModifiedBy.

Metadata always comes from the raw revision query, even for Parsed or HTML content. Parsed Page needs the TextExtracts extension on the wiki, and returns an empty string if no extract is available. If Continue On Fail is enabled, failed items return json {error: message}. Otherwise the node throws. Requires the mediaWikiApi credential (siteUrl, botUsername, botPassword). The node logs in separately for every item.

Examples

Example 1: Pull a page's wikitext for editing or diffing in a later step

Page Title = "Main Page", Content = Raw Wiki Code, Include Metadata on.

Example 2: Feed a page's readable text into an LLM or summarizer

Page Title from an expression like {{$json.title}}, Content = Parsed Page, Include Metadata off.

Example 3: Get rendered HTML from a different wiki using the same bot login

Wiki URL = https://wiki.other.example.com, Page Title = "Help:Contents", Content = HTML.

Links

Discussion