# Wikipedia Pageviews Scraper: attention trends for any topic (`bepolabs/wikipedia-pageviews`) Actor

Type in names or links, choose a period, and receive views with totals and averages from the official Wikimedia API. Mix editions in one run, up to 500 entries.

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

## Pricing

$0.92 / 1,000 rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

### 📈 What is Wikipedia Pageviews?

Public interest in an encyclopedia entry becomes a number with Wikipedia Pageviews. Name the subjects you care about, in any edition, and every row comes back with its view count, ready for a model, a dashboard or a report. Filter by device and by human or automated visitors.

- **Trend and interest research**: see when people start reading about a product, a person or a topic
- **Crypto, stocks and markets**: use Wikipedia attention as an alternative data signal next to prices
- **SEO and content planning**: compare the demand for topics before you write about them
- **Media and brand monitoring**: follow your company, its rivals or a news event as it unfolds
- **Academic and data science work**: build clean time series of public interest for papers, dashboards and forecasts

![Wikipedia Pageviews: Daily or monthly views of any Wikipedia article in any language, with totals and averages, from the official Wikimedia API.](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wikipedia-pageviews-hero.png)

#### ✨ Why use this Actor?

- ✅ **Titles or URLs, any language**: paste `Web scraping` or `https://de.wikipedia.org/wiki/Bitcoin`; the URL sets the edition
- ✅ **Daily or monthly**: one row per day for detail, or one per month for long trends
- ✅ **Totals and averages included**: every row carries the article's total and average over the range, so no extra step is needed
- ✅ **Desktop, mobile web or app**: split views by access type, and choose human readers only (`user`) or all agents
- ✅ **Many articles in one run**: up to 500 per run, five at a time; a missing article never stops the others
- ✅ **Very cheap**: 0.1 USD per 1,000 rows: a month of daily views for one article costs 0.003 USD

### 📦 What data can you get with Wikipedia Pageviews?

| | | |
|---|---|---|
| 📰 Article title | 🌍 Project (language edition) | 📅 Date (day or month) |
| 👀 Views | ➕ Article total over the range | ➗ Article average per day or month |
| 📱 Access: all, desktop, mobile web, app | 🧑 Agent: humans only or all | ⏳ Granularity: daily or monthly |
| 🔗 Article URL | 📊 Run summary with totals per article | ⚠️ Reason for missing articles |

### 🚀 How to use Wikipedia Pageviews

Wikipedia Pageviews works in a few clicks, no coding needed:

