# Wikipedia Edit History & Editor Activity Exporter (`xyrelith-data/wikipedia-edit-history-and-editor-activity`) Actor

Export complete Wikipedia and Wikimedia edit histories without a key. Get per-revision records with diffs and wikitext, editor contribution feeds, and per-article statistics with top editors, quality assessment and protection logs.

- **URL**: https://apify.com/xyrelith-data/wikipedia-edit-history-and-editor-activity.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** Automation, Developer tools, News
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Wikipedia Edit History & Editor Activity Exporter

Export the full public edit history behind any Wikipedia article or Wikimedia page, follow what one editor has been doing across a wiki, and pull a statistical profile of an article — all without an account, API key, cookie or proxy.

The actor reads the official MediaWiki Action API, the Wikimedia REST API and the community-run XTools service. Every record is real source data; fields the source does not expose are omitted rather than filled with a placeholder.

### What you can export

| Mode | What it returns |
|---|---|
| **Page edit history** | One dataset row per revision: editor, timestamp, edit summary, edited section, byte delta, tags, SHA-1, minor/reverted/current flags and links. Optional diffs and full wikitext. |
| **Editor contributions** | One row per edit by the editors you name, including byte delta, namespace and whether the edit is still the page's top revision. |
| **Page statistics summary** | One row per article with total edits, distinct editors, anonymous/bot/reverted/minor counts, watchers, creator, creation date, last edit, current length, quality class, protection levels and log, and a ranked top-editor list. |
| **Recent changes feed** | A site-wide feed of recent edits and new pages with the same editor, tag, namespace and date filters. |

Pages can be given as titles or as full URLs. A URL carries its own wiki, so `https://de.wikipedia.org/wiki/Taylor_Swift`, `https://en.wiktionary.org/wiki/hello` and `https://en.wikivoyage.org/wiki/Paris` can be mixed in a single run. Any of the 300+ language editions works through the language-code override, and Commons, Wikidata, MediaWiki, Meta, Wikispecies and Incubator are supported as projects.

Categories can be expanded into their member pages, so a whole topic can be exported without listing every title by hand.

### Quick examples

#### Recent edits to a few articles

```json
{
  "mode": "pageRevisions",
  "pageUrls": ["Taylor Swift", "https://de.wikipedia.org/wiki/Taylor_Swift"],
  "maxRevisionsPerPage": 200,
  "sortOrder": "newest"
}
```

#### One editor's latest work, without bots

```json
{
  "mode": "editorContributions",
  "editorUsernames": ["Jimmy Wales"],
  "maxItems": 500,
  "excludeBots": true
}
```

#### Article statistics and top editors

```json
{
  "mode": "pageSummary",
  "pageUrls": ["Bitcoin", "https://fr.wikipedia.org/wiki/Bitcoin"],
  "topEditorsLimit": 50
}
```

#### Vandalism review: only reverted edits in a date window

```json
{
  "mode": "pageRevisions",
  "pageUrls": ["Taylor Swift"],
  "fromDate": "2026-10-01",
  "toDate": "2026-11-01",
  "onlyReverted": true,
  "includeDiff": true,
  "maxRevisionsPerPage": 100
}
```

### Input reference

- **Mode** — pageRevisions, editorContributions, pageSummary or recentChanges.
- **Pages** — titles or full Wikimedia URLs. Used by pageRevisions and pageSummary.
- **Categories to expand** — category names such as `American singer-songwriters`; members are added to Pages.
- **Editors** — usernames, IP addresses or temporary account names for editorContributions.
- **Language edition / language code override** — choose a common edition or type any Wikimedia language code.
- **Project** — Wikipedia, Wiktionary, Wikibooks, Wikiquote, Wikinews, Wikisource, Wikiversity, Wikivoyage, Commons, Wikidata, MediaWiki, Meta, Wikispecies or Incubator.
- **From date / To date** — `YYYY-MM-DD` or an ISO date-time. A plain To date covers the whole UTC day.
- **Sort order** — newest first or oldest first.
- **Max revisions per page** — pages 500 revisions at a time until this many matching revisions are collected or the page's first edit is reached.
- **Max records** — global dataset cap.
- **Exclude bots** — drop edits by bot accounts.
- **Minor edits** — all, only minor, or exclude minor.
- **Only anonymous edits** — keep IP and temporary-account edits.
- **Only reverted edits** — keep edits carrying the wiki's `mw-reverted` tag.
- **Change tag** — exact tag such as `mobile edit`, `visualeditor`, `mw-undo` or `mw-reverted`.
- **Editor filter** — exact username for pageRevisions and recentChanges.
- **Namespaces** — namespace IDs for editorContributions and recentChanges; `all` for every namespace.
- **Top editors to return** — 1 to 100 ranked editors per summary.
- **Include added and removed text** — one compare request per revision.
- **Include full wikitext** — adds the revision source to each row.

