# Wikipedia Pageviews: daily views per article, any language (`steadydata/wikipedia-pageviews`) Actor

Daily or monthly page views of Wikipedia articles in any language, per article per day, with the change against the previous day, from the Wikimedia statistics API. Give titles or article URLs, choose the period, device and human or all traffic. Up to 500 articles a run. Pay per day.

- **URL**: https://apify.com/steadydata/wikipedia-pageviews.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** News, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.33 / 1,000 day listeds

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: daily views per article, any language

Daily or monthly page views of Wikipedia articles in any language, per article per day, with the change against the previous day, from the Wikimedia statistics API. Give titles or article URLs, choose the period, device and human or all traffic. Up to 500 articles a run. Pay per day.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- Straight from the Wikimedia Foundation's own statistics API, the source of the numbers on every Wikipedia page-views tool. Measured on the platform: 14 days each of four articles across three language editions, 56 rows, in 4.5 seconds for a seventh of a cent.
- One row per article per day, newest first, with the previous day's views and the percentage change already computed, so a spike is visible without a spreadsheet formula.
- Articles can be given as plain titles, as `de:Berlin` for another language, or as the article URL copied from the browser; mobile URLs and percent-encoded titles are understood.
- Human readers only by default (`agent: user`), so bots and crawlers do not inflate the numbers; desktop and mobile can be split; monthly granularity for years of history in a compact table.

### Who this is for

Put articles in `articles` (up to 500 per run), set `days` (default 30, up to 3,650), and optionally `project` for titles without a language, `granularity`, `access` and `agent`. Built for trend and attention research (which topics, companies, people or products are rising), PR and marketing measurement around a launch or a news event, SEO and content teams comparing interest across languages, and anyone who needs a time series of public attention without Google Trends.

### Who this is not for

Page views count article visits, not searches; a topic that people read about is not necessarily one they buy. The API has data from July 2015 and ends at the previous day; today's views come tomorrow. A title must match the article exactly as Wikipedia names it (redirects are separate pages with their own, usually small, counts); a title with no data in the period comes back as a free `NOT_FOUND` row. The Wikimedia API is rate-limited per client and asks for polite use; the actor identifies itself and stays far below the limit.

### Input fields

| Field | Type | Required or default | What it does |
|---|---|---|---|
| `articles` | list of text | required | One per row, up to 500: a title (Bitcoin), a title with language (de:Berlin) or an article URL (https://en.wikipedia.org/wiki/Bitcoin). |
| `project` | text | en.wikipedia | Used for titles without a language, for example en.wikipedia, de.wikipedia, nl.wikipedia. |
| `days` | number | 30 | How many days back from yesterday (the API has data up to the previous day). Up to 3650. |
| `granularity` | text (daily, monthly) | daily | daily or monthly. |
| `access` | text (all-access, desktop, mobile-web, mobile-app) | all-access | all-access, desktop, mobile-web or mobile-app. |
| `agent` | text (user, all-agents) | user | user for human readers only, all-agents to include crawlers and automated traffic. |

### Input example

```json
{
    "articles": [
        "Bitcoin",
        "Python (programming language)",
        "https://de.wikipedia.org/wiki/Berlin"
    ],
    "project": "en.wikipedia",
    "days": 30,
    "granularity": "daily",
    "access": "all-access",
    "agent": "user"
}
```

### Output example

| Field | Type | What it holds |
|---|---|---|
| `article` | text | The article title with spaces, as it reads on Wikipedia. |
| `project` | text | The wiki the views belong to, for example en.wikipedia or de.wikipedia. |
| `date` | text | The day (YYYY-MM-DD) or, with monthly granularity, the month (YYYY-MM). |
| `views` | number | How many times the article was viewed that day, as Wikimedia counts it. |
| `previousViews` | number | The views of the day before in the delivered series; empty on the oldest day. |
| `changePercent` | number | The change against the previous day in percent. |
| `granularity` | text | daily or monthly, as requested. |
| `access` | text | all-access, desktop, mobile-web or mobile-app, as requested. |
| `agent` | text | user (human readers) or all-agents (including crawlers), as requested. |
| `url` | text | The article on Wikipedia. |

Error codes: `INVALID_ARTICLE`, `NOT_FOUND`, `BLOCKED`.

One delivered row looks like this:

```json
{
  "article": "Python (programming language)",
  "project": "en.wikipedia",
  "date": "2026-09-24",
  "views": 6088,
  "previousViews": 5697,
  "changePercent": 6.86,
  "granularity": "daily",
  "access": "all-access",
  "agent": "user",
  "url": "https://en.wikipedia.org/wiki/Python_(programming_language)",
  "status": "ok"
}
```

### Related actors from steadydata

- [google-trends-compare](https://apify.com/steadydata/google-trends-compare): search interest for the same topics, from Google
- [google-news](https://apify.com/steadydata/google-news): the news that caused a spike
- [wayback-history](https://apify.com/steadydata/wayback-history): how a page changed over time

### Pricing

Pay per event: one `day-listed` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### FAQ

**Is personal data collected?**
No. The rows are aggregate view counts of public articles.

**How do I compare topics across languages?**
Give the same subject as `en:Bitcoin`, `de:Bitcoin`, `ja:ビットコイン`; each comes back as its own series with `project` on every row.

**Can I get years of history without thousands of rows?**
Yes: set `granularity` to `monthly` and `days` to 3650; a decade becomes 120 rows per article.

**What is the difference between user and all-agents?**
`user` counts human readers as Wikimedia classifies them; `all-agents` adds crawlers and automated traffic, which can be a large share for some articles. Use `user` for attention research.

**Why does a title come back as NOT\_FOUND?**
Because the API knows the exact page title only: `Python` is a different page from `Python (programming language)`. Copy the title or the URL from the article itself.

**What does a run cost when an article is unknown?**
Nothing. `NOT_FOUND`, `INVALID_ARTICLE` and `BLOCKED` rows are free; only delivered days are charged.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

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

# Actor input Schema

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

One per row, up to 500: a title (Bitcoin), a title with language (de:Berlin) or an article URL (https://en.wikipedia.org/wiki/Bitcoin).

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

Used for titles without a language, for example en.wikipedia, de.wikipedia, nl.wikipedia.

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

How many days back from yesterday (the API has data up to the previous day). Up to 3650.

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

daily or monthly.

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

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

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

user for human readers only, all-agents to include crawlers and automated traffic.

## Actor input object example

```json
{
  "articles": [
    "Bitcoin",
    "Python (programming language)",
    "https://de.wikipedia.org/wiki/Berlin"
  ],
  "project": "en.wikipedia",
  "days": 30,
  "granularity": "daily",
  "access": "all-access",
  "agent": "user"
}
```

# Actor output Schema

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

No description

# 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": [
        "Bitcoin",
        "Python (programming language)",
        "https://de.wikipedia.org/wiki/Berlin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/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": [
        "Bitcoin",
        "Python (programming language)",
        "https://de.wikipedia.org/wiki/Berlin",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/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": [
    "Bitcoin",
    "Python (programming language)",
    "https://de.wikipedia.org/wiki/Berlin"
  ]
}' |
apify call steadydata/wikipedia-pageviews --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadydata/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/7vAlwFnyAtaePrA6V/builds/0shZDRXQJrmDRffPE/openapi.json
