# Wikipedia Article Daily Pageviews (`automation-lab/wikipedia-article-daily-pageviews`) Actor

Export official Wikimedia daily Wikipedia article pageviews by title, language project, access type and date range for repeatable audience trend analysis.

- **URL**: https://apify.com/automation-lab/wikipedia-article-daily-pageviews.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 1,000 item extracteds

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 Article Daily Pageviews

Export **Wikipedia pageviews** by article title and UTC day using Wikimedia's official public Pageviews API. Supply up to 20 article titles, select a Wikipedia language project, access type and inclusive date range, and get one structured row per reported day and article. This is useful for audience analysts, editors, researchers, and teams comparing article interest over time.

### Who is it for?

Editors checking audience response to editorial updates, researchers comparing historical attention to biographies, and analytics teams plotting per-article series can use these rows without parsing page HTML. Supply exact article titles; this is not a search-discovery product.

### Why use this Actor?

The output is immediately usable as a dated dataset: each record carries the count, article, project, access type and exact source API URL. Schedule the Actor on Apify for repeatable snapshots or run it once for a historical comparison. Unlike scraping the rendered article page, this Actor retrieves the official daily count directly; it does not estimate visits from HTML or search rankings.

### What data do I get?

| Field | Meaning |
| --- | --- |
| `article` | Supplied article title with spaces |
| `project` | Language edition, such as `en.wikipedia` |
| `date` | UTC day, YYYY-MM-DD |
| `views` | Wikimedia-reported user pageviews for that day |
| `access` | `all-access`, `desktop`, `mobile-app`, or `mobile-web` |
| `source` | Exact official Wikimedia API request URL |
| `retrievedAt` | UTC timestamp when this row was retrieved |

### Getting started

1. Enter one or more exact Wikipedia article titles (not search terms).
2. Choose the language project that hosts those titles, such as `en.wikipedia`.
3. Pick an inclusive date range ending at least two days before today, at most 366 days long.
4. Optionally select a device access channel or a maximum number of daily rows.
5. Run and download the default dataset as JSON, CSV, or Excel.

### Input example

```json
{"articles":["Albert Einstein","Marie Curie"],"project":"en.wikipedia","startDate":"2026-01-01","endDate":"2026-01-03","access":"all-access"}
```

The `articles` list accepts 1–20 article titles. `project` defaults to `en.wikipedia`. `maxItems` defaults to 5000 and stops processing once the output cap is reached. Duplicate titles are fetched once. Spaces in titles are normalized to underscores for the official API URL. Dates must be real UTC calendar days; date ranges longer than 366 days and recent dates are rejected rather than silently clipped.

### Output example

One observed row for the input above:

```json
{"article":"Albert Einstein","project":"en.wikipedia","date":"2026-01-01","views":15356,"access":"all-access","source":"https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/user/Albert_Einstein/daily/20260101/20260103","retrievedAt":"2026-09-27T20:04:28.160Z"}
```

### How much does it cost to export Wikipedia article daily pageviews?

This Actor charges one `start` event per run ($0.0001) plus one `item` event per emitted daily row. BRONZE is $0.0003 per row; FREE is $0.000345, SILVER $0.000234, and GOLD/PLATINUM/DIAMOND $0.00018. At BRONZE, 1, 5, and 14 rows cost an estimated $0.0004, $0.0016, and $0.0043 respectively, including the start event. A seven-day comparison of two articles generates up to 14 charged `item` events and one `start` event; an article with no API rows produces no `item` charges. Tiers depend on qualifying monthly Store spend, not on the row count in one run. Apify platform usage may also apply. Prices and payout estimates can be revised by refunds, fraud, disputes, taxes, corrections, and contractual clawbacks. Check the active pricing panel before scheduling large recurring runs.

### Integrations and recurring monitoring

Schedule a weekly run with a fixed historical window, or update the date range in your orchestration job. Export the default dataset to Google Sheets for charts, join daily rows to an internal reporting table using `(project, article, date, access)`, or trigger a webhook when a run finishes. This Actor provides snapshots, not built-in alerts, persistent state, or automatic comparison with prior runs.

### API usage

Start a run with the Apify API, replacing `YOUR_TOKEN` with your own Apify token:

```bash
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~wikipedia-article-daily-pageviews/run-sync-get-dataset-items?token=YOUR_TOKEN' -H 'Content-Type: application/json' -d '{"articles":["Albert Einstein"],"startDate":"2026-01-01","endDate":"2026-01-03"}'
```