### Inputs at a glance

| Input | What it does | Default |
|---|---|---|
| `mode` | Choose pageRevisions, editorContributions, pageSummary or recentChanges | `pageRevisions` |
| `pageUrls` | Page titles or full Wikimedia URLs for pageRevisions and pageSummary | – (empty) |
| `categoryNames` | Category names to expand into member pages | – (empty) |
| `maxPagesFromCategory` | Page cap per expanded category | `50` |
| `editorUsernames` | Usernames, IPs or temporary accounts for editorContributions | – (empty) |
| `language` | Common language edition picker | `en` |
| `languageCode` | Any Wikimedia language code; overrides `language` | – (none) |
| `project` | Wikipedia, Wiktionary, Wikibooks, Wikiquote, Wikinews, Wikisource, Wikiversity, Wikivoyage, Commons, Wikidata, MediaWiki, Meta, Wikispecies or Incubator | `wikipedia` |
| `fromDate` | Oldest edit to include, as YYYY-MM-DD or ISO date-time | – (none) |
| `toDate` | Newest edit to include; a plain date covers the whole UTC day | – (none) |
| `sortOrder` | Newest first or oldest first | `newest` |
| `maxRevisionsPerPage` | Matching revisions to collect per page | `500` |
| `maxItems` | Global record cap | `500` |
| `excludeBots` | Drop edits by bot accounts | `false` |
| `minorEdits` | All, only minor, or exclude minor edits | `all` |
| `onlyAnonymous` | Keep IP and temporary-account edits | `false` |
| `onlyReverted` | Keep edits with the `mw-reverted` tag | `false` |
| `tagFilter` | Exact change tag to keep | – (none) |
| `editorFilter` | Exact username for pageRevisions and recentChanges | – (none) |
| `namespaceFilter` | Namespace IDs for editorContributions and recentChanges, or all | `all` |
| `topEditorsLimit` | Ranked editors per page summary | `20` |
| `includeDiff` | Add added/removed text to revision rows | `false` |
| `includeWikitext` | Add full revision wikitext | `false` |

### Output

Every row has `recordType`, `sourceUrl` and `scrapedAt`.

#### Revision rows

`title`, `pageId`, `language`, `project`, `wiki`, `revisionId`, `parentId`, `timestamp`, `editor`, `editorId`, `editorType`, `isBot`, `isAnonymous`, `isTemporaryAccount`, `editSummary`, `section`, `pageSize`, `byteChange`, `isMinor`, `isReverted`, `isCurrent`, `tags`, `sha1`, `pageUrl`, `revisionUrl`, `diffUrl`, `diffAdded`, `diffRemoved`, `wikitext`.

#### Editor contribution rows

`editor`, `editorId`, `editorType`, `isBot`, `isAnonymous`, `isTemporaryAccount`, `language`, `project`, `wiki`, `title`, `pageId`, `namespaceId`, `namespaceName`, `revisionId`, `parentId`, `timestamp`, `editSummary`, `section`, `pageSize`, `byteChange`, `isNew`, `isTopRevision`, `isMinor`, `isReverted`, `tags`, `pageUrl`, `revisionUrl`, `diffUrl`.

#### Page summary rows

`title`, `pageId`, `language`, `project`, `wiki`, `pageUrl`, `totalEdits`, `distinctEditors`, `anonymousEdits`, `botEdits`, `revertedEdits`, `minorEdits`, `countsLimited`, `watchers`, `creator`, `createdAt`, `lastEditedAt`, `currentLength`, `lastRevisionId`, `qualityClass`, `assessments`, `protection`, `protectionLog`, `topEditors`, `missing`.

`topEditors` entries contain `rank`, `editor`, `editCount`, `minorEdits`, `firstEditAt`, `firstRevisionId`, `latestEditAt` and `latestRevisionId`.

#### Recent change rows

