# Wikipedia Revision History Scraper — Page Edit History by Date (`logiover/wikipedia-revision-history-scraper`) Actor

Scrape the complete edit / revision history of any Wikipedia page. Every edit: who, when, summary, byte size + delta, tags, minor flag, revision IDs. Any language, any MediaWiki project, category expansion, date & user filters. No API key, no login.

- **URL**: https://apify.com/logiover/wikipedia-revision-history-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Wikipedia Revision History Scraper — Full Page Edit History by Date (No API Key)

![Apify Actor](https://img.shields.io/badge/Apify-Actor-00A67E?logo=apify&logoColor=white) ![No API key](https://img.shields.io/badge/No%20API%20key-required-2ea44f) ![Pay per result](https://img.shields.io/badge/Pricing-Pay%20per%20result-1C7ED6) ![Developer Tools](https://img.shields.io/badge/Category-Developer%20Tools-6E56CF) ![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-F59E0B)

Extract the **complete revision (edit) history** of any **Wikipedia** page — or any page on Wiktionary, Wikibooks, Wikiquote, Wikinews, Wikisource, Wikiversity or Wikivoyage. This Wikipedia revision history scraper returns **every edit ever made** to a page as clean, flat rows: **who** edited, **when**, the **edit summary**, the **byte size and byte delta**, change **tags**, the **minor-edit flag**, revision and parent IDs, the content **SHA-1** and a permanent link to view each revision. It works for **any language edition**, can expand an entire **category** into hundreds of pages, and filters by **date window** or **editor**. Fast, no browser, **no Wikipedia account, no API key, no login** — powered directly by the keyless MediaWiki Action API.

> ### 🏆 Why this Wikipedia revision history scraper?
> **Every edit as a flat row** · **thousands of revisions per run** · byte-level `sizeDelta` per edit · date-bounded windows going back to a page's first edit · filter by editor · expand a whole category · any language, any MediaWiki project · export to JSON / CSV / Excel. The unofficial **Wikipedia edit-history / MediaWiki API alternative** for research, contributor analytics, vandalism detection and AI training corpora.

---

### What does this Actor do?

The Actor queries the official, **keyless MediaWiki Action API** (`/w/api.php`) with `action=query&prop=revisions` against the wiki host you choose (for example `https://en.wikipedia.org/w/api.php`). For each page it pages through the entire history using the API's `rvcontinue` token — fetching up to 500 revisions per request — until it has the depth you asked for or the page runs out of edits. It requests `ids | timestamp | user | userid | comment | size | tags | flags | sha1` for each revision, sorts them oldest→newest, and computes the **byte `sizeDelta`** of every edit against the immediately preceding version. Date bounds map to the API's `rvstart` / `rvend` parameters, an editor filter maps to `rvuser`, and an optional **category** is expanded into member pages via `list=categorymembers`. Every request carries a descriptive **User-Agent** and honours the API's `maxlag` politeness signal with exponential backoff. Optionally it can attach the full **wikitext** of each revision.

### Who is it for?

- **Misinformation & edit-war researchers** studying how contentious articles change over time and who is driving those changes.
- **Academics & computational social scientists** building longitudinal datasets of article evolution, contributor behaviour and content growth.
- **Data journalists** reconstructing exactly when and how a claim entered (or left) a Wikipedia page around a news event.
- **AI / NLP & ML teams** assembling revision-level corpora, diff datasets and edit-summary training data.
- **Trust & safety / community analysts** detecting vandalism spikes, anonymous-IP surges and coordinated editing on watched pages.

### Use cases

- **Brand & reputation monitoring** — track every edit to your company's or product's Wikipedia page: who changed what, when, and by how many bytes.
- **Edit-war & controversy analysis** — pull the full history of a disputed article and see the back-and-forth revert pattern in the `comment`, `sizeDelta` and `tags` fields.
- **Contributor auditing** — filter to a single editor or bot and export every revision they ever made to a page.
- **Content-growth studies** — chart an article's `size` over years to see how coverage of a topic expanded or was trimmed.
- **AI training corpora** — with `includeContent` on, capture the full wikitext of thousands of historical versions for diff and rewrite datasets.

### Why use this Actor?

- 🔑 **100% keyless** — no Wikipedia login, no OAuth, no API key, no client secret. It reads the public MediaWiki Action API directly.
- 🧾 **18 fields per revision** — editor, user ID, anonymity, timestamp, edit summary, minor flag, size, byte delta, tags, SHA-1, revision & parent IDs, and a direct permalink to each version.
- 📚 **Bulk & category expansion** — pass many page titles at once, or point it at a **category** and it fans out to hundreds of member pages, each with its full history — thousands of rows per run.
- 🎯 **Precise filters** — narrow by `afterDate` / `beforeDate` (ISO), by a specific `userFilter` editor, and cap depth with `maxRevisionsPerPage`.
- 🌍 **Any language, any project** — set `language` (en, de, fr, es, tr, ja, zh…) and `project` (Wikipedia, Wiktionary, Wikibooks, Wikiquote, Wikinews, Wikisource, Wikiversity, Wikivoyage).
- 📤 **Clean, flat export & pay-per-result** — every edit is one tidy row, exportable to JSON, CSV, Excel, HTML, XML or JSONL, with simple pay-per-result pricing.

### What data can you extract?

Each row is a single revision of a single page. Numbers and booleans are shown as numeric / boolean columns in the dataset view and exported cleanly to CSV, JSON and Excel.

| Field | Type | Description |
|-------|------|-------------|
| `page` | string | Page title the revision belongs to. |
| `pageId` | number | MediaWiki numeric page ID. |
| `language` | string | Wiki language code (e.g. `en`). |
| `project` | string | MediaWiki project (e.g. `wikipedia`). |
| `revId` | number | This revision's unique ID. |
| `parentId` | number | The previous revision's ID (`0` for the first edit). |
| `timestamp` | string | When the edit was made (ISO 8601 UTC). |
| `user` | string | Username or IP address that made the edit. |
| `userId` | number | Numeric user ID (`0` for anonymous / IP edits). |
| `isAnonymous` | boolean | `true` when the edit was made by an IP (not a registered account). |
| `isMinor` | boolean | Whether the editor flagged the edit as minor. |
| `comment` | string | The edit summary left by the editor. |
| `size` | number | Page size in **bytes** after this revision. |
| `sizeDelta` | number | Byte change vs the parent revision (`+` added, `−` removed). |
| `tags` | string | Change tags, comma-joined (e.g. `mobile edit, visualeditor`). |
| `sha1` | string | SHA-1 hash of the revision content. |
| `revisionUrl` | string | Permanent link to view this exact revision. |
| `content` | string | Full wikitext at this revision (only when `includeContent` is enabled). |

#### Example output object

```json
{
  "page": "Bitcoin",
  "pageId": 28249265,
  "language": "en",
  "project": "wikipedia",
  "revId": 1363572085,
  "parentId": 1363571325,
  "timestamp": "2026-07-11T01:38:40Z",
  "user": "Idacticus",
  "userId": 54142316,
  "isAnonymous": false,
  "isMinor": true,
  "comment": "link added",
  "size": 113434,
  "sizeDelta": 44,
  "tags": "visualeditor",
  "sha1": "bd9a2e11915de7e4491e313dbefaa7683957aaeb",
  "revisionUrl": "https://en.wikipedia.org/w/index.php?title=Bitcoin&oldid=1363572085"
}
````

### How to use

You can target pages two ways — list titles directly, or expand a category.

#### Option A — by page title (or URL)

1. Open the Actor and add one or more titles to **Page titles or URLs** (full Wikipedia URLs are accepted and stripped to the title automatically).
2. Set **language** (default `en`) and **project** (default `wikipedia`).
3. Optionally add a **date window**, an **editor filter**, or a **max revisions per page** cap.
4. Click **Start**. Each page is paged to full depth and every edit is saved as one row.

```json
{
  "pages": ["Bitcoin", "ChatGPT", "https://en.wikipedia.org/wiki/Artificial_intelligence"],
  "language": "en",
  "project": "wikipedia",
  "maxRevisionsPerPage": 2000
}
```

#### Option B — by category (huge volume)

1. Put a category name (without the `Category:` prefix) in the **Category** field.
2. Set **Max pages from category** to bound how many member pages are expanded.
3. Click **Start**. The Actor discovers member pages and scrapes each one's full revision history.

```json
{
  "category": "Cryptocurrencies",
  "maxPagesFromCategory": 30,
  "language": "en",
  "project": "wikipedia",
  "afterDate": "2022-01-01",
  "maxRevisionsPerPage": 500
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `pages` | array | `["Bitcoin","ChatGPT"]` | Page titles or full wiki URLs to scrape. |
| `language` | string | `en` | Wiki language / edition code (en, de, fr, es, tr, ja, zh…). |
| `project` | string (select) | `wikipedia` | MediaWiki project (wikipedia, wiktionary, wikibooks, wikiquote, wikinews, wikisource, wikiversity, wikivoyage). |
| `category` | string | `""` | Optional category name (no `Category:` prefix) to expand into member pages. |
| `maxPagesFromCategory` | integer | `50` | Max member pages to expand when `category` is set. |
| `afterDate` | string | `null` | Only revisions made **after** this ISO date (older bound). |
| `beforeDate` | string | `null` | Only revisions made **before** this ISO date (newer bound). |
| `userFilter` | string | `""` | Only revisions by this exact editor (username or IP). |
| `maxRevisionsPerPage` | integer | `2000` | Cap on revisions per page (newest-first). `0` = full history. |
| `includeContent` | boolean | `false` | Include the full wikitext of each revision (heavy, slow). |
| `maxItems` | integer | `0` | Global cap on rows across all pages. `0` = unlimited. |
| `proxyConfiguration` | object | Apify Proxy on | Datacenter proxy by default; used mainly for fresh IPs on retry. |

#### Full input example

```json
{
  "pages": ["Climate change"],
  "language": "en",
  "project": "wikipedia",
  "afterDate": "2020-01-01",
  "beforeDate": "2021-12-31",
  "userFilter": "",
  "maxRevisionsPerPage": 1000,
  "includeContent": false,
  "maxItems": 5000,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### Output example

```json
{
  "page": "ChatGPT",
  "pageId": 72287769,
  "language": "en",
  "project": "wikipedia",
  "revId": 1189998877,
  "parentId": 1189998001,
  "timestamp": "2023-12-14T18:22:05Z",
  "user": "203.0.113.42",
  "userId": 0,
  "isAnonymous": true,
  "isMinor": false,
  "comment": "/* History */ added release detail",
  "size": 208764,
  "sizeDelta": 512,
  "tags": "mobile edit, mobile web edit",
  "sha1": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678",
  "revisionUrl": "https://en.wikipedia.org/w/index.php?title=ChatGPT&oldid=1189998877"
}
```

### Tips for best results

- **Set a `maxRevisionsPerPage` cap** on very active articles — high-traffic pages can have 20,000+ edits. The cap keeps the **newest N** revisions and controls cost.
- **Use date windows for eras.** `afterDate` is the older bound and `beforeDate` is the newer bound; combine them to slice a specific year or event window.
- **Audit one editor** by setting `userFilter` to a username or IP — you get only their edits to each page.
- **Expand categories for scale.** One category can fan out to hundreds of pages; raise `maxPagesFromCategory` deliberately and watch the row count.
- **Leave `includeContent` off** unless you truly need wikitext — it multiplies data size and runtime dramatically.
- **Pass full URLs freely** — `https://de.wikipedia.org/wiki/Berlin` is accepted; just remember to also set `language: "de"` so the API host matches.
- **Sister projects work the same** — set `project` to `wiktionary`, `wikisource`, etc., and the identical engine applies.
- **The oldest emitted row's `sizeDelta`** is anchored by fetching one extra older revision, so deltas are accurate even at your cap boundary.
- **`isAnonymous` / `userId: 0`** marks IP edits — a useful signal for vandalism and unregistered-contributor analysis.
- **Use `maxItems`** as a global budget ceiling across all pages in a single run.

### Integrations

Wire this Actor into your stack with Apify's built-in connectors:

- **Google Sheets** — push each run's revisions straight into a spreadsheet for pivot tables and charts.
- **Slack** — get notified when a monitored page crosses an edit-volume threshold.
- **Zapier & Make** — trigger downstream workflows (alerts, tickets, dashboards) on new revisions.
- **Webhooks** — POST the dataset to your own API or data warehouse when a run finishes.
- **Schedule** — run daily or hourly to keep a rolling archive of a page's or category's edit history.

### API usage

Run the Actor programmatically with the Apify API or clients.

**cURL**

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~wikipedia-revision-history-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pages":["Bitcoin"],"language":"en","maxRevisionsPerPage":500}'
```

**Node.js (apify-client)**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('logiover/wikipedia-revision-history-scraper').call({
    pages: ['Bitcoin', 'ChatGPT'],
    language: 'en',
    project: 'wikipedia',
    maxRevisionsPerPage: 1000,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python (apify-client)**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("logiover/wikipedia-revision-history-scraper").call(run_input={
    "pages": ["Bitcoin"],
    "language": "en",
    "project": "wikipedia",
    "maxRevisionsPerPage": 1000,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Use with AI agents (MCP)

This Actor is a clean, structured data source for LLM agents and MCP-based tools. Point your agent at it to fetch the edit history of any Wikipedia page on demand — for example to answer *"when was this claim added to the article and by whom?"* or to feed revision-level context into a RAG pipeline. An example agent prompt: *"Use the Wikipedia Revision History Scraper to pull every 2024 edit to the 'ChatGPT' article, then summarize who made the largest byte additions and what their edit summaries said."* The flat, typed rows drop straight into tool-calling and retrieval workflows.

### FAQ

#### Do I need a Wikipedia account or API key?

No. The Actor uses the public, keyless **MediaWiki Action API**. There is no login, OAuth, API key or client secret — you just provide page titles.

#### How far back does the history go?

To the page's very first edit. MediaWiki keeps the complete revision history of every page, and the Actor pages through all of it (bounded only by your `maxRevisionsPerPage` and date filters).

#### How many revisions can I get per run?

Thousands, easily. A single busy article can hold 20,000+ edits, and a category expands to many pages. Use `maxRevisionsPerPage`, `maxPagesFromCategory` and `maxItems` to control depth, breadth and total volume.

#### What does `sizeDelta` mean?

It is the byte change of a revision compared with the immediately preceding version — positive when content was added, negative when removed. The oldest emitted row is anchored with an extra fetched revision so its delta is accurate too.

#### A run returned zero rows — why?

Usually the filters excluded everything (a date window with no edits, or a `userFilter` editor who never touched the page), or the page title was misspelled / doesn't exist on that language edition. Missing pages are logged and skipped. Check the log and loosen the filters.

#### Why are some fields empty or `0`?

`userId` is `0` and `isAnonymous` is `true` for IP (unregistered) edits. `comment` is empty when the editor left no summary. `tags` is empty when no change tags apply. `parentId` is `0` on the first-ever edit. These are faithful to the source data.

#### Can I export to CSV, JSON or Excel?

Yes. Open the **Output/Dataset** tab and download as CSV, JSON, Excel, HTML, XML or JSONL, or pull the data via the Apify API and webhooks. Every revision is a flat row, so it imports cleanly into spreadsheets and databases.

#### Does it work for non-English Wikipedia and sister projects?

Yes. Set `language` to any edition code (de, fr, es, tr, ja, zh…) and `project` to Wikipedia or any sister project (Wiktionary, Wikibooks, Wikiquote, Wikinews, Wikisource, Wikiversity, Wikivoyage). The same engine applies.

#### How do I get only one editor's edits to a page?

Set `userFilter` to that exact username or IP address. The Actor returns only that contributor's revisions on each page — ideal for auditing a bot or a single user.

#### Can I include the full text of each revision?

Yes — enable `includeContent` and each row will carry the full wikitext at that revision. This is heavy (megabytes per page) and much slower, so leave it off unless you need it for diffs or corpora.

#### How do I monitor a page for new edits?

Schedule the Actor to run on an interval with a recent `afterDate` (or just re-run and diff by `revId`). Wire the finish webhook into Slack or your database to alert on new revisions.

#### Is this an official Wikipedia product?

No. It is an independent Actor that reads Wikipedia's own public MediaWiki API. It is not affiliated with or endorsed by the Wikimedia Foundation.

### Is it legal?

This Actor collects **publicly available** revision metadata (and, optionally, wikitext) that Wikipedia and its sister projects already publish openly through their own MediaWiki API. Wikimedia content is released under free licenses (predominantly **CC BY-SA** and, for text, the GFDL); when you reuse the content you are responsible for complying with those licenses and with the [Wikimedia Terms of Use](https://foundation.wikimedia.org/wiki/Terms_of_Use). The Actor identifies itself with a descriptive User-Agent and honours the API's `maxlag` politeness signal. You are responsible for using the extracted data lawfully, including under GDPR and any applicable local regulations, particularly where usernames or IP addresses are involved.

### Related scrapers

Building a wider knowledge-base or research dataset? Pair this with other logiover Actors:

- [Wikipedia Category Scraper](https://apify.com/logiover/wikipedia-category-scraper) — enumerate every page in a Wikipedia category tree.
- [Wikidata Scraper](https://apify.com/logiover/wikidata-scraper) — pull structured entity data (claims, labels, identifiers) from Wikidata.
- [Reddit Historical Archive Scraper](https://apify.com/logiover/reddit-historical-archive-scraper) — years of old Reddit posts and comments by date, no API key.
- 👉 Browse all **[logiover scrapers on Apify Store](https://apify.com/logiover)** — 180+ Actors across research, social media, real estate, jobs and B2B data.

***

### Changelog

#### 2026-07-22

- 🎉 Initial release: full page revision-history extraction via the keyless MediaWiki Action API — 18 fields per edit, byte-level `sizeDelta`, category expansion, date & editor filters, any language and any MediaWiki project, with optional full-wikitext capture.

# Actor input Schema

## `pages` (type: `array`):

Wikipedia page titles whose full edit history you want (full Wikipedia URLs are accepted too — they are stripped to the title). Example: \["Bitcoin", "ChatGPT", "https://en.wikipedia.org/wiki/Artificial\_intelligence"]. Leave empty if you use the Category field instead.

## `language` (type: `string`):

The language edition code, e.g. en (English), de (German), fr (French), es (Spanish), tr (Turkish), ru, ja, zh. This maps to https://<language>.<project>.org/w/api.php.

## `project` (type: `string`):

Which Wikimedia project to read. Wikipedia is the default; the same engine works for all sister projects.

## `category` (type: `string`):

Optional. Give a category NAME (without the "Category:" prefix) and the scraper expands it into member pages, then scrapes the full revision history of each. This unlocks huge volume — one category can be hundreds of pages, each with thousands of revisions. Example: "Cryptocurrencies".

## `maxPagesFromCategory` (type: `integer`):

When Category is set, the maximum number of member pages to expand and scrape. Keeps volume and cost predictable.

## `afterDate` (type: `string`):

Only include revisions made AFTER this date (older bound). Format YYYY-MM-DD or a full ISO timestamp. Combine with Before date for a precise historical window. Example: "2020-01-01".

## `beforeDate` (type: `string`):

Only include revisions made BEFORE this date (newer bound). Format YYYY-MM-DD or a full ISO timestamp. Example: "2021-12-31".

## `userFilter` (type: `string`):

Optional. Return only revisions made by this exact editor (username or IP address, no "User:" prefix). Great for auditing a single contributor's or bot's edits to a page. Leave empty for all editors.

## `maxRevisionsPerPage` (type: `integer`):

Hard cap on how many revisions to pull for each page (newest-first). A busy page can have 20,000+ edits — use this to bound depth and cost. Set to 0 for no per-page cap (full history).

## `includeContent` (type: `boolean`):

If enabled, each revision row also carries the FULL wikitext (source) of the page at that revision. This is heavy (megabytes per page) and much slower — leave OFF unless you truly need the content of every version for diffs or corpora.

## `maxItems` (type: `integer`):

Total cap on revisions saved across ALL pages in this run. 0 = unlimited. Use it as a global budget ceiling.

## `proxyConfiguration` (type: `object`):

Apify Proxy (ON by default, datacenter). The MediaWiki API is keyless and reliable; a proxy is used mainly to spread load and get a fresh IP on retries. Datacenter is enough — switch to RESIDENTIAL only if you ever see rate limiting.

## Actor input object example

```json
{
  "pages": [
    "Bitcoin",
    "ChatGPT"
  ],
  "language": "en",
  "project": "wikipedia",
  "category": "",
  "maxPagesFromCategory": 50,
  "afterDate": null,
  "beforeDate": null,
  "userFilter": "",
  "maxRevisionsPerPage": 2000,
  "includeContent": false,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `page` (type: `string`):

Page title.

## `pageId` (type: `string`):

MediaWiki page ID.

## `language` (type: `string`):

Wiki language code.

## `project` (type: `string`):

MediaWiki project.

## `revId` (type: `string`):

This revision's ID.

## `parentId` (type: `string`):

The previous revision's ID (0 for the first edit).

## `timestamp` (type: `string`):

When the edit was made (ISO 8601 UTC).

## `user` (type: `string`):

Username or IP address that made the edit.

## `userId` (type: `string`):

Numeric user ID (0 for anonymous / IP edits).

## `isAnonymous` (type: `string`):

Whether the edit was made anonymously (by IP).

## `isMinor` (type: `string`):

Whether the editor flagged this as a minor edit.

## `comment` (type: `string`):

The edit summary / comment left by the editor.

## `size` (type: `string`):

Page size in bytes after this revision.

## `sizeDelta` (type: `string`):

Byte change vs the parent revision (+ added, - removed).

## `tags` (type: `string`):

Change tags applied to the revision, comma-joined (e.g. mobile edit, visualeditor).

## `sha1` (type: `string`):

SHA-1 hash of the revision content.

## `revisionUrl` (type: `string`):

Permanent link to view this exact revision.

## `content` (type: `string`):

Full wikitext of the page at this revision (only when 'Include full wikitext' is enabled).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pages": [
        "Bitcoin",
        "ChatGPT"
    ],
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/wikipedia-revision-history-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "pages": [
        "Bitcoin",
        "ChatGPT",
    ],
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/wikipedia-revision-history-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pages": [
    "Bitcoin",
    "ChatGPT"
  ],
  "language": "en"
}' |
apify call logiover/wikipedia-revision-history-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/wikipedia-revision-history-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Wikipedia Revision History Scraper — Page Edit History by Date",
        "description": "Scrape the complete edit / revision history of any Wikipedia page. Every edit: who, when, summary, byte size + delta, tags, minor flag, revision IDs. Any language, any MediaWiki project, category expansion, date & user filters. No API key, no login.",
        "version": "1.0",
        "x-build-id": "dHcq7z8wheqDZ4NPo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~wikipedia-revision-history-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-wikipedia-revision-history-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~wikipedia-revision-history-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-wikipedia-revision-history-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~wikipedia-revision-history-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-wikipedia-revision-history-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pages": {
                        "title": "Page titles or URLs",
                        "type": "array",
                        "description": "Wikipedia page titles whose full edit history you want (full Wikipedia URLs are accepted too — they are stripped to the title). Example: [\"Bitcoin\", \"ChatGPT\", \"https://en.wikipedia.org/wiki/Artificial_intelligence\"]. Leave empty if you use the Category field instead.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "language": {
                        "title": "Language / wiki code",
                        "type": "string",
                        "description": "The language edition code, e.g. en (English), de (German), fr (French), es (Spanish), tr (Turkish), ru, ja, zh. This maps to https://<language>.<project>.org/w/api.php.",
                        "default": "en"
                    },
                    "project": {
                        "title": "MediaWiki project",
                        "enum": [
                            "wikipedia",
                            "wiktionary",
                            "wikibooks",
                            "wikiquote",
                            "wikinews",
                            "wikisource",
                            "wikiversity",
                            "wikivoyage"
                        ],
                        "type": "string",
                        "description": "Which Wikimedia project to read. Wikipedia is the default; the same engine works for all sister projects.",
                        "default": "wikipedia"
                    },
                    "category": {
                        "title": "Category (optional, expands to pages)",
                        "type": "string",
                        "description": "Optional. Give a category NAME (without the \"Category:\" prefix) and the scraper expands it into member pages, then scrapes the full revision history of each. This unlocks huge volume — one category can be hundreds of pages, each with thousands of revisions. Example: \"Cryptocurrencies\".",
                        "default": ""
                    },
                    "maxPagesFromCategory": {
                        "title": "Max pages from category",
                        "minimum": 1,
                        "type": "integer",
                        "description": "When Category is set, the maximum number of member pages to expand and scrape. Keeps volume and cost predictable.",
                        "default": 50
                    },
                    "afterDate": {
                        "title": "After date (ISO)",
                        "type": "string",
                        "description": "Only include revisions made AFTER this date (older bound). Format YYYY-MM-DD or a full ISO timestamp. Combine with Before date for a precise historical window. Example: \"2020-01-01\".",
                        "default": null
                    },
                    "beforeDate": {
                        "title": "Before date (ISO)",
                        "type": "string",
                        "description": "Only include revisions made BEFORE this date (newer bound). Format YYYY-MM-DD or a full ISO timestamp. Example: \"2021-12-31\".",
                        "default": null
                    },
                    "userFilter": {
                        "title": "Editor username filter",
                        "type": "string",
                        "description": "Optional. Return only revisions made by this exact editor (username or IP address, no \"User:\" prefix). Great for auditing a single contributor's or bot's edits to a page. Leave empty for all editors.",
                        "default": ""
                    },
                    "maxRevisionsPerPage": {
                        "title": "Max revisions per page",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Hard cap on how many revisions to pull for each page (newest-first). A busy page can have 20,000+ edits — use this to bound depth and cost. Set to 0 for no per-page cap (full history).",
                        "default": 2000
                    },
                    "includeContent": {
                        "title": "Include full wikitext of each revision",
                        "type": "boolean",
                        "description": "If enabled, each revision row also carries the FULL wikitext (source) of the page at that revision. This is heavy (megabytes per page) and much slower — leave OFF unless you truly need the content of every version for diffs or corpora.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max items (global)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Total cap on revisions saved across ALL pages in this run. 0 = unlimited. Use it as a global budget ceiling.",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Apify Proxy (ON by default, datacenter). The MediaWiki API is keyless and reliable; a proxy is used mainly to spread load and get a fresh IP on retries. Datacenter is enough — switch to RESIDENTIAL only if you ever see rate limiting.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