JavaScript: `await client.actor('automation-lab/wikipedia-article-daily-pageviews').call({ articles: ['Albert Einstein'], startDate: '2026-01-01', endDate: '2026-01-03' })` with `ApifyClient`. Python: `client.actor('automation-lab/wikipedia-article-daily-pageviews').call(run_input={'articles':['Albert Einstein'],'startDate':'2026-01-01','endDate':'2026-01-03'})` with `apify-client`. Fetch the returned run's default dataset for the full time series.

### MCP use

In Claude Code, connect this Actor:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/wikipedia-article-daily-pageviews"
```

For Claude Desktop, Cursor, and VS Code, configure the Apify MCP server using your client's remote HTTP MCP settings (and authenticate with Apify):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/wikipedia-article-daily-pageviews"
    }
  }
}
```

Example prompts: “Export daily English Wikipedia views of Albert Einstein for January 1–7, 2026.” “Compare daily views for Albert Einstein and Marie Curie during the first week of January 2026.” Authentication and client support for remote MCP depend on your Apify MCP setup.

### Limits and troubleshooting

The Wikimedia API is public but may temporarily return 429 or 5xx; the Actor retries these failures twice with backoff and then fails clearly. Unknown article titles, non-Wikipedia projects, unavailable dates, and other permanent API errors fail rather than becoming zero-view rows. Article titles must exist in the selected language edition; this Actor does not search for a page or follow redirects. A row count lower than the calendar span can reflect missing upstream data. Run separate date windows for longer history. The default dataset does not include raw HTML or aggregate totals.

### Legality and responsible use

Wikimedia makes these aggregated statistics available through its public API. Review the Wikimedia API terms and respect source attribution and request limits. Avoid claims about individual readers: the public counts are aggregated and are not visitor profiles.

### Data handling and support

The Actor sends requested titles, project and dates to Wikimedia's public REST API. It does not use AI or another paid extraction provider. The default Apify dataset contains aggregate counts, requested article titles and retrieval times; Apify stores run input, logs and datasets according to your account's retention settings. Do not enter private data as an article title. Delete runs and datasets through Apify Console or API if you no longer need them. For problems, open an issue on this Actor's Apify Store page with the run ID and a non-sensitive input example.

### Data freshness

Wikimedia may update or backfill historical counts. Re-running the same date range can produce revised figures. Keep `retrievedAt` if you compare snapshots and exclude incomplete recent dates from automated trend charts.

### FAQ

**Can I use another language edition?** Yes: set `project` to a Wikipedia project such as `de.wikipedia`, and supply article titles in that edition.

**Does this count visits to other Wikimedia projects?** No. This Actor intentionally limits project names to Wikipedia language editions.

**Why did my run fail with a 404?** Check the article spelling, language edition, access channel, and available date range. A nonexistent page is not reported as a zero-view article.

**Can it send alerts?** No. Use an Apify schedule and your own downstream comparison/notification workflow.

### Related Actor

For article content and metadata rather than official daily audience counts, see [Wikipedia Scraper](https://apify.com/automation-lab/wikipedia-scraper). These are complementary datasets, not interchangeable measurements.

# Changelog

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

# Actor input Schema

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

One to twenty exact article titles, not search queries. Use titles in the selected language/project.

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

Language edition, for example en.wikipedia or de.wikipedia.

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

Inclusive UTC date (YYYY-MM-DD). Maximum range: 366 days.

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

Inclusive UTC date (YYYY-MM-DD); end at least two days before today.

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

All access or one Wikimedia device channel.

## `maxItems` (type: `integer`):

Cap output across all articles; processing stops when reached.

## Actor input object example

```json
{
  "articles": [
    "Albert Einstein",
    "Marie Curie"
  ],
  "project": "en.wikipedia",
  "startDate": "2026-01-01",
  "endDate": "2026-01-07",
  "access": "all-access",
  "maxItems": 20
}
```

# Actor output Schema

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

Download daily counts with article, project, date, access type, source URL and retrieval time.

# 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": [
        "Albert Einstein",
        "Marie Curie"
    ],
    "project": "en.wikipedia",
    "startDate": "2026-01-01",
    "endDate": "2026-01-07",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/wikipedia-article-daily-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": [
        "Albert Einstein",
        "Marie Curie",
    ],
    "project": "en.wikipedia",
    "startDate": "2026-01-01",
    "endDate": "2026-01-07",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/wikipedia-article-daily-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": [
    "Albert Einstein",
    "Marie Curie"
  ],
  "project": "en.wikipedia",
  "startDate": "2026-01-01",
  "endDate": "2026-01-07",
  "maxItems": 20
}' |
apify call automation-lab/wikipedia-article-daily-pageviews --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/wikipedia-article-daily-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/KmFnXcdYHf0xTqMjs/builds/ctMeXSQa89SsViCLO/openapi.json
