compare-pages
Compare two wiki page versions to get a compact text diff showing only changes. Supports revision IDs, page titles, or supplied wikitext, with an option for lightweight change detection without full diff.
Instructions
Returns the changes between two versions of a wiki page as a compact text diff. Each side accepts a revision ID, page title (latest revision), or supplied wikitext; text-vs-text is rejected. Only the changes are returned over the wire. For the full text of both sides, fetch with get-page instead. If a title or revision ID does not exist, an error is returned. Set includeDiff=false for a cheap change-detection response that skips diff rendering and returns just the change flag, revision metadata, and size delta. Diff output is truncated at 50000 bytes by default with a trailing marker; a narrower revision range or includeDiff=false avoids truncation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromRevision | No | Revision ID for the "from" side | |
| fromTitle | No | Wiki page title for the "from" side (latest revision is used) | |
| fromText | No | Supplied wikitext for the "from" side | |
| toRevision | No | Revision ID for the "to" side | |
| toTitle | No | Wiki page title for the "to" side (latest revision is used) | |
| toText | No | Supplied wikitext for the "to" side | |
| includeDiff | No | Include the diff body (default true). Set false for a cheap change-detection response. |