# Wikipedia Revision History Researcher (`coolinbex/wikipedia-revision-history-researcher`) Actor

Research public Wikipedia revision histories with bounded pagination, date filters, size deltas, revert indicators, optional wikitext, and explicit partial-failure reporting.

- **URL**: https://apify.com/coolinbex/wikipedia-revision-history-researcher.md
- **Developed by:** [coolinbex](https://apify.com/coolinbex) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-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 Revision History Researcher

Research public Wikipedia edit history with the official Wikimedia Action API. Provide page titles or English Wikipedia URLs and receive one dataset record per revision, with stable page metadata, editor and timestamp details, edit comments, sizes, SHA-1 values, tags, size changes, and conservative revert/minor-edit indicators.

### What this Actor is useful for

- Investigating how a Wikipedia article changed over time
- Monitoring edits to a set of pages
- Finding large additions, removals, minor edits, and likely reverts
- Building editorial, academic, historical, or media-monitoring datasets
- Reviewing a bounded period of revision activity without scraping rendered pages

### Input

| Field | Type | Default | Description |
|---|---|---:|---|
| `pages` | Array of strings | `[]` | Page titles or full `en.wikipedia.org/wiki/...` URLs. Duplicate pages are removed. |
| `startDate` | ISO date/time | — | Inclusive lower bound for revisions. |
| `endDate` | ISO date/time | — | Inclusive upper bound for revisions. |
| `maxRevisions` | Integer, 1–5000 | `100` | Maximum revisions collected per page. |
| `maxPages` | Integer, 1–100 | `25` | Maximum unique pages processed. |
| `includeContent` | Boolean | `false` | Include revision wikitext when Wikimedia returns it. This can substantially increase output size. |
| `includeSections` | Boolean | `false` | Include the current page’s section metadata. |
| `retries` | Integer, 0–5 | `2` | Retries for timeouts, throttling, and server failures. |
| `timeoutMs` | Integer, 1,000–120,000 | `30000` | Timeout for each Wikimedia API request. |
| `pacingMs` | Integer, 0–10,000 | `250` | Delay between requests to the public API. |
| `retryBackoffMs` | Integer, 0–30,000 | `500` | Initial delay before transient retries. |

If `pages` is empty, the Actor completes with an empty dataset and a successful summary. Page names are normalized and URL inputs are decoded before requests are made.

### Dataset output

Each revision record contains:

- `page`: title, page ID, namespace, and canonical English Wikipedia URL
- `revision`: revision ID, parent ID, timestamp, user, anonymous-edit flag, comment, size, SHA-1, tags, and optional wikitext
- `diff.sizeDelta`: byte-size change compared with the previous collected revision
- `indicators.isRevert`: conservative signal based on Wikimedia tags and edit comments
- `indicators.isMinor`: Wikimedia minor-edit flag
- `sections`: optional current section metadata
- `checkedAt`: UTC timestamp for the research run

The Actor preserves nullable Wikimedia fields when revisions are deleted, suppressed, or incomplete. `diff.sizeDelta` is a size change, not a textual diff, and prices or other claims are never inferred from article content.

### Run summary

The `SUMMARY` key-value record includes requested pages, successful pages, revision count, failed-page count, whether the run was partial, page-level failure details, and the completion timestamp. A page failure does not discard successful records from other pages.

Statuses are explicit:

- `succeeded`: every requested page was researched successfully
- `partial`: at least one page failed while other revisions were collected
- `failed`: no page produced revisions or the run failed before research completed
- `not_found`: recorded in page-level results when Wikimedia cannot find a page

### Accuracy and limits

The Actor uses only public Wikimedia endpoints, sends a descriptive user agent, follows continuation pagination, applies bounded limits, and spaces requests. Wikimedia may omit data for deleted or suppressed revisions. Revert detection is intentionally conservative and should be treated as a research signal rather than a definitive classification. The Actor does not bypass access controls or require credentials.

### Pricing

Apify platform usage charges depend on runtime and resource consumption. Larger page, revision, content, and section requests produce more API traffic and larger datasets.

# Actor input Schema

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

Wikipedia page titles or full en.wikipedia.org URLs.

## `startDate` (type: `string`):

Optional inclusive ISO date/time lower bound for revisions.

## `endDate` (type: `string`):

Optional inclusive ISO date/time upper bound for revisions.

## `maxRevisions` (type: `integer`):

Maximum revisions across each page, capped at 5000.

## `maxPages` (type: `integer`):

Maximum unique pages to process.

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

Include revision wikitext when the public API returns it; increases response size.

## `includeSections` (type: `boolean`):

Include current page section metadata.

## `retries` (type: `integer`):

Retries for timeout, throttling, and server failures.

## `timeoutMs` (type: `integer`):

Timeout per Wikimedia API request.

## `pacingMs` (type: `integer`):

Delay between API requests.

## `retryBackoffMs` (type: `integer`):

Initial delay before transient retries.

## Actor input object example

```json
{
  "pages": [],
  "maxRevisions": 100,
  "maxPages": 25,
  "includeContent": false,
  "includeSections": false,
  "retries": 2,
  "timeoutMs": 30000,
  "pacingMs": 250,
  "retryBackoffMs": 500
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

Counts and explicit partial failures for the run.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("coolinbex/wikipedia-revision-history-researcher").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("coolinbex/wikipedia-revision-history-researcher").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 '{}' |
apify call coolinbex/wikipedia-revision-history-researcher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coolinbex/wikipedia-revision-history-researcher"
        }
    }
}
```

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/erIvKvAYZnbMtwEHt/builds/cHYq1Ak35GokieGS7/openapi.json