`wiki`, `language`, `project`, `title`, `pageId`, `namespaceId`, `namespaceName`, `revisionId`, `parentId`, `rcid`, `changeType`, `timestamp`, `editor`, `editorId`, `editorType`, `isBot`, `isAnonymous`, `isTemporaryAccount`, `editSummary`, `section`, `previousSize`, `pageSize`, `byteChange`, `isNew`, `isMinor`, `isReverted`, `tags`, `pageUrl`, `revisionUrl`, `diffUrl`.

### Data source and reliability

The actor uses the public MediaWiki Action API for revisions, comparisons, log events, user contributions, user groups, recent changes, category members and assessments. It uses the Wikimedia REST endpoint for page history counts and XTools for the article profile and top-editor rankings.

Requests are serial with Wikimedia's `maxlag` etiquette and a descriptive User-Agent. Throttling, temporary server errors and `maxlag` responses are retried with backoff. No proxy or login is used.

### Limits and notes

- **Quality classes are wiki-dependent.** `qualityClass` appears only where the wiki publishes machine-readable WikiProject assessments. Many non-English editions do not, so the field is absent there rather than guessed.
- **Top editors depend on XTools.** The community-run XTools service supplies rankings and first/latest edit dates. When XTools is unavailable, those fields are omitted for that page and the run reports it.
- **Watchers are not public on every wiki.** The field is omitted where MediaWiki does not expose the count.
- **Bot status uses current account groups.** A revision is marked as bot when its editor is currently in a wiki's bot group. Historical group changes are not exposed by the API.
- **Anonymous edits include temporary accounts.** MediaWiki's newer temporary accounts are flagged `isTemporaryAccount`; both IPs and temporary accounts match "Only anonymous edits".
- **The creation revision has no parent diff.** `diffAdded`/`diffRemoved` are omitted for the first revision because there is nothing earlier to compare.
- **Recent changes are shallow.** The feed covers roughly the last 30 days. Use page edit history for older material.
- **Byte delta at a window boundary.** When a date range starts mid-history, the oldest selected revision may not have its parent in the result set, so its `byteChange` is omitted.
- **Diffs and wikitext are optional.** A diff costs one extra request per revision; wikitext is fetched in batches.

### FAQ

**Do I need a Wikipedia account or API key?** No. The actor only reads public endpoints.

**Can it export a page's entire history?** Yes. Page history is paged 500 revisions at a time and continues until the page's first edit or your `maxRevisionsPerPage` / `maxItems` limit.

**Can I mix languages in one run?** Yes. Use full URLs for automatic language and project detection, or set the language and project fields for bare titles.

**Does it support sister projects?** Yes: Wiktionary, Wikibooks, Wikiquote, Wikinews, Wikisource, Wikiversity, Wikivoyage, Commons, Wikidata, MediaWiki, Meta, Wikispecies and Incubator.

**Why is a field missing on some rows?** The actor omits source data the wiki does not provide. It never writes nulls or placeholders.

**How do I monitor new edits?** Run the actor on a schedule with a narrow date range or sort newest first, and compare dataset rows between runs.

# Actor input Schema

## `mode` (type: `string`):

Page edit history lists every revision of the pages you enter. Editor contributions lists one editor's edits across a wiki. Page statistics returns one summary per article. Recent changes is a site-wide feed.

## `pageUrls` (type: `array`):

Article titles or full Wikimedia URLs. Full URLs set the language and project automatically, so you can mix en.wikipedia.org, de.wikipedia.org and en.wiktionary.org pages in one run. Used by pageRevisions and pageSummary.

## `categoryNames` (type: `array`):

Category names such as 'American singer-songwriters' or 'Category:Physics'. Every member page is added to Pages. Used by pageRevisions and pageSummary.

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

Upper limit on pages pulled from each category.

## `editorUsernames` (type: `array`):

Usernames, IP addresses or temporary account names. Used by editorContributions. User: prefixes and user-page URLs are accepted.

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

Common Wikipedia/Wikimedia language editions. Choose Other to use any of the 300+ language codes in Language code override.

## `languageCode` (type: `string`):

Any Wikimedia language code such as be-tarask, zh-classical, nap or pms. Overrides Language edition when set.

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

Which project to read. Ignored for Commons, Wikidata, MediaWiki, Meta, Wikispecies and Incubator because they are language-neutral. Existing full URLs in Pages still set their own project.

## `fromDate` (type: `string`):

Oldest edit to include. Use YYYY-MM-DD or an ISO date-time such as 2025-01-31T12:00:00Z. Leave empty for the beginning of history.

## `toDate` (type: `string`):

Newest edit to include. A plain date includes the whole day (UTC). Leave empty for now.

