# Wikipedia Pageviews & Trends: Google Trends Alternative (`capable_santolina/pageviews-trends-for-wikipedia`) Actor

Wikipedia pageviews: absolute daily or monthly counts for any article list, with growth %, peak, 0–100 index and top-article rankings. Independent tool.

- **URL**: https://apify.com/capable_santolina/pageviews-trends-for-wikipedia.md
- **Developed by:** [Doyle Pounders](https://apify.com/capable_santolina) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 article timeseries

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

## Pageviews Trends for Wikipedia: absolute pageview counts and trend metrics

> Independent tool. Not affiliated with, sponsored or endorsed by the Wikimedia Foundation or Google.

Get **absolute daily or monthly pageview counts** for any list of Wikipedia articles in any language edition. Every result includes **trend metrics**: growth %, week-over-week change, peak, average and median, and a **0–100 index** like Google Trends uses. You can also pull the **top 1–1,000 most-read articles** for a day or month.

Data comes from the official **Wikimedia Analytics Pageviews API**. It is **CC0**, available from **2015-07-01**, and needs no login, proxy or API key.

### Compared with Google Trends

| | Google Trends | This Actor |
|---|---|---|
| Numbers | Relative 0–100 only | **Absolute view counts**, plus a 0–100 index |
| Terms per comparison | Up to 5 ([Google](https://support.google.com/trends/answer/4359550)) | **Any number of articles** |
| Reproducibility | Based on a sample of searches ([Google](https://support.google.com/trends/answer/4365533)) | Published counts (from 2015-07-01) |
| Languages | Per country | **300+ Wikipedia language editions** ([list](https://en.wikipedia.org/wiki/List_of_Wikipedias)), mixable in one run |
| Bot filtering | Not exposed | Choose `user` (bot-filtered), `spider`, `automated` or `all-agents` |
| Licence | Google ToS | **CC0 1.0** |

Wikipedia views measure **reading interest**, not search volume. The two are related but not the same.

### Use cases

- Brand and product interest: ChatGPT vs Claude vs Gemini, phones, SaaS tools.
- Alternative-data features: companies, cryptocurrencies, commodities.
- Content and SEO planning: rising topics, seasonal peaks, news spikes.
- Research: nowcasting and attention studies.
- Daily "what's trending" feeds (top mode).

### Real run (2026-10-26, about 9:58 PM America/Chicago = 2026-10-27 02:58 UTC)

Input (`demo/INPUT.json`, the exact input that produced every sample below):

```json
{
  "mode": "articles",
  "articles": [
    "ChatGPT",
    "Claude (AI)",
    "Google Gemini",
    "Grok (chatbot)",
    "Microsoft Copilot",
    "Perplexity AI",
    "DeepSeek",
    "https://de.wikipedia.org/wiki/ChatGPT",
    "This Article Does Not Exist Zq9"
  ],
  "project": "en.wikipedia.org",
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "includeSeries": true
}
```

No dates were given, so the Actor checked what Wikimedia had published (2026-10-26 UTC was **not** published yet) and used the 30 days ending **2026-10-25**. Result: 8 `ok` rows and 1 free `not_found` row, from 11 API requests in 3.6 s of Actor time (per `demo/articles-run.log`).

| Article | Project | Total views | Avg/day | Trend % (2nd half vs 1st) | Week-over-week % | Peak date | Index |
|---|---|---|---|---|---|---|---|
| ChatGPT | en.wikipedia.org | 1,883,871 | 62,795.7 | 68.8 | 176.7 | 2026-10-21 | 100 |
| Claude (AI) | en.wikipedia.org | 171,393 | 5,713.1 | 22.3 | 50.9 | 2026-10-22 | 9.1 |
| Google Gemini | en.wikipedia.org | 82,990 | 2,766.3 | 35.9 | 102.5 | 2026-10-20 | 4.4 |
| Grok (chatbot) | en.wikipedia.org | 51,834 | 1,727.8 | 4.7 | 7.6 | 2026-10-22 | 2.8 |
| Microsoft Copilot | en.wikipedia.org | 36,832 | 1,227.7 | 5.2 | 12.8 | 2026-10-21 | 2 |
| Perplexity AI | en.wikipedia.org | 65,099 | 2,170 | -1.2 | 17.4 | 2026-10-21 | 3.5 |
| DeepSeek | en.wikipedia.org | 91,656 | 3,055.2 | 32.3 | 27.3 | 2026-10-20 | 4.9 |
| ChatGPT | de.wikipedia.org | 229,724 | 7,657.5 | 0.3 | 18.8 | 2026-10-21 | 12.2 |

### Output

One item per article. The `SUMMARY` record in the key-value store ranks them. This is the first item of the run above, verbatim except that `series` is trimmed to 2 entries:

```json
{
  "mode": "articles",
  "input": "ChatGPT",
  "article": "ChatGPT",
  "articleTitle": "ChatGPT",
  "project": "en.wikipedia.org",
  "articleUrl": "https://en.wikipedia.org/wiki/ChatGPT",
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "startDate": "2026-09-26",
  "endDate": "2026-10-25",
  "dataAvailableThrough": "2026-10-25",
  "status": "ok",
  "dataPoints": 30,
  "totalViews": 1883871,
  "averageViews": 62795.7,
  "medianViews": 50069.5,
  "peakViews": 163328,
  "peakDate": "2026-10-21",
  "minViews": 28298,
  "minDate": "2026-10-11",
  "firstValue": 40694,
  "lastValue": 71140,
  "firstHalfAverage": 46724.9,
  "secondHalfAverage": 78866.5,
  "trendChangePct": 68.8,
  "last7Average": 121163,
  "previous7Average": 43794,
  "weekOverWeekPct": 176.7,
  "zeroDays": 0,
  "series": [
    {
      "date": "2026-09-26",
      "views": 40694,
      "index": 24.9
    },
    {
      "date": "2026-09-27",
      "views": 41296,
      "index": 25.3
    },
    "..."
  ],
  "relativeIndex": 100
}
```

- `relativeIndex` is 0–100 relative to the article in this run with the highest average. `series[].index` is relative to the highest single period in the run.
- `dataAvailableThrough` is the latest day (or month) Wikimedia had published when the run started. The Actor never goes past it, so unpublished days never show up as fake zeros. Later `endDate`s are clamped, with a warning in the log and `endDateClamped: true` in SUMMARY.
- `zeroDays` counts genuine zero-view days inside the published range (the API omits days with no views).

A free row (never charged):

```json
{
  "mode": "articles",
  "input": "This Article Does Not Exist Zq9",
  "article": "This Article Does Not Exist Zq9",
  "articleTitle": "This_Article_Does_Not_Exist_Zq9",
  "project": "en.wikipedia.org",
  "articleUrl": "https://en.wikipedia.org/wiki/This_Article_Does_Not_Exist_Zq9",
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "startDate": "2026-09-26",
  "endDate": "2026-10-25",
  "dataAvailableThrough": "2026-10-25",
  "status": "not_found",
  "error": "No pageviews recorded for this exact title in this date range. Check spelling/capitalisation; if the title is a redirect, open the article and use the title shown in the address bar."
}
```

**Monthly granularity** always ends at the **last complete published month**. A part-month is never mixed in. Example from the same evening (`demo/INPUT-monthly.json`: Bitcoin and Ethereum from 2025-10-01; September 2026 was the last complete month), Bitcoin row with `series` trimmed:

```json
{
  "mode": "articles",
  "input": "Bitcoin",
  "article": "Bitcoin",
  "articleTitle": "Bitcoin",
  "project": "en.wikipedia.org",
  "articleUrl": "https://en.wikipedia.org/wiki/Bitcoin",
  "granularity": "monthly",
  "access": "all-access",
  "agent": "user",
  "startDate": "2025-10-01",
  "endDate": "2026-09-30",
  "dataAvailableThrough": "2026-09",
  "status": "ok",
  "dataPoints": 12,
  "totalViews": 1401557,
  "averageViews": 116796.4,
  "medianViews": 107535.5,
  "peakViews": 188739,
  "peakDate": "2026-02-01",
  "minViews": 76252,
  "minDate": "2026-07-01",
  "firstValue": 158676,
  "lastValue": 100154,
  "firstHalfAverage": 140051,
  "secondHalfAverage": 93541.8,
  "trendChangePct": -33.2,
  "last7Average": null,
  "previous7Average": null,
  "weekOverWeekPct": null,
  "zeroDays": 0,
  "series": [
    {
      "date": "2025-10-01",
      "views": 158676,
      "index": 84.1
    },
    "...",
    {
      "date": "2026-09-01",
      "views": 100154,
      "index": 53.1
    }
  ],
  "relativeIndex": 100
}
```

**Top mode** (`demo/INPUT-top.json`: `{"mode":"top","topLimit":25}`, with the date defaulting to the latest published day). This is the first row, verbatim:

```json
{
  "mode": "top",
  "status": "ok",
  "rank": 1,
  "originalRank": 4,
  "article": "2026 Brazilian general election",
  "articleTitle": "2026_Brazilian_general_election",
  "views": 271783,
  "project": "en.wikipedia.org",
  "period": "2026-10-25",
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "articleUrl": "https://en.wikipedia.org/wiki/2026_Brazilian_general_election",
  "dataAvailableThrough": "2026-10-25"
}
```

Top-mode rows: `rank` (after special-page filtering), `originalRank` (Wikimedia's rank), `article`, `articleTitle`, `views`, `project`, `period`, `granularity`, `access`, `agent` (always `user`), `articleUrl`, `status`, `dataAvailableThrough`. If you ask for a date that isn't published yet, you get a single free `no_data` row.

### Input

| Field | Default | Notes |
|---|---|---|
| `mode` | `articles` | `articles` (series + metrics per article) or `top` (ranking for one day or month) |
| `articles` | `["ChatGPT"]` | Current titles (`Taylor Swift`) or URLs (`https://de.wikipedia.org/wiki/ChatGPT`). A URL's language edition overrides `project`. |
| `project` | `en.wikipedia.org` | Any Wikimedia project domain |
| `granularity` | `daily` | `monthly` = whole, complete months |
| `startDate` / `endDate` | 30 days (daily) or 12 complete months (monthly), ending at the latest published day or month | In top mode, `endDate` is the day or month to rank |
| `access` | `all-access` | `desktop`, `mobile-web`, `mobile-app` |
| `agent` | `user` | `user` = traffic not classified as bots (self-identified spiders and heuristically detected automated traffic are excluded; some undetected bot traffic may remain) |
| `includeSeries` | `true` | `false` = summary-only rows |
| `topLimit` | 100 | 1–1000 (top mode) |
| `excludeSpecialPages` | `true` | Drops the Main Page and common special/namespace pages (best coverage on English Wikipedia) |
| `contactInfo` | – | Optional. Your email or URL, added to the User-Agent next to the Actor's own contact |

### Pricing (pay per event)

- `article-timeseries`: one charge per article with `status: ok`, whatever the date range.
- `top-article-row`: one charge per ranked row.
- `not_found`, `error`, `no_data` and `skipped` rows are free.

Live prices are on the Pricing tab. The proposed launch prices are estimates (see `PRICING.md`). When your **Max total charge** is reached, the Actor stops fetching, and the remaining inputs come back as free `skipped` rows.

### Tips and limits

- Pageviews count the **exact title**. Redirects are **not** followed, so use the current title (the one in the address bar after any redirect). Redirect titles have their own, usually tiny, counts.
- Data is available from **2015-07-01**. Each UTC day is usually published within 1–2 days, and each month a few days after it ends. The Actor checks what has been published (on the run's `project`) and never returns unpublished days as zeros (`dataAvailableThrough` shows the cut-off).
- Requests are sequential (at most ~150 per minute) and back off on 429/5xx, honouring `Retry-After` up to 120 s. A run with 1,000 articles takes about 7–9 minutes.
- Memory: every series is held in memory to compute the 0–100 index. When articles × periods goes above 500,000 (e.g. 1,000 articles × 11 years daily), the run logs a warning. Use monthly granularity, a shorter range, fewer articles per run, or 1 GB+ memory.

### Legal and data source

- Source: [Wikimedia Analytics Pageviews API](https://doc.wikimedia.org/generated-data-platform/aqs/analytics-api/) only. The host `wikimedia.org/api/rest_v1/` is not restricted by robots.txt. No Wikipedia pages and no `/w/api.php` (disallowed in [robots.txt](https://en.wikipedia.org/robots.txt)) are requested.
- Licence: "All Analytics datasets are available under the Creative Commons Zero (CC0) public domain dedication, unless otherwise specified" ([Wikimedia dumps legal page](https://dumps.wikimedia.org/legal.html)). The Analytics API says the same: "Data provided by the API is available under the CC0 1.0 license" ([access policy](https://doc.wikimedia.org/generated-data-platform/aqs/analytics-api/documentation/access-policy.html)). Output holds only article titles, URLs and counts. No article text (CC BY-SA 4.0) is copied. Suggested credit: "Pageview data: Wikimedia Foundation, CC0."
- User-Agent, per the [Wikimedia User-Agent policy](https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_Policy): `PageviewsTrendsBot/0.1.0 (+https://apify.com/capable_santolina/pageviews-trends-for-wikipedia; pounderswork@mail.grokbot.com) apify-sdk/3 node/<version>`. Pacing stays inside the [API rate limits](https://www.mediawiki.org/wiki/Wikimedia_APIs/Rate_limits).
- No personal data: pageviews are aggregate counts per article. Nothing behind a login is accessed.
- Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. "Google Trends" is a trademark of Google LLC. This Actor is an independent tool that uses the public Wikimedia Pageviews API, and it is not affiliated with, sponsored or endorsed by the Wikimedia Foundation or Google. No Wikimedia logos are used.
- Contact / takedown: pounderswork@mail.grokbot.com.

# Actor input Schema

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

'articles' = one result per article with a full time series and trend metrics. 'top' = the most-viewed articles of a project for one day or month.

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

Current article titles exactly as on Wikipedia (e.g. 'ChatGPT', 'Taylor Swift') or full URLs (https://en.wikipedia.org/wiki/ChatGPT). Redirect titles are NOT followed: open the article and use the title shown in the address bar. A URL's language edition overrides the Project field. Used in 'articles' mode.

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

Wikimedia project domain, e.g. en.wikipedia.org, de.wikipedia.org, es.wikipedia.org, commons.wikimedia.org, en.wiktionary.org.

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

Daily or monthly data points (articles mode). Data is available from 2015-07-01.

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

YYYY-MM-DD. Defaults to 30 days (daily) or 12 complete months (monthly) ending at the end date. Data starts 2015-07-01.

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

YYYY-MM-DD (inclusive). Defaults to the latest day (or month) Wikimedia has published. Later dates are clamped to it, so unpublished days never appear as zeros. With monthly granularity, the series ends at the last complete published month. In 'top' mode this is the day (or month) to rank.

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

Which traffic to count.

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

'user' = traffic not classified as bots (self-identified spiders and heuristically detected automated traffic are excluded; some undetected bot traffic may remain). Only used in 'articles' mode; 'top' rankings always use 'user' traffic.

## `includeSeries` (type: `boolean`):

Include the per-day/per-month data points array in each result. Turn off for summary-only output.

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

How many top articles to return in 'top' mode (max 1000). Special pages such as Main_Page are excluded by default.

## `excludeSpecialPages` (type: `boolean`):

Skip the Main Page and common special/namespace pages (Special:, Wikipedia:, Portal:, File:…) in 'top' mode. Best coverage on English Wikipedia.

## `contactInfo` (type: `string`):

Optional. Your email or URL, added to the User-Agent next to the Actor's own contact so Wikimedia can reach whoever is running heavy jobs.

## Actor input object example

```json
{
  "mode": "articles",
  "articles": [
    "ChatGPT",
    "Claude (AI)",
    "Google Gemini"
  ],
  "project": "en.wikipedia.org",
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "includeSeries": true,
  "topLimit": 100,
  "excludeSpecialPages": true
}
```

# Actor output Schema

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

All dataset rows (one per input). Opens on the 'overview' view; switch views in Console.

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

JSON run summary: date range, data-available-through date, ranking of articles, not-found inputs and the User-Agent used.

# 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": [
        "ChatGPT",
        "Claude (AI)",
        "Google Gemini"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("capable_santolina/pageviews-trends-for-wikipedia").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": [
        "ChatGPT",
        "Claude (AI)",
        "Google Gemini",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("capable_santolina/pageviews-trends-for-wikipedia").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": [
    "ChatGPT",
    "Claude (AI)",
    "Google Gemini"
  ]
}' |
apify call capable_santolina/pageviews-trends-for-wikipedia --silent --output-dataset

```

## MCP server setup

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

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/U31EFrjo8QpJO15zo/builds/7xOSPWZeqjZDald4r/openapi.json
