# Wikipedia Pageviews API: Trends, Spikes, Daily Views (`actose/wikipedia-pageviews-trends`) Actor

Daily Wikipedia pageviews per article and language, 0-100 interest index to compare topics, trending articles and spike alerts. Google Trends alternative on official Wikimedia data. No API key, no login. MCP-ready for AI agents. Pay per result, errors free. $0.20 per 1,000 series.

- **URL**: https://apify.com/actose/wikipedia-pageviews-trends.md
- **Developed by:** [ABM](https://apify.com/actose) (community)
- **Categories:** SEO tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.17 / 1,000 pageview series delivereds

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 API: Trends, Spikes, Daily Views

**$0.20 per 1,000 pageview series** (pay per result, no monthly rental). Errors, missing articles and empty results are free.

Get the **daily pageviews of any Wikipedia article in any language**, compare topics on a **0-100 interest index** (like Google Trends), list the **trending articles** of a wiki with their growth, and get **spike alerts** when a person, brand or topic suddenly draws attention.

Data comes from the **official Wikimedia Pageviews API** (the same numbers as pageviews.wmcloud.org). Requests are plain JSON over HTTP: no browser, no proxy, no captcha, no API key and no login. That makes this actor fast and reliable, which matters for scheduled runs that have to work every day.

### What does it do?

| Mode | Input | One result = |
|---|---|---|
| `series` (default) | article titles, `fr:Titre` or Wikipedia URLs | one pageview series per article and language, with stats, trend, spikes, 0-100 interest index and share of views |
| `trending` | a language or a list of wikis | one trending article of the latest day: rank, views, growth vs previous days, new entry flag |
| `alerts` | your watch list of articles | only the articles that are **spiking now**, optionally only new spikes since the last run |

What each result includes:

- `dailyViews`: `[{date, views, interestIndex}]`. Days with zero views are filled in, so the series has no gaps.
- `totalViews`, `averageDailyViews`, `medianViews`, `peakViews`, `peakDate`, `latestViews`, `latestDate`
- `trendPct` (last 7 days vs the 7 days before) and `trendDirection` (`rising` / `stable` / `falling`)
- `spikes` (`date`, `views`, `baselineViews`, `ratio`), `spikeCount`, `lastSpikeDate`, `isSpikingNow`
- `averageInterestIndex`, `shareOfComparisonPct`, `comparisonRank` to compare the topics in one run
- `markdownSummary`: a ready-to-use Markdown paragraph for LLMs, reports and RAG
- `COMPARISON.csv` in the key-value store: one column per article, one row per day, ready for Google Sheets or Excel (its link is in `comparisonCsvUrl`)

Redirects and spelling variants are resolved for you: `elon musk` becomes `Elon Musk`. Duplicates are counted only once. With `languages`, the same article is fetched in other languages through Wikipedia's interlanguage links, for example `Bitcoin` in en, fr, de and ja, to compare interest by country.

### How much does it cost?

You pay **$0.0002 per series delivered** (event `serie-extraite`):

| Volume | Price |
|---|---|
| 10 articles × 1 language | $0.002 |
| 1,000 series (e.g. 250 brands × 4 languages) | **$0.20** |
| Daily alerts on 500 articles, 3 spikes found | $0.0006 (only the 3 alerts are charged) |
| Top 50 trending articles of 5 wikis, every day for 30 days | $1.50 / month |

You are not charged for articles that don't exist, inputs with no views, network errors or an alert run that finds no spike. If you set a spending limit, the run stops cleanly when it is reached.

### Input example

```json
{
  "mode": "series",
  "articles": ["ChatGPT", "Bitcoin", "fr:Emmanuel Macron", "https://de.wikipedia.org/wiki/Berlin"],
  "language": "en",
  "languages": [],
  "lastDays": 90,
  "granularity": "daily",
  "agent": "user",
  "access": "all-access",
  "spikeMultiplier": 3,
  "minSpikeViews": 1000
}
```

Other options: `startDate` / `endDate` (YYYY-MM-DD, data starts 2015-07-01), `granularity: "monthly"`, `agent` (`user` = humans only, `all-agents`, `automated`, `spider`), `access` (`desktop`, `mobile-web`, `mobile-app`), `project` (wiktionary, wikivoyage...), `includeDailyViews`, `alertLookbackDays`, `topN`, `trendingCompareDays`, `trendingDate`, `sortBy` (`views` / `growth`), `onlySpikes`, `onlyNew`, `stateName`, `maxResults`.

### Output example (series mode, shortened)

```json
{
  "mode": "series",
  "article": "ChatGPT",
  "title": "ChatGPT",
  "language": "en",
  "project": "en.wikipedia",
  "url": "https://en.wikipedia.org/wiki/ChatGPT",
  "input": "ChatGPT",
  "redirected": false,
  "granularity": "daily",
  "agent": "user",
  "access": "all-access",
  "startDate": "2026-08-02",
  "endDate": "2026-10-31",
  "periods": 91,
  "totalViews": 3412870,
  "averageDailyViews": 37504.1,
  "medianViews": 35880,
  "peakViews": 51583,
  "peakDate": "2026-10-01",
  "latestViews": 33120,
  "latestDate": "2026-10-31",
  "trendPct": -6.4,
  "trendDirection": "stable",
  "spikes": [],
  "spikeCount": 0,
  "lastSpikeDate": null,
  "isSpikingNow": false,
  "comparisonRank": 1,
  "shareOfComparisonPct": 58.2,
  "averageInterestIndex": 72.7,
  "comparisonCsvUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/COMPARISON.csv",
  "dailyViews": [
    { "date": "2026-10-01", "views": 51583, "interestIndex": 100 },
    { "date": "2026-10-02", "views": 39904, "interestIndex": 77 },
    { "date": "2026-10-03", "views": 32048, "interestIndex": 62 }
  ],
  "markdownSummary": "**ChatGPT** (en.wikipedia) - 2026-08-02 to 2026-10-31 (91 days)\n- Total views: 3,412,870; ...",
  "scrapedAt": "2026-11-01T06:00:12+00:00"
}
```

Trending results also have `rank`, `previousAverageViews`, `previousIsEstimate`, `growthPct` and `isNewEntry`.

### Use cases

#### 1. Brand manager: weekly share of attention vs competitors

A consumer-electronics brand manager tracks how much public attention their brand gets compared with 3 rivals, in the 4 markets they sell in.

Input:

```json
{ "mode": "series", "articles": ["Samsung Galaxy S26", "iPhone 18", "Google Pixel 11", "Xiaomi 16"], "languages": ["en", "fr", "de", "ja"], "lastDays": 28 }
```

Output (extract):

```json
[{ "title": "iPhone 18", "language": "de", "totalViews": 412300, "shareOfComparisonPct": 21.4, "trendDirection": "rising" }]
```

That is 16 series for $0.0032 per run. `COMPARISON.csv` goes into Google Sheets every Monday, and a chart shows the share of attention by country.

#### 2. Newsroom / PR agency: morning spike alert on a watch list

A PR agency watches 300 clients, executives and products. Every morning it only wants to see who suddenly gets attention, before journalists call.

Input (scheduled daily at 7:00):

```json
{ "mode": "alerts", "articles": ["Satya Nadella", "Sam Altman", "fr:Bernard Arnault", "..."], "spikeMultiplier": 3, "minSpikeViews": 2000, "alertLookbackDays": 1, "onlyNew": true }
```

Output (extract):

```json
[{ "title": "Sam Altman", "latestViews": 184220, "lastSpikeDate": "2026-10-31", "spikes": [{ "date": "2026-10-31", "views": 184220, "baselineViews": 21400, "ratio": 8.61 }] }]
```

A Make scenario posts each new alert to Slack together with its `markdownSummary`. Usually 0 to 5 alerts a day: a few cents a month.

#### 3. Content / SEO team: daily breakout topics to write about

A news site's SEO editor wants the topics that are taking off today in French and Spanish, not the evergreen ones.

Input:

```json
{ "mode": "trending", "languages": ["fr", "es"], "topN": 30, "sortBy": "growth", "onlyNew": true }
```

Output (extract):

```json
[{ "rank": 7, "title": "Toussaint", "project": "fr.wikipedia", "latestViews": 98340, "previousAverageViews": 6120.4, "growthPct": 1506.8, "isNewEntry": true }]
```

That is 60 series, $0.012 a day. The list goes into a Google Sheet that the editorial meeting reads at 9:00.

#### 4. Quant / research analyst: long-term interest as an alternative-data signal

An analyst pulls 5 years of monthly interest for 200 crypto assets and listed companies to correlate attention with volume.

Input:

```json
{ "mode": "series", "articles": ["Bitcoin", "Ethereum", "Solana (blockchain platform)", "Nvidia"], "startDate": "2021-01-01", "granularity": "monthly", "includeDailyViews": true }
```

200 series cost $0.04. The analyst loads the results into pandas straight from the dataset API.

### Call it from the API

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("<username>/wikipedia-pageviews-trends").call(run_input={
    "articles": ["ChatGPT", "Bitcoin"], "language": "en", "lastDays": 90,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["totalViews"], item["trendDirection"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('<username>/wikipedia-pageviews-trends').call({
    articles: ['ChatGPT', 'Bitcoin'], language: 'en', lastDays: 90,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.title, i.averageInterestIndex]));
```

### Integrations (Make, n8n, Zapier, Google Sheets)

- **Make / Zapier**: use the "Run actor" module with the input JSON. Then "Get dataset items", followed by Slack, Gmail or Google Sheets "Add row".
- **n8n**: Apify node with the `Run actor and get dataset` operation, then filter on `isSpikingNow = true` and send a Telegram or Slack message.
- **Google Sheets**: `=IMPORTDATA("https://api.apify.com/v2/key-value-stores/<storeId>/records/COMPARISON.csv")`, or the dataset export `.../items?format=csv`.
- **Schedules**: create an Apify schedule (e.g. daily at 7:00) with `"mode": "alerts", "onlyNew": true`.

### Use with AI agents (MCP)

This actor works with the Apify MCP server, so Claude, Cursor, ChatGPT and other MCP clients can call it as a tool, for example: *"Compare public interest in Taylor Swift and Beyoncé in English and Spanish over the last 6 months"*. Each result has a `markdownSummary` field that agents can quote directly, and the numeric fields can be charted without extra parsing.

### FAQ

**Is this the same as Google Trends?** No. Google Trends measures searches; this measures how many people actually read the Wikipedia article. That is a strong public signal of interest for people, brands, events and topics, with absolute numbers rather than only relative ones, and history back to July 2015. The `interestIndex` puts it on a familiar 0-100 scale.

**How fresh is the data?** Wikimedia publishes each day's numbers after the day ends (UTC), usually within 24 hours. The latest day available is normally yesterday.

**Why is my article "not found"?** The title must exist on the chosen wiki. Use the exact title, a `lang:` prefix or paste the URL. Redirects are followed automatically. You are not charged for missing articles; they are listed in the `SUMMARY` record.

**Are bots counted?** Not by default: `agent: "user"` excludes identified crawlers and automated traffic. Trending lists can still contain a few bot-inflated pages (see Limits).

**Do I need a Wikimedia account or key?** No. The data is public and the actor only reads it.

### Limits

- Data starts on 2015-07-01 and is daily or monthly, never hourly.
- The trending list is published by Wikimedia (top 1,000 per day per wiki). An article missing from a previous day's top 1,000 is estimated at that day's cut-off (`previousIsEstimate: true`), so its growth is a lower bound.
- Some trending pages are inflated by undetected automated traffic. Check pages with suspicious spikes before you publish.
- Pageviews measure readers of one article title. A topic split across several articles is not merged.
- Very new or tiny wikis may have no published data for the latest day.

# Actor input Schema

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

<b>series</b>: one pageview series per article and language, with a 0-100 interest index to compare them. <b>trending</b>: most-viewed articles of a wiki on the latest day, with growth vs previous days. <b>alerts</b>: only the articles whose views spiked in the last days (ideal for scheduled runs).

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

Article titles ("ChatGPT"), titles with a language prefix ("fr:Emmanuel Macron") or full URLs (https://de.wikipedia.org/wiki/Berlin). Redirects and spelling variants are resolved automatically. Used by the series and alerts modes.

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

Wiki language code used for titles without a prefix (en, fr, de, es, ja, zh, ru...). In trending mode, the wiki to rank.

## `languages` (type: `array`):

Optional. Series/alerts: the same article is also fetched in these languages via Wikipedia's interlanguage links (e.g. \["fr", "de", "ja"]) to compare interest by country. Trending: list of wikis to rank (replaces the default language).

## `lastDays` (type: `integer`):

Length of the period ending yesterday (data starts on 2015-07-01). Ignored if a start date is set. Alerts mode always reads at least 30 days to compute the baseline.

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

Optional. Start of the period (YYYY-MM-DD).

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

Optional. End of the period (YYYY-MM-DD). Default: yesterday (latest published day).

## `granularity` (type: `string`):

Daily or monthly totals (series and alerts modes).

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

<b>user</b> = humans only (recommended, bots excluded). all-agents, automated or spider for other traffic.

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

Count views from all platforms or only desktop, mobile web or mobile app.

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

Wikipedia by default. Other Wikimedia wikis are supported too.

## `includeDailyViews` (type: `boolean`):

Keep the dailyViews array (date, views, interestIndex) in each result. Turn off for summary-only results.

## `spikeMultiplier` (type: `integer`):

A day is a spike when its views are at least this many times the median of the previous 14 days.

## `minSpikeViews` (type: `integer`):

Ignore spikes below this daily view count (filters noise on small articles).

## `alertLookbackDays` (type: `integer`):

A series is 'spiking now' when a spike happened in this many latest days. Alerts mode only returns those.

## `topN` (type: `integer`):

How many of the most-viewed articles to return per wiki (main page and special pages excluded).

## `trendingCompareDays` (type: `integer`):

Growth is computed against the average of this many previous days.

## `trendingDate` (type: `string`):

Optional. Day to rank (YYYY-MM-DD). Default: latest published day.

## `sortBy` (type: `string`):

Sort by views (rank) or by growth vs the previous days (breakout topics first).

## `onlySpikes` (type: `boolean`):

Trending mode: keep only articles whose views jumped above the spike threshold.

## `onlyNew` (type: `boolean`):

Alerts: skip spikes already returned by a previous run. Trending: skip articles already returned in the last 30 days. State is kept in a named key-value store.

## `stateName` (type: `string`):

Optional label to keep several independent 'only new' memories (e.g. one per client). Default: derived from the input.

## `maxResults` (type: `integer`):

Upper limit of series delivered (and charged) in this run.

## Actor input object example

```json
{
  "mode": "series",
  "articles": [
    "ChatGPT",
    "Bitcoin",
    "fr:Emmanuel Macron",
    "https://de.wikipedia.org/wiki/Berlin"
  ],
  "language": "en",
  "languages": [
    "fr",
    "de",
    "es"
  ],
  "lastDays": 90,
  "granularity": "daily",
  "agent": "user",
  "access": "all-access",
  "project": "wikipedia",
  "includeDailyViews": true,
  "spikeMultiplier": 3,
  "minSpikeViews": 1000,
  "alertLookbackDays": 2,
  "topN": 50,
  "trendingCompareDays": 7,
  "sortBy": "views",
  "onlySpikes": false,
  "onlyNew": false,
  "maxResults": 1000
}
```

# Actor output Schema

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

No description

## `comparisonCsv` (type: `string`):

No description

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

No description

## `overview` (type: `string`):

Main results as a table (dataset view).

# 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": "series",
    "articles": [
        "ChatGPT",
        "Bitcoin"
    ],
    "language": "en",
    "lastDays": 90,
    "spikeMultiplier": 3,
    "topN": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("actose/wikipedia-pageviews-trends").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": "series",
    "articles": [
        "ChatGPT",
        "Bitcoin",
    ],
    "language": "en",
    "lastDays": 90,
    "spikeMultiplier": 3,
    "topN": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("actose/wikipedia-pageviews-trends").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": "series",
  "articles": [
    "ChatGPT",
    "Bitcoin"
  ],
  "language": "en",
  "lastDays": 90,
  "spikeMultiplier": 3,
  "topN": 50
}' |
apify call actose/wikipedia-pageviews-trends --silent --output-dataset

```

## MCP server setup

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

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/fILsaFAPraR6zF1bs/builds/LCRtHME2r4ZZzc40Z/openapi.json
