# Wikipedia Pageviews Scraper - Daily Views, Spikes, Top Articles (`neverempty/wikipedia-pageviews-tracker`) Actor

Daily Wikipedia pageviews for any article, in any language: views per day, change from the previous day and ratio to the 7-day average. Get one row per day or a summary, the most viewed articles of a day, or monitor articles and get only new days or only spikes.

- **URL**: https://apify.com/neverempty/wikipedia-pageviews-tracker.md
- **Developed by:** [NeverEmpty](https://apify.com/neverempty) (community)
- **Categories:** SEO tools, Marketing, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 article result returneds

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 Pageviews Scraper - Daily Views, Spikes, Top Articles

Get the **daily pageviews of any Wikipedia article**, in any language edition, from Wikimedia's official Analytics API. Each day comes with the change from the previous day and the ratio to the average of the 7 days before, so a jump in public interest is one column away. Run it on a schedule in **monitoring mode** and receive only the newly published days, or only the days that are spikes.

Typical uses: tracking interest in people, companies, tickers, films, games and events; newsroom and research alerts; inputs for prediction-market and trading models; checking what a country was reading yesterday.

**Tip: pasting the article URL is the surest way to name an article.** Wikipedia counts redirects and alternate names separately, so a typed title can point at a tiny side page. See "Read this before you trust a number".

### What you get

**1. Daily rows** (`output: daily`) - one row per article per day:

```json
{
  "status": "ok",
  "article": "AC/DC",
  "language": "en",
  "project": "en.wikipedia",
  "inputArticle": "AC/DC",
  "requestedTitle": "AC/DC",
  "resolvedTitle": "AC/DC",
  "titleVariantUsed": false,
  "otherVariantViews": null,
  "lowViewsHint": null,
  "rowType": "daily",
  "date": "2026-10-03",
  "views": 10874,
  "viewsPreviousDay": 5907,
  "changeFromPreviousDayPct": 84.1,
  "average7DaysBefore": 5939.1,
  "ratioTo7DayAverage": 1.83,
  "isSpike": true,
  "zeroFilled": false,
  "access": "all-access",
  "agent": "user",
  "articleUrl": "https://en.wikipedia.org/wiki/AC/DC",
  "scrapedAt": "2026-10-05T14:05:09.412Z"
}
```

**2. Summary rows** (`output: summary`) - one row per article: `totalViews`, `averageDailyViews`, `peakDate`, `peakViews`, `latestDate`, `latestViews`, `latestRatioTo7DayAverage`, `last7DaysViews`, `previous7DaysViews`, `last7VsPrevious7Pct`, `spikeDays`.

**3. Most viewed articles of a day** (`topLanguages`) - the ranked list Wikimedia publishes for a language edition, up to 300 rows per list: `date`, `rank`, `article`, `views`, `articleUrl`.

**4. Monitoring mode** (`monitoringMode: true`) - schedule the same articles once a day:

- without a spike threshold you get **only the days published since the previous run** (`change: "new-day"`);
- with `spikeMultiplier` (for example `2`) you get **only the new days whose views are at least 2x the average of the 7 days before** (`change: "spike"`), optionally with a floor (`spikeMinViews`);
- the first run saves the starting point, returns no day rows and is not charged; a later run with nothing new returns a single free note row saying so.

### Input

| Field | What it does |
|---|---|
| `articles` | **Article URLs are the surest** (`https://de.wikipedia.org/wiki/Berlin`; a URL carries its own language). Titles (`Taylor Swift`) also work. |
| `language` | Language code for plain titles: `en`, `de`, `fr`, `es`, `ja`, `zh`, `simple`... Default `en`. |
| `days` | Days of history ending yesterday (UTC). Default 30. Up to 300 days per run with `daily` rows, up to 3650 days with `summary`. |
| `startDate`, `endDate` | Exact range instead of `days` (UTC, `YYYY-MM-DD`). Data starts 2015-07-01. |
| `output` | `daily` or `summary`. |
| `spikeMultiplier` | Marks `isSpike` when views >= this many times the average of the 7 days before. |
| `spikeMinViews` | A spike must also have at least this many views. |
| `monitoringMode`, `watchName`, `resetMonitoringState` | Only new days / only spikes, with a saved starting point per article. |
| `topLanguages`, `topDate`, `topLimit` | Most viewed articles of a day per language edition. |
| `access` | `all-access`, `desktop`, `mobile-web`, `mobile-app`. |
| `agent` | `user` (human readers as classified by Wikimedia), `all-agents`, `automated`, `spider`. |

Example - 90 days of three articles, flagging days at 2x the weekly average:

```json
{ "articles": ["Taylor Swift", "Nvidia", "https://en.wikipedia.org/wiki/Bitcoin"], "days": 90, "spikeMultiplier": "2" }
```

Example - a daily spike alert:

```json
{ "articles": ["Nvidia", "Tesla, Inc.", "Bitcoin"], "monitoringMode": true, "spikeMultiplier": "2", "spikeMinViews": 1000 }
```

Example - yesterday's most read articles on the English and German editions:

```json
{ "topLanguages": ["en", "de"], "topLimit": 50 }
```

### Read this before you trust a number

- **Not real time.** Wikimedia publishes each UTC day once, during the following day. Today's views are never available, and yesterday's may still be missing in the first hours after midnight UTC. On 2026-10-05 the figures for 2026-10-04 were already published at 10:18 UTC; the exact publishing hour was not measured and can vary.
- **Paste the article URL when you can.** Wikipedia counts a redirect or an alternate name separately from the article it points to: on 2026-10-04 `Einstein` had 53 views while `Albert Einstein` had 11,126. Titles are case-sensitive after the first letter.
- **What the Actor does for typed titles.** When you type a title (not a URL) it also tries the form with every word capitalised (`albert einstein` -> `Albert_Einstein`), keeps the one with more views in the range, and tells you in `requestedTitle`, `resolvedTitle`, `titleVariantUsed` and `otherVariantViews` (the total of the form it did not use). This costs one extra request and no extra charge. It does **not** resolve real redirects (`USA` -> `United States`): when a result averages fewer than 50 views a day, the rows carry a `lowViewsHint` saying it may be a redirect or a minor page.
- **"No data" is not "no such article".** For a title that does not exist, a wrong language code, or a range with no views, Wikimedia gives the same answer. The Actor returns a free `article-not-found` row that lists these possibilities and does not guess which one it is.
- **Days with zero views** are left out of Wikimedia's answer. Between the first and last day it did return, the Actor fills them in as `views: 0` with `zeroFilled: true`.
- `average7DaysBefore` and `ratioTo7DayAverage` use the 7 days before the row's day (the day itself is not in the average). They are `null` when fewer than 7 earlier days exist.
- The most viewed lists are returned as Wikimedia publishes them, including the main page and special pages such as `Special:Search`.
- Wikimedia can revise published figures later; the Actor returns what the API says at the time of the run.
- In monitoring mode, if a run is more than 45 days after the previous one, only the latest 45 days are considered.

### What is charged

- `article-returned` - one per article that returned data, whether that is 1 day or 3,650 days of rows, or one summary row.
- `top-list-returned` - one per most-viewed list.
- `article-checked` - monitoring mode only: one small charge per article that was checked and had nothing to return (no new day, or no spike). The first run for an article, which only saves the starting point, is not charged.
- Rows that explain why something was not returned (`article-not-found`, `not-read`, `rate-limited`, `no-new-days`, `no-spike`, `baseline-saved`, `budget-reached`, `bad-input`) are never charged. There is no start fee.

If the run reaches the maximum total charge you set, it stops, says so in a `budget-reached` row, and in monitoring mode leaves the memory untouched for the articles it did not return, so the next run picks them up.

### Limits and good manners

The Actor sends one request at a time, two per second at most, with a User-Agent that identifies it, as Wikimedia's API guidelines ask. One article is one request regardless of the date range (two for a typed title that has a capitalised variant). Wikimedia's public API limit (200 requests a minute per User-Agent) is shared by everyone using this Actor; if you need high volumes, Wikimedia Enterprise is the service Wikimedia offers for that. If Wikimedia answers "too many requests" twice in a row the run stops and says which articles were not read, rather than hammering the API.

### Data source and licence

Data comes from the [Wikimedia Analytics API](https://doc.wikimedia.org/generated-data-platform/aqs/analytics-api/) (pageviews). Wikimedia states that data provided by this API is available under the CC0 1.0 licence. This Actor is not affiliated with or endorsed by the Wikimedia Foundation.

### Related Actors

- [Google Trends Scraper](https://apify.com/neverempty/google-trends-scraper) - interest over time, by region, and related queries for search terms.
- [Google Trends Trending Now](https://apify.com/neverempty/google-trends-trending-now) - the daily trending searches by country.

Pageviews show what people read; search trends show what they looked for. Many teams track both.

### Thanks for using this Actor

We build these tools for people who run them every day, and we improve them from what users tell us.

- **Missing a field, or need another filter?** Tell us in the **Issues** tab. If the data is there, we add it.
- **Found a bug or a wrong value?** Post the run ID in the **Issues** tab. Wrong data is the thing we fix first.

If this Actor saved you time, a short review helps other people find it.

# Actor input Schema

## `articles` (type: `array`):

Pasting the article URL is the surest way to name an article, for example `https://de.wikipedia.org/wiki/Berlin` (a URL carries its own language edition). Titles such as `Taylor Swift` also work, but Wikipedia counts a redirect or alternate name (for example `Einstein`) separately from the article it points to (`Albert Einstein`), and titles are case-sensitive after the first letter. For a typed title the Actor also tries the form with every word capitalised and keeps the one with more views (see `resolvedTitle`).

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

Wikipedia language code used for entries given as plain titles: `en`, `de`, `fr`, `es`, `ja`, `zh`, `simple` and so on. Entries given as URLs use the language in the URL.

## `days` (type: `integer`):

How many days to return, ending yesterday (UTC) or at "End date". Ignored when "Start date" is set. Daily pageviews exist from 2015-07-01. One run returns up to 300 days of daily rows per article, or up to 3650 days as one summary row.

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

First day to return (UTC, YYYY-MM-DD). Leave empty to use "Days of history".

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

Last day to return (UTC, YYYY-MM-DD). Leave empty for yesterday: Wikimedia publishes each UTC day once, during the following day, so today is never available.

## `output` (type: `string`):

`daily` returns one row per article per day with views, change from the previous day and ratio to the average of the 7 days before. `summary` returns one row per article with total, daily average, peak day, latest day, and last 7 days against the 7 days before. Either way an article is one charged result.

## `spikeMultiplier` (type: `string`):

For example `2` marks a day as a spike when its views are at least twice the average of the 7 days before it (`isSpike`). In monitoring mode, setting this returns only the spike days. Leave empty for no spike detection.

## `spikeMinViews` (type: `integer`):

A day counts as a spike only if it also has at least this many views. Keeps tiny articles (3 views against an average of 1) out of the alerts.

## `monitoringMode` (type: `boolean`):

Run the same articles on a schedule and get only the days Wikimedia has published since the previous run, or, with a spike threshold, only the new days that are spikes. The first run saves the starting point, returns no day rows and is not charged. After that, articles with nothing to return are charged the small check event instead of a result.

## `watchName` (type: `string`):

Optional. Keeps a separate memory for this name, so two schedules watching the same article do not share a starting point.

## `resetMonitoringState` (type: `boolean`):

Forget the saved starting point for the articles in this run and save a new one.

## `topLanguages` (type: `array`):

Language codes such as `en`, `de`, `ja`. For each one the run returns the most viewed articles of one day, ranked, as Wikimedia publishes them (the list includes the main page and special pages). One list is one charged result.

## `topDate` (type: `string`):

The UTC day of the list (YYYY-MM-DD). Leave empty for the latest published day (yesterday, or the day before if yesterday is not published yet).

## `topLimit` (type: `integer`):

How many ranked articles to return per list, up to 300.

## `access` (type: `string`):

Which readers to count.

## `agent` (type: `string`):

Which traffic class to count for articles, as classified by Wikimedia. The most-viewed lists are published by Wikimedia for one fixed traffic class and ignore this setting.

## Actor input object example

```json
{
  "articles": [
    "Taylor Swift",
    "Nvidia",
    "https://en.wikipedia.org/wiki/Bitcoin"
  ],
  "language": "en",
  "days": 30,
  "output": "daily",
  "spikeMultiplier": "2",
  "monitoringMode": false,
  "resetMonitoringState": false,
  "topLimit": 100,
  "access": "all-access",
  "agent": "user"
}
```

# Actor output Schema

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

Daily rows (one per article per day: date, views, change from the previous day, ratio to the 7-day average, spike flag), summary rows (one per article), or ranked rows of the most viewed articles of a day. Articles with no data, unread articles, monitoring runs with nothing new and runs that hit a limit return a row that says so and is not charged.

# 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 = {
    "articles": [
        "Taylor Swift",
        "Nvidia",
        "https://en.wikipedia.org/wiki/Bitcoin"
    ],
    "spikeMultiplier": "2"
};

// Run the Actor and wait for it to finish
const run = await client.actor("neverempty/wikipedia-pageviews-tracker").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 = {
    "articles": [
        "Taylor Swift",
        "Nvidia",
        "https://en.wikipedia.org/wiki/Bitcoin",
    ],
    "spikeMultiplier": "2",
}

# Run the Actor and wait for it to finish
run = client.actor("neverempty/wikipedia-pageviews-tracker").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 '{
  "articles": [
    "Taylor Swift",
    "Nvidia",
    "https://en.wikipedia.org/wiki/Bitcoin"
  ],
  "spikeMultiplier": "2"
}' |
apify call neverempty/wikipedia-pageviews-tracker --silent --output-dataset

```

## MCP server setup

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

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/sbxVMXcwV3sGNKruF/builds/d8Jz294EAdeTUUObI/openapi.json
