Tutorial: Track canon changes on a Fandom wiki
Monitor how a Fandom wiki's canon pages change over time: when lore-critical statements appear, disappear, or are rewritten — and how editorial consensus shifts.
1. Point Refract at a Fandom wiki
Section titled “1. Point Refract at a Fandom wiki”Fandom wikis use the standard MediaWiki API. Pass --api with the wiki's API endpoint:
refract analyze "Midi-chlorian" --api https://starwars.fandom.com/api.php --depth brief --jsonbrief reads the latest 20 revisions and prints one event per line, without the
changed text.
Use the title of the page itself. Redirects are not followed: "Darth_Vader" on this wiki redirects to "Anakin Skywalker", and analyzing it reports the redirect page's own history.
2. Bound each run
Section titled “2. Bound each run”Fandom API rate limits differ from Wikipedia, and the revision cache (-c) is not
used with --api: every run fetches from the wiki. Give a revision range to keep the
run small and repeatable:
refract analyze "Midi-chlorian" --api https://starwars.fandom.com/api.php --from 15147177 --to 15819492 --jsonThis range holds 20 revisions. Without --from and --to, detailed depth reads
the page's whole history.
3. Export for comparison
Section titled “3. Export for comparison”refract export "Midi-chlorian" --api https://starwars.fandom.com/api.php --from 15147177 --to 15819492 --format ndjson > canon-events.jsonl4. Track a specific lore claim
Section titled “4. Track a specific lore claim”refract claim "Midi-chlorian" \ --text "midi-chlorians" \ --api https://starwars.fandom.com/api.php --limit 20This prints the matching sentence in each of the latest 20 revisions, then when the
passage was first matched, changed, removed or reintroduced within them. Without
--limit the latest 50 are read; --from and --to select an earlier range.
5. Watch for new edits
Section titled “5. Watch for new edits”refract watch "Midi-chlorian" --api https://starwars.fandom.com/api.php --interval 60000Polls the wiki every 60 seconds and prints new events as they appear. Press Ctrl+C to stop.
Understanding what you see
Section titled “Understanding what you see”Fandom wikis differ from Wikipedia in important ways:
| Signal | On Wikipedia | On Fandom wikis |
|---|---|---|
sentence_first_seen |
New factual claim | New character backstory, power level, or timeline entry |
sentence_removed |
Claim removed (possibly contested) | Retcon — lore being erased or rewritten |
category_added / category_removed |
Content tagging change | Canon classification shift (e.g., "Canon characters" → "Legends characters") |
template_added |
Policy template | "Citation needed" on lore claims, "Speculation" tags |
revert_detected |
Editorial dispute | Canon war — competing interpretations of what's official |
Retcon detection pattern: Watch for sentence_removed on a long-standing claim
followed by sentence_first_seen with different text in the same section. This is
the mechanical signature of a retcon — old lore replaced by new canon.
Canon divergence across wikis: Compare the same topic across two Fandom wikis with
refract diff. Divergence in categories or template usage between wikis signals
different interpretations of what's official.
Example: 2014 Disney acquisition
Section titled “Example: 2014 Disney acquisition”After Disney acquired Lucasfilm in 2014, many characters and ships had their canon status reclassified. Refract captures this as a pattern of:
category_removed:Canon characterscategory_added:Legends characterssentence_modifiedevents as backstories were rewritten to match new canontemplate_added:{{Legends|canon}}banners
△ category removed (rev 123456→123457) category=canon characters
△ category added (rev 123456→123457) category=legends charactersThe revision IDs and categories above are illustrative; the layout is refract analyze's text output.
Cross-wiki comparison
Section titled “Cross-wiki comparison”For the same fictional universe across competing wikis, use refract diff:
refract diff "Darth_Vader" \ --wiki-a https://lego.fandom.com/api.php \ --wiki-b https://battlefront.fandom.com/api.php \ --depth briefThis prints side-by-side counts for the two wikis over their latest 20 revisions: events by type, sections, citations, templates, categories and wikilinks. The title has to be a page, not a redirect, on both.
Troubleshooting
Section titled “Troubleshooting”- Fandom rate limits: Fandom APIs may throttle more aggressively than Wikipedia.
The cache (
-c) is not used with--api; bound runs with--depth briefor--from/--to, and add--interval 120000forwatchmode if you hit limits. - Private wikis: Pass auth credentials for private or institutional MediaWiki
instances:
--api-key <token>or--api-user <user> --api-password <pass>. - Custom domain wikis: Fandom wikis hosted on custom domains still expose the
MediaWiki API at
https://<domain>/api.php. Find the API endpoint by appending?action=query&format=jsonto the wiki's base URL.