# Wikimedia Commons Page Views Scraper (`parseforge/wikimedia-commons-pageviews-scraper`) Actor

Scrapes Wikimedia Commons pageview statistics from the official API. Returns top files with title, views, and rank for a given date and access method.

- **URL**: https://apify.com/parseforge/wikimedia-commons-pageviews-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** News, Marketing, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.62 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Wikimedia Commons Page Views Scraper

**Scrape Wikimedia Commons page views for any date, access type, and up to a million files.** Get each file's title, view count, and rank in one flat row. No API key or login. Export to CSV, JSON, Excel, or XML.

Wikimedia Commons pageview data shows which media files people look at, but the official API returns raw JSON and needs manual date handling. This Actor calls the Wikimedia Pageviews API for you, filters by access method, and returns each file's views and rank in a fixed schema. Use it to track media popularity, monitor upload performance, or build dashboards without writing code.

| Who uses it | What they scrape Wikimedia Commons for |
|---|---|
| Media researchers | Which Commons files are trending on a given day |
| GLAM institutions | How many views their uploaded collections receive |
| Content marketers | Which Commons images drive the most traffic to their articles |
| Data analysts | Build time series of Commons file popularity |

### What it does

This Actor collects Wikimedia Commons pageview statistics for a given date and access method, and returns each file as a flat row with its title, view count, and rank.

- 📅 **Date targeting:** pick any past date in YYYY/MM/DD format, from yesterday back to 2015.
- 📊 **Access filtering:** choose all-access, desktop, or mobile-app to see where views come from.
- 🔢 **Rank and views:** every row includes the file's rank and exact view count for that day.
- 📁 **Flat export:** results are one row per file, ready for CSV, JSON, Excel, or XML.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Wikimedia Commons data

**📈 Track media trends.**

A media researcher runs the Actor daily for the previous day and charts which Commons files spike in views, spotting viral images early.

**🏛️ Measure GLAM impact.**

A museum uploads its collection to Commons and runs the Actor monthly to report how many views its files received, justifying continued digitization.

**📰 Support editorial decisions.**

A newsroom checks Commons pageviews for candidate images before publishing, choosing the file that already attracts attention.

**📊 Build a popularity dashboard.**

A data analyst schedules the Actor for the last 30 days and aggregates the results into a dashboard of top Commons files by access type.

### Why choose this scraper

| | What you get |
|---|---|
| **No API key** | The Wikimedia Pageviews API is public and needs no authentication. |
| **One row per file** | Each result is a flat record with title, views, and rank. |
| **Any date** | Go back to 2015 or pull yesterday's stats. |
| **Access split** | Compare all-access, desktop, and mobile-app views. |

### What a Wikimedia Commons record looks like

Every record returns as one flat JSON row. Here is a real one from a run:

```json
{
 "project": "commons.wikimedia",
 "access": "all-access",
 "year": "2026",
 "month": "08",
 "day": "23",
 "article": "Main_Page",
 "views": 176034,
 "rank": 1,
 "scrapedAt": "2026-08-24T21:36:29.573Z"
}
```

Every value above comes from a real run. A field a record does not have comes back as `null`.

### Configure the run

Set the date, access method, and maximum number of files. The Actor calls the Wikimedia Pageviews API and returns only the top files for that day, already filtered and ranked. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "date": "2026/08/23",
 "access": "all-access",
 "maxItems": 10
}
```

A larger pull:

```json
{
 "date": "2026/08/23",
 "access": "all-access",
 "maxItems": 200
}
```

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Wikimedia Commons Page Views Scraper](https://apify.com/parseforge/wikimedia-commons-pageviews-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Wikimedia Commons through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/wikimedia-commons-pageviews-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check the date format. It must be YYYY/MM/DD, for example 2026/08/23. Also ensure the date is not today or in the future, and that maxItems is at least 1.

**Why do I only get 10 items?**

Free Apify accounts are limited to 10 items as a preview. Upgrade to a paid plan to increase maxItems up to 1,000,000.

**The date I entered returns an error.**

The Wikimedia Pageviews API only has data from 2015 onwards. Dates before that, or today's date, will fail. Use a past date between 2015 and yesterday.

**Can I get more than 1000 files?**

The Wikimedia API returns at most the top 1000 files per day. Setting maxItems higher will not return more rows, but you can run the Actor for multiple dates.

### FAQ

| Question | Answer |
|---|---|
| What is the Wikimedia Commons Page Views Scraper? | It is an Apify Actor that calls the official Wikimedia Pageviews API for commons.wikimedia.org and returns the top viewed files for a given date and access method. |
| Do I need a Wikimedia API key? | No. The Wikimedia Pageviews API is public and does not require authentication or an API key. |
| What dates can I scrape? | Any date from 2015 to yesterday. The API does not provide data for today or future dates. |
| What does 'access method' mean? | It is the platform used to view the file: all-access (combined), desktop, or mobile-app. Choose one per run. |
| How many files can I get? | Free Apify users are limited to 10 items as a preview. Paid users can set maxItems up to 1,000,000, but the API typically returns the top 1000 files per day. |
| What fields are returned? | Each row includes the project, access method, year, month, day, article (file title), views, and rank. |
| Can I get pageviews for a specific file? | This Actor returns the top files for a date, not a single file's history. To track one file over time, run the Actor for multiple dates and filter the results. |
| What export formats are supported? | You can export the dataset as CSV, JSON, Excel, or XML from the Apify platform. |
| Is this the same as the Pageviews Analysis tool? | It uses the same underlying Wikimedia API, but this Actor gives you structured data you can download and integrate, instead of a web interface. |
| Can I schedule this Actor? | Yes. Use Apify schedules to run it daily, weekly, or monthly and build a time series of Commons pageviews. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Wikimedia Foundation, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

### 💰 How much does it cost to scrape Wikimedia Commons Page Views?

This Actor uses **pay-per-result** pricing: **$0.004 per result** collected. You are billed only for the results you receive, so a run that returns nothing costs nothing.

# Actor input Schema

## `date` (type: `string`):

Target date for pageview statistics in YYYY/MM/DD format, e.g. 2026/08/23.

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

Access type for pageview metrics. Options are all-access, desktop, or mobile-app.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "date": "2026/08/23",
  "access": "all-access",
  "maxItems": 10
}
```

# Actor output Schema

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

Complete dataset of all scraped records.

# 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 = {
    "date": "2026/08/23",
    "access": "all-access",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/wikimedia-commons-pageviews-scraper").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 = {
    "date": "2026/08/23",
    "access": "all-access",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/wikimedia-commons-pageviews-scraper").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 '{
  "date": "2026/08/23",
  "access": "all-access",
  "maxItems": 10
}' |
apify call parseforge/wikimedia-commons-pageviews-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/TnB1sHNmH0NaW02my/builds/2xnAZ7txHKV6Aag6b/openapi.json