1. [Create a free Apify account](https://console.apify.com/sign-up) (the free plan includes 5 USD of monthly credit).
2. Open [Wikipedia Pageviews](https://apify.com/bepolabs/wikipedia-pageviews) and click **Try for free**.
3. Enter article titles or Wikipedia URLs, pick a start and end date, and choose daily or monthly.
4. Click **Start** and wait for the run to finish (most runs take seconds).
5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

![How Wikipedia Pageviews works](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wikipedia-pageviews-workflow.png)

### ⬇️ Input

Add article titles or Wikipedia URLs, up to 500 per run. Without dates you get the last 30 full days.

##### Title or URL?

A bare title such as `Large language model` uses the `project` field (default `en.wikipedia`; for German Wikipedia use `de.wikipedia`). A URL such as `https://de.wikipedia.org/wiki/Bitcoin` sets the project itself, so you can mix languages in one run. Mobile URLs (`en.m.wikipedia.org`) work too.

##### Dates and granularity

`start` and `end` take dates such as `2026-09-01`. Without them the run covers the 30 days up to yesterday. With `granularity` set to `monthly`, each row is one month and is dated on its first day.

##### Access and agent

`access` splits views into `desktop`, `mobile-web` or `mobile-app` (default `all-access`). `agent` set to `user` counts human readers; `all-agents` adds crawlers and automated traffic.

| Field | Type | What it does | Default |
|---|---|---|---|
| **Articles** (`articles`) | array | Titles (Web scraping) or Wikipedia URLs (any language; the URL sets the project). | `["Web scraping"]` |
| **Project** (`project`) | string | Wiki for bare titles, e.g. | `"en.wikipedia"` |
| **Start date** (`start`) | string | e.g. |  |
| **End date** (`end`) | string | e.g. |  |
| **Granularity** (`granularity`) | string | Time resolution of the view counts: "daily" (one row per article and day) or "monthly" (one row per article and month). | `"daily"` |
| **Access** (`access`) | string | all-access, desktop, mobile-web or mobile-app. | `"all-access"` |
| **Agent** (`agent`) | string | user (humans) or all-agents (bots too). | `"user"` |
| **Maximum retries** (`maxRetries`) | integer | Retries per request with exponential backoff on network errors, 429 and 5xx. | `3` |

![Wikipedia Pageviews input form](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wikipedia-pageviews-input.png)

#### Input example

```json
{
    "articles": [
        "Web scraping",
        "Large language model"
    ],
    "start": "2026-09-01",
    "end": "2026-09-30"
}
```

### ⬆️ Output

Every day (or month) of every article becomes one row with views, total and average over the range, plus the settings used. The run summary in the key-value store (`OUTPUT`) lists each title with its sum and number of rows, or why it returned nothing.

![Wikipedia Pageviews output table](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wikipedia-pageviews-output.png)

#### Output example

One row of the dataset (from a real run, September 2026):

```json
{
    "article": "Web scraping",
    "project": "en.wikipedia",
    "date": "2026-09-01",
    "views": 1641,
    "granularity": "daily",
    "access": "all-access",
    "agent": "user",
    "articleTotal": 56067,
    "articleAverage": 1869,
    "url": "https://en.wikipedia.org/wiki/Web_scraping"
}
```

#### Run summary and missing articles

An article that does not exist, or had no views in the range, does not stop the run and is never charged: it is listed in the run summary (`OUTPUT`) with the reason. From a real run with `Python (programming language)` and a made-up title:

```json
{
    "ok": true,
    "rows": 7,
    "problems": [],
    "articles": [
        {
            "article": "Python_(programming_language)",
            "ok": true,
            "rows": 7,
            "total": 4904,
            "error": null
        },
        {
            "article": "No_such_article_4821_xyz",
            "ok": false,
            "rows": 0,
            "total": 0,
            "error": "no data (article missing or no views in range)"
        }
    ]
}
```

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS, all fields or only those you pick.

### 💰 How much does Wikipedia Pageviews cost?

Wikipedia Pageviews is priced **per event**: **0.1 USD per 1,000 rows** (0.0001 USD per row), with no monthly rental. Titles that return no data are free.

| You get | You pay |
|---|---|
| 100 rows | 0.01 USD |
| 1,000 rows | 0.1 USD |
| 10,000 rows | 1 USD |
| 100,000 rows | 10 USD |

💡 Apify's free plan gives you 5 USD of credit every month, enough for about **50,000 rows** at no cost. Set a spending limit per run and the Actor stops there.

### ⚖️ Wikipedia Pageviews vs. the alternatives

| | Wikipedia Pageviews | Pageviews web tools | Writing your own API script |
|---|---|---|---|
| **Many articles and languages in one run** | ✅ up to 500 | ✅ a handful per chart | ✅ after coding |
| **Titles or URLs mixed** | ✅ | ❌ title per language | your code |
| **Totals and averages on every row** | ✅ | on screen | your code |
| **Schedules, webhooks and exports** | ✅ | ❌ | your server |
| **Works with Claude and AI agents (MCP)** | ✅ | ❌ | ❌ |

### 🔌 Integrations, API and MCP

#### Connect Wikipedia Pageviews to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to Wikipedia Pageviews through the [Apify MCP server](https://mcp.apify.com). Add this URL to its settings:

```text
https://mcp.apify.com/?actors=bepolabs/wikipedia-pageviews
```

For Claude Desktop, add it under `mcpServers` in `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "wikipedia-pageviews": {
            "command": "npx",
            "args": [
                "-y",
                "@apify/actors-mcp-server",
                "--actors",
                "bepolabs/wikipedia-pageviews"
            ],
            "env": {
                "APIFY_TOKEN": "<your Apify API token>"
            }
        }
    }
}
```

Then ask: *"How many people read the English Wikipedia articles on Bitcoin and Ethereum each month this year?"*

#### Run it from your code

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/wikipedia-pageviews").call(run_input={"articles":["Web scraping","Large language model"],"start":"2026-09-01","end":"2026-09-30"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/wikipedia-pageviews').call({"articles":["Web scraping","Large language model"],"start":"2026-09-01","end":"2026-09-30"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### No-code integrations

Send results to **Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n** and more from the Integrations tab, start runs on a **schedule**, or trigger your own endpoint with a **webhook** when a run finishes. The [Apify API](https://docs.apify.com/api/v2) gives you full control over runs and datasets.

### ❓ FAQ

##### Where does the data come from?

From the official Pageviews REST API of the Wikimedia Foundation, the same source its own tools use. The data is published under CC0.

##### How far back does the data go?

The Pageviews API starts in July 2015. Figures usually appear within a day; the default range ends with the latest full one.

##### Do redirects count?

No. Views are counted for the exact name you give. If a page was renamed, ask for its current title (or add the old one as a second article).

##### Can I get hourly data?

No. The Actor offers daily and monthly granularity.

##### Why is an article missing from the results?

The title does not exist in that language edition, is spelled differently, or had no views in the range. The run summary says which. Copying the article's URL from your browser avoids spelling problems.

##### Is it legal to use Wikipedia Pageviews?

Yes. Wikimedia publishes pageview data openly under CC0 through its public API, and the Actor calls it with an identifying User-Agent as the foundation asks. No personal data is involved: the numbers are aggregate counts per article.

##### What if something is missing or does not work?

Open an issue on the **Issues** tab; we read each one and reply. Feature requests are welcome too.

### 💬 Your feedback

Tell us what Wikipedia Pageviews should add on the **Issues** tab or leave a review; your notes decide what we work on next.

### 🔗 Related Actors

| Actor | What it does |
|---|---|
| 📈 [Google Trends Scraper](https://apify.com/bepolabs/google-trends) | Interest over time for up to five keywords on one 0 to 100 scale, any country or worldwide, plus top and rising related queries. |
| 📢 [Google Ads Transparency Scraper](https://apify.com/bepolabs/google-ads-transparency) | Every ad a company runs on Google, by domain, advertiser ID or name, from the Ads Transparency Center. |
| 🦋 [Bluesky Posts](https://apify.com/bepolabs/bluesky-posts) | Bluesky posts for any search or handle with text, date, author, likes, reposts, replies, links and hashtags. No login. |
| 🟧 [Hacker News Search](https://apify.com/bepolabs/hacker-news) | Hacker News stories, comments, Ask HN, Show HN and jobs for any search, with points, comment count, date and text. |
| 🔗 [Broken Link Checker](https://apify.com/bepolabs/link-checker) | Every link and image on your pages checked: HTTP status, each redirect hop, final URL and response time. |
| ⚡ [Bulk PageSpeed Insights](https://apify.com/bepolabs/pagespeed) | Lighthouse scores, lab metrics and real-user Core Web Vitals for any list of URLs, on mobile, desktop or both. |
| 📰 [RSS Feed Reader](https://apify.com/bepolabs/rss-reader) | Any RSS, Atom or JSON feed, or just a website URL, to one clean list of articles, with full text on request. |
| 🩺 [SEO Audit](https://apify.com/bepolabs/seo-audit) | Any page to a 0 to 100 SEO score and grade, with the fixes that matter most first: on-page, links and Core Web Vitals. |

# Changelog

This Actor's version history is a separate document: https://apify.com/bepolabs/wikipedia-pageviews/changelog.md

# Actor input Schema

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

Titles (Web scraping) or Wikipedia URLs (any language; the URL sets the project). Up to 500.

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

Wiki for bare titles, e.g. en.wikipedia, de.wikipedia.

## `start` (type: `string`):

e.g. 2026-09-01. Default: 30 days before the end.

## `end` (type: `string`):

e.g. 2026-09-30. Default: yesterday.

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

Time resolution of the view counts: "daily" (one row per article and day) or "monthly" (one row per article and month).

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

all-access, desktop, mobile-web or mobile-app.

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

user (humans) or all-agents (bots too).

## `maxRetries` (type: `integer`):

Retries per request with exponential backoff on network errors, 429 and 5xx.

## Actor input object example

```json
{
  "articles": [
    "Web scraping"
  ],
  "project": "en.wikipedia",
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "maxRetries": 3
}
```

# Actor output Schema

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

Dataset items, one row per result, in the overview table 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 = {
    "articles": [
        "Web scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bepolabs/wikipedia-pageviews").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": ["Web scraping"] }

# Run the Actor and wait for it to finish
run = client.actor("bepolabs/wikipedia-pageviews").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": [
    "Web scraping"
  ]
}' |
apify call bepolabs/wikipedia-pageviews --silent --output-dataset

```

## MCP server setup

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

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/FwmU3kg6V3Bx6KXPP/builds/fkQAaO9Vbywy4MA3A/openapi.json
