# Wikipedia Recent Changes (`solarg/wikipedia-recent-changes`) Actor

Recent edits and new pages on Wikipedia and other Wikimedia wikis: title, size change, editor, edit summary, tags and diff link. Filter by time window, namespace, title, user and size. Uses the official MediaWiki API.

- **URL**: https://apify.com/solarg/wikipedia-recent-changes.md
- **Developed by:** [Solar G](https://apify.com/solarg) (community)
- **Categories:** News, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 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

Exports recent edits and new pages from Wikipedia and other Wikimedia wikis (Wiktionary, Wikidata, Commons and others). Data comes from the official MediaWiki API (`list=recentchanges`), so no login, API key or proxy is needed.

Use it to monitor edits to topics you follow, track new articles in a language edition, study editing activity, or feed a change log into another system.

For a quick one-off check without an Apify account, a free web version with a small daily limit is available at [purfled.com/wikipedia-recent-changes](https://purfled.com/wikipedia-recent-changes/).

### Input

| Field | Description |
|---|---|
| `wikis` | Wikipedia language codes (`en`, `de`, `fr`, `simple`...) or wiki hosts such as `fr.wikipedia.org`, `en.wiktionary.org`, `www.wikidata.org` or `commons.wikimedia.org`. An article link also works. Several wikis can be read in one run. |
| `maxEditsPerWiki` | Maximum matching changes per wiki, newest first. Default 100, at most 5,000. |
| `since` | Optional. Oldest change to include: a date (`2026-10-20`), a UTC date and time (`2026-10-20T08:00:00Z`) or a period before now (`6 hours`, `2 days`, `30 minutes`). |
| `until` | Optional. Newest change to include, same formats. A plain date means the end of that day (UTC). |
| `changeType` | `all` (default), `edit` or `new` (newly created pages). |
| `namespaces` | Namespace numbers or English names. Default `0` (articles). Examples: `1` talk, `2` user, `4` project, `6` file, `10` template, `14` category, `118` draft. Use `all` for every namespace. |
| `titleContains` | Optional. Only pages whose title contains this text (case-insensitive). |
| `user` | Optional. Only changes by this exact username or IP address. |
| `editorType` | `any` (default), `anonymous` (IP editors and temporary accounts) or `registered`. |
| `minBytesChanged` | Optional. Skip changes smaller than this many bytes, added or removed. |
| `maxBytesChanged` | Optional. Skip changes larger than this many bytes, added or removed. |
| `excludeBots` | Leave out edits flagged as bot edits. Default `true`. |
| `excludeMinor` | Leave out edits marked as minor. Default `false`. |

```json
{
  "wikis": ["en", "de"],
  "maxEditsPerWiki": 500,
  "since": "24 hours",
  "minBytesChanged": 500,
  "excludeBots": true
}
```

Wikipedia keeps about 30 days of recent changes, so `since` cannot reach further back than that.

### Output

One item per change.

```json
{
  "wiki": "en.wikipedia.org",
  "title": "Casino Royale (2006 film)",
  "namespace": 0,
  "pageId": 930379,
  "url": "https://en.wikipedia.org/wiki/Casino_Royale_(2006_film)",
  "diffUrl": "https://en.wikipedia.org/w/index.php?diff=1381567440&oldid=1381076069",
  "timestamp": "2026-10-23T10:57:30Z",
  "type": "edit",
  "bytesBefore": 119909,
  "bytesAfter": 119557,
  "bytesChanged": -352,
  "user": "Betty Logan",
  "userUrl": "https://en.wikipedia.org/wiki/Special:Contributions/Betty_Logan",
  "anonymous": false,
  "temporaryAccount": false,
  "minor": false,
  "bot": false,
  "comment": "/* Plot */  Reverted plot bloat;",
  "tags": [],
  "revisionId": 1381567440,
  "parentRevisionId": 1381076069
}
```

- `bytesChanged` is the page size after the change minus the size before; it is negative when text was removed.
- `anonymous` is true for IP editors and for temporary accounts (names like `~2026-12345-67`), which Wikipedia now uses for logged-out editors.
- `comment` is the edit summary as written, including wikitext such as `/* Section */` and `[[links]]`. It is null when empty or hidden.
- For a new page, `diffUrl` links to its first revision and `parentRevisionId` is null.

**Error**

One item per wiki that could not be read. `input` is the value you supplied. Error items are not charged.

```json
{
  "input": "xx",
  "wiki": null,
  "error": "\"xx\" is not a known Wikipedia language code or Wikimedia wiki. Use e.g. \"en\", \"de\", \"fr.wikipedia.org\" or \"www.wikidata.org\"."
}
```

### Pricing

$0.50 per 1,000 changes saved to the dataset. Error items are free. The run stops cleanly when it reaches the maximum cost you set for the run.

### Notes

- Changes are returned newest first for each wiki.
- Filters on title and size are applied after reading the change log, so a narrow filter can scan many changes. The Actor stops a wiki after scanning 50,000 changes; narrow the time window if you need more.
- Log entries (page moves, deletions, user blocks) and category changes are not included, only edits and page creations.
- Requests identify themselves with a descriptive User-Agent and read each wiki one page at a time, following Wikimedia's API guidelines.

# Actor input Schema

## `wikis` (type: `array`):

Wikipedia language codes (en, de, fr, pt, simple...) or wiki hosts such as fr.wikipedia.org, en.wiktionary.org, www.wikidata.org or commons.wikimedia.org. A full article link also works; its wiki is used.

## `maxEditsPerWiki` (type: `integer`):

Newest first. The Actor pages back through the change log until this many matching changes are found, the time window ends, or the log runs out.

## `since` (type: `string`):

Only changes at or after this time. A date (2026-10-20), a UTC date and time (2026-10-20T08:00:00Z) or a relative period such as "6 hours", "2 days" or "30 minutes" before now. Wikipedia keeps about 30 days of recent changes.

## `until` (type: `string`):

Only changes at or before this time. Same formats as Since. Leave empty for up to now. A plain date means the end of that day (UTC).

## `changeType` (type: `string`):

Edits to existing pages, newly created pages, or both.

## `namespaces` (type: `array`):

Namespace numbers or English names. 0 or main = articles (default), 1 = talk, 2 = user, 4 = project, 6 = file, 10 = template, 14 = category, 118 = draft. Use "all" for every namespace.

## `titleContains` (type: `string`):

Only pages whose title contains this text (case-insensitive).

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

Only changes by this exact username or IP address.

## `editorType` (type: `string`):

Only changes by anonymous editors (IP addresses and temporary accounts), only by registered accounts, or both.

## `minBytesChanged` (type: `integer`):

Skip changes smaller than this many bytes, added or removed. 0 keeps everything.

## `maxBytesChanged` (type: `integer`):

Skip changes larger than this many bytes, added or removed.

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

Leave out edits flagged as made by bots.

## `excludeMinor` (type: `boolean`):

Leave out edits marked as minor by the editor.

## Actor input object example

```json
{
  "wikis": [
    "en",
    "de"
  ],
  "maxEditsPerWiki": 20,
  "changeType": "all",
  "namespaces": [
    "0"
  ],
  "editorType": "any",
  "excludeBots": true,
  "excludeMinor": false
}
```

# Actor output Schema

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

All scraped items in the default dataset.

# 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 = {
    "wikis": [
        "en",
        "de"
    ],
    "maxEditsPerWiki": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("solarg/wikipedia-recent-changes").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 = {
    "wikis": [
        "en",
        "de",
    ],
    "maxEditsPerWiki": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("solarg/wikipedia-recent-changes").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 '{
  "wikis": [
    "en",
    "de"
  ],
  "maxEditsPerWiki": 20
}' |
apify call solarg/wikipedia-recent-changes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solarg/wikipedia-recent-changes"
        }
    }
}
```

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/8xnNy1p1y2cKOmzSt/builds/a4uRLavLaLioLMlrG/openapi.json
