# Wikipedia Page Change Monitor (`vesperxiv/wikipedia-page-change-monitor`) Actor

Monitors recent edits to specific English Wikipedia pages: who edited, when, what changed, and a direct link to the diff. Uses the free public MediaWiki API (no key, no login).

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

## Pricing

from $2.00 / 1,000 price per page changes

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/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 Page Change Monitor

Watch specific English Wikipedia pages and get **every recent edit** — who edited, when, what they wrote in the edit summary, how much the page grew or shrank, and a direct link to the diff — one dataset row per change, newest first.

### What you get

- **Dataset — one item per change:** `title`, `pageid`, `revid`, `parentid`, `user` (editor), `timestamp`, `comment` (edit summary), `size`, `sizeDelta` (bytes added/removed), `minor`, `bot`, `pageUrl`, `diffUrl`.
- **`summary.json`** (key-value store): the pages watched, how many were missing, how many revisions were scanned, and how many changes were returned.

### Input

| Field | What it is |
|---|---|
| `pageTitles` | **Required.** Wikipedia page titles to watch, e.g. `["Albert Einstein", "Python (programming language)"]`. A single string with commas or newlines also works. |
| `daysBack` | Only revisions made within the last N days (default 7, 1–90). |
| `limit` | Maximum changes returned per run, across all pages (default 20, 1–100). |
| `excludeBots` | Skip edits made by bots (default false). |

### Sample output

```json
{
  "title": "Albert Einstein",
  "pageid": 736,
  "revid": 1384665341,
  "parentid": 1384436628,
  "user": "ZH8000",
  "timestamp": "2026-11-09T12:38:29Z",
  "comment": "a town is not a canton; missing information and too much information for an intro",
  "size": 240550,
  "sizeDelta": 102,
  "minor": false,
  "bot": false,
  "pageUrl": "https://en.wikipedia.org/wiki/Albert_Einstein",
  "diffUrl": "https://en.wikipedia.org/w/index.php?diff=1384665341&oldid=1384436628"
}
```

### How the data is fetched

The free public MediaWiki API — **no API key, no login**:

`GET https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=...&rvprop=ids|timestamp|user|comment|size|flags&rvlimit=50&redirects=1&format=json&formatversion=2`

`sizeDelta` is computed from the next (older) revision in the same consecutive newest-first list. Page-creation edits report `sizeDelta == size`; if a parent revision falls outside the fetched window, `sizeDelta` is `null` rather than guessed. Edits by hidden users report `user: null`; hidden edit summaries report an empty `comment`.

### How this differs from generic page monitors

Generic website-change monitors (pixel or raw-text diffing) tell you *that* a page changed. This Actor is Wikipedia-specific: it reads the revision history through the MediaWiki API, so each row is a real edit with its editor, timestamp, edit summary, exact byte delta, and a link straight to the diff — no scraping, no screenshot comparison, no false positives from layout or ad changes. It only covers pages you name; it does not discover new pages or watch whole categories.

### Use cases

- **Researchers & journalists:** track edits to a biography, company, or event page as a story develops.
- **PR & comms teams:** get alerted when someone edits your organization's page.
- **Editors & fact-checkers:** follow high-traffic pages for vandalism or contested claims (large negative `sizeDelta` is often a deletion worth reviewing).
- **Wikidata / knowledge-graph builders:** feed structured edit events into downstream pipelines.

### Limits

- English Wikipedia only (`en.wikipedia.org`).
- One honest caveat: revisions are fetched newest-first and filtered by `timestamp` inside your window; for very active pages with a narrow `daysBack` window the Actor stops at the first revision older than the cutoff, which is exactly the window boundary.
- The Actor is polite by design: a descriptive User-Agent and a short pause between pages. Run it on a schedule (e.g. hourly/daily) rather than in a tight loop.

# Actor input Schema

## `daysBack` (type: `integer`):

Only return revisions made within the last N days (1-90).

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

Skip edits made by bots (flagged bot in the revision).

## `limit` (type: `integer`):

Maximum changes returned per run, across all pages (1-100).

## `pageTitles` (type: `array`):

Wikipedia page titles to watch, e.g. \["Albert Einstein", "Python (programming language)"]. One string with commas or newlines also works.

## Actor input object example

```json
{
  "daysBack": 7,
  "excludeBots": false,
  "limit": 20,
  "pageTitles": [
    "Albert Einstein",
    "Python (programming language)"
  ]
}
```

# Actor output Schema

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

No description

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

No description

# 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 = {
    "daysBack": 7,
    "excludeBots": false,
    "limit": 20,
    "pageTitles": [
        "Albert Einstein"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vesperxiv/wikipedia-page-change-monitor").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 = {
    "daysBack": 7,
    "excludeBots": False,
    "limit": 20,
    "pageTitles": ["Albert Einstein"],
}

# Run the Actor and wait for it to finish
run = client.actor("vesperxiv/wikipedia-page-change-monitor").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 '{
  "daysBack": 7,
  "excludeBots": false,
  "limit": 20,
  "pageTitles": [
    "Albert Einstein"
  ]
}' |
apify call vesperxiv/wikipedia-page-change-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vesperxiv/wikipedia-page-change-monitor"
        }
    }
}
```

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/WU7xWpEbbZciWa0i7/builds/89FapP5gaireXrXsX/openapi.json