## `sortOrder` (type: `string`):

Newest first is best for monitoring. Oldest first walks from the first edit forward.

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

Stop after this many matching revisions per page. The actor pages 500 revisions at a time until it reaches the limit or the page's first edit.

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

Hard cap on dataset records across the whole run.

## `excludeBots` (type: `boolean`):

Drop edits made by bot accounts.

## `minorEdits` (type: `string`):

Include every edit, only minor edits, or only non-minor edits.

## `onlyAnonymous` (type: `boolean`):

Keep only edits by IP addresses and temporary accounts.

## `onlyReverted` (type: `boolean`):

Keep only edits that a later edit reverted, using the wiki's mw-reverted tag.

## `tagFilter` (type: `string`):

Keep only edits carrying this exact tag, for example mobile edit, visualeditor, mw-reverted or mw-undo.

## `editorFilter` (type: `string`):

Keep only edits by this exact username. Applies to pageRevisions and recentChanges.

## `namespaceFilter` (type: `string`):

Namespace IDs separated by commas, for example 0,4,14. Use all for every namespace. Applies to editorContributions and recentChanges.

## `topEditorsLimit` (type: `integer`):

How many top editors to rank in each page statistics record.

## `includeDiff` (type: `boolean`):

Fetch the diff between each revision and its parent. Adds one compare request per revision, so keep Max revisions low when enabled.

## `includeWikitext` (type: `boolean`):

Add the complete wikitext of every emitted revision. Can make datasets large.

## Actor input object example

```json
{
  "mode": "pageRevisions",
  "pageUrls": [
    "Taylor Swift"
  ],
  "categoryNames": [],
  "maxPagesFromCategory": 50,
  "editorUsernames": [],
  "language": "en",
  "project": "wikipedia",
  "sortOrder": "newest",
  "maxRevisionsPerPage": 3,
  "maxItems": 3,
  "excludeBots": false,
  "minorEdits": "all",
  "onlyAnonymous": false,
  "onlyReverted": false,
  "namespaceFilter": "all",
  "topEditorsLimit": 20,
  "includeDiff": false,
  "includeWikitext": false
}
```

# Actor output Schema

## `edits` (type: `string`):

Dataset containing revision, editor-contribution and page-summary records.

# 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 = {
    "mode": "pageRevisions",
    "pageUrls": [
        "Taylor Swift"
    ],
    "categoryNames": [],
    "maxPagesFromCategory": 50,
    "editorUsernames": [],
    "language": "en",
    "project": "wikipedia",
    "sortOrder": "newest",
    "maxRevisionsPerPage": 3,
    "maxItems": 3,
    "excludeBots": false,
    "minorEdits": "all",
    "onlyAnonymous": false,
    "onlyReverted": false,
    "namespaceFilter": "all",
    "topEditorsLimit": 20,
    "includeDiff": false,
    "includeWikitext": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/wikipedia-edit-history-and-editor-activity").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 = {
    "mode": "pageRevisions",
    "pageUrls": ["Taylor Swift"],
    "categoryNames": [],
    "maxPagesFromCategory": 50,
    "editorUsernames": [],
    "language": "en",
    "project": "wikipedia",
    "sortOrder": "newest",
    "maxRevisionsPerPage": 3,
    "maxItems": 3,
    "excludeBots": False,
    "minorEdits": "all",
    "onlyAnonymous": False,
    "onlyReverted": False,
    "namespaceFilter": "all",
    "topEditorsLimit": 20,
    "includeDiff": False,
    "includeWikitext": False,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/wikipedia-edit-history-and-editor-activity").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "pageRevisions",
  "pageUrls": [
    "Taylor Swift"
  ],
  "categoryNames": [],
  "maxPagesFromCategory": 50,
  "editorUsernames": [],
  "language": "en",
  "project": "wikipedia",
  "sortOrder": "newest",
  "maxRevisionsPerPage": 3,
  "maxItems": 3,
  "excludeBots": false,
  "minorEdits": "all",
  "onlyAnonymous": false,
  "onlyReverted": false,
  "namespaceFilter": "all",
  "topEditorsLimit": 20,
  "includeDiff": false,
  "includeWikitext": false
}' |
apify call xyrelith-data/wikipedia-edit-history-and-editor-activity --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/wikipedia-edit-history-and-editor-activity"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/atrlSuDuo37GnXeWS/builds/wSzHiju35HYXmvWtP/openapi.json
