WikiHist.html: English Wikipedia's Full Revision History in HTML Format

Blagoj Mitrevski, Tiziano Piccardi, Robert West

Introduction

For years, researchers analyzing Wikipedia have relied on official data dumps provided in wikitext—the raw markup language used by editors. However, wikitext is merely a "blueprint" for the final page. When a reader visits Wikipedia, the MediaWiki engine parses this markup into HTML, dynamically expanding templates, modules, and macros to generate infoboxes, navboxes, and citations.

Researchers have recently released WikiHist.html, the first complete revision history of English Wikipedia in HTML format. By parsing 580 million historical revisions, the authors demonstrate that studying raw markup provides only a "mere approximation" of the actual user experience, revealing that over 50% of Wikipedia's internal links are invisible in raw wikitext.

The Problem: The Wikitext Gap

Until now, obtaining the "true" HTML view required using Wikipedia’s REST API, which suffers from two critical limitations:

  1. Scale: The API is far too slow to process billions of historical revisions.
  2. Historical Inaccuracy: The current API parses old wikitext using current templates. If a template was updated in 2020, an article from 2010 parsed today would look different than it did to a reader a decade ago.

This discrepancy creates a "wikitext gap," where the data researchers analyze does not match the information actually presented to the public.

Methodology: A Parallelized Historical Pipeline

To bridge this gap, the authors developed a custom, highly optimized pipeline designed for historical accuracy and massive scale.

The parallelized parsing pipeline used to generate WikiHist.html.

Historical Macro Expansion

The system's "secret sauce" is its ability to handle historical templates. The authors modified the MediaWiki code with a custom interceptor. When the parser encounters a template, the system looks up the specific version of that template that was active at the exact time the article revision was created. This ensures that the generated HTML is a faithful reconstruction of what was visible to readers at that point in history.

Architecture and Scaling

The pipeline bypassed the remote API by running local instances of MediaWiki across four high-end servers (192 cores total). Each core ran a parent process that streamed XML data to a dedicated child process containing a MediaWiki instance and a MySQL backend. This containerized approach allowed the system to parse nearly 1 TB of compressed wikitext into 7 TB of HTML in just 42 days—a feat that would be functionally impossible via standard API calls.

Key Results and Insights

The most striking finding is the prevalence of "HTML-only" links. In a sample of 404,000 articles, the authors found that HTML versions contained more than twice as many internal links as the raw wikitext.

Growth of internal and external links per article in HTML vs. wikitext (2010–2019).

As shown in the data, the gap between wikitext and HTML has widened significantly over the last decade. This suggests that templates have become the primary engine of Wikipedia, pulling in massive amounts of relational data that researchers interested in social networks or information flow have previously missed.

Furthermore, these HTML-only links are not just "extra" metadata; they are vital for navigation. By cross-referencing with Wikipedia Clickstream data, the authors found that 1.3 million links present in user click logs (representing 6.1% of all article-to-article clicks) are entirely absent from wikitext. These links, often found in footer navboxes, are clicked just as frequently as those in the main body text.

Limitations and Future Work

While WikiHist.html provides an unprecedented view of Wikipedia's history, it has certain limitations:

  • Deleted Pages: The dataset is based on Wikipedia's "meta-history" dumps from March 2019. If a page or template was deleted before that date, its history is lost and cannot be reconstructed.
  • Software Versions: While the authors used historically accurate templates, they used a single version of the MediaWiki software (v1.31) for all parsing. While tests showed minimal impact, the rendering engine itself has evolved slightly over 18 years.

The authors have released their code to encourage the production of similar HTML histories for other Wikipedia language editions, moving the research community closer to seeing the web through the eyes of its actual users.

Summary updated

BibTeX
@inproceedings{mitrevski2020wikihist,
  author = {Blagoj Mitrevski and Tiziano Piccardi and Robert West},
  title = {{WikiHist.html: English Wikipedia's Full Revision History in HTML Format}},
  booktitle = {ICWSM},
  year = {2020},
}
Figure