# Wikipedia Pageviews & Trends (`maximedupre/wikipedia-pageviews`) Actor

Get daily or monthly view counts for Wikipedia articles you name, or the top articles of each day or month. Works with any language edition and history back to July 2015. Each article row also has its views in other languages.

- **URL**: https://apify.com/maximedupre/wikipedia-pageviews.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** SEO tools, Marketing, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.25 / 1,000 article views

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

### 📈 See how many people read any Wikipedia article

This Actor is for researchers, marketers, journalists, and data teams who want Wikipedia pageviews analysis without calling the Wikipedia pageviews API by hand. Name articles or topics and get their daily or monthly view counts. Or get the most-viewed articles of each day or month, with Wikipedia's own rank. Results come as clean rows you can download or send to other tools.

- Track the daily views of a person, brand, or product page to see when public interest rises.
- Compare the same article across many Wikipedia language editions in one run.
- Find the top 1000 most-read articles of any day or month for news and trend research.
- Measure what a launch, film, or news story did to an article's traffic.
- Build a Wikipedia page views dataset back to July 2015 for research or modeling.

#### 📊 What Wikipedia stats you get

- **Article views:** daily or monthly view counts for each article you name or find with a search term.
- **Views in other languages:** the same article's view counts in every other language edition that links to it.
- **Short description and Wikidata ID:** for each named article, when Wikipedia has them.
- **Top articles:** the most-viewed articles of each day or month, with rank, views, and a link.
- **Filters:** human readers, all traffic, or only automated traffic, and all devices, desktop, mobile web, or the mobile app.

#### 🚀 How to get Wikipedia page views per day

1. Pick a **Result type**: Article views or Top articles.
2. Add one or more language codes, such as `en` or `de`.
3. For Article views, add article titles, article links, or search terms. For Top articles, set how many articles you want per day or month.
4. Choose a date range and whether to count by day or by month.
5. Start the run and open the dataset when it finishes.

#### ⚙️ Input

**Input fields**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Required. `articleViews` returns one row per article you name. `topArticles` returns the most-viewed articles of each day or month. The form prefills Article views. |
| `languages` | array | Language codes of the Wikipedia editions to read, such as `en`, `de`, or `ja`. Default is `["en"]`. Unknown codes are skipped with a warning. |
| `granularity` | string | `daily` or `monthly`. Default is `daily`. Monthly counts cover every month that the date range touches. |
| `startDate` | string | First day, in YYYY-MM-DD format. Data starts on 2015-07-01. If empty, the range starts 30 days before the end date. The form prefills a sample date. |
| `endDate` | string | Last day, in YYYY-MM-DD format. If empty, the range ends on the latest day Wikipedia has published. The form prefills a sample date. |
| `maxItems` | integer | Stop after this many result rows. Empty or `0` means no limit. The form prefills 20. |
| `articles` | array | Article views only. Article titles, such as `Albert Einstein`, or full article links. A title is read from each chosen edition. A link is read from its own edition. Redirect titles lead to the main article. |
| `searchTerms` | array | Article views only. Topics such as `electric cars`. Each term is matched to the best article in each chosen edition, and the row keeps your term in `searchTerm`. |
| `includeRedirects` | boolean | Article views only. Adds views from the article's other titles (redirects) to its counts. Default is `false`. |
| `trafficType` | string | Article views only. `user` (human readers), `all-agents` (all traffic), or `automated` (crawlers and automated traffic). Default is `user`. |
| `topCount` | integer | Top articles only. How many top articles to get for each day or month, from 1 to 1000. Default is 100. The form prefills 10. |
| `device` | string | `all-access`, `desktop`, `mobile-web`, or `mobile-app`. Default is `all-access`. Applies to both result types. |

Fields from the other result type's section are ignored. The same article in the same edition is returned only once per run.

**Example input**

```json
{
  "languages": [
    "en"
  ],
  "granularity": "daily",
  "startDate": "2026-10-01",
  "endDate": "2026-10-07",
  "maxItems": 20,
  "resultType": "articleViews",
  "articles": [
    "Albert Einstein"
  ],
  "includeRedirects": false,
  "trafficType": "user",
  "topCount": 10,
  "device": "all-access"
}
```

#### 🧾 Output

**Output fields**

**Article views row**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Always `articleViews`. |
| `language` | string | Language code of the edition the views come from. |
| `article` | string | Title of the Wikipedia article. |
| `articleUrl` | string | Link to the article. |
| `searchTerm` | string | Your search term that led to this article. Only present for search term rows. |
| `views` | array | One entry for each day or month in the range. |
| `views.date` | string | The day, in YYYY-MM-DD. For monthly counts, the first day of the month. |
| `views.views` | integer | Views on that day or in that month. |
| `description` | string | The article's short description, when Wikipedia has one. |
| `wikidataId` | string | The Wikidata ID of the article topic, when there is one. |
| `otherLanguages` | array | The same article in its other language editions, for the same range and filters. |
| `otherLanguages.language` | string | Language code of the other edition. |
| `otherLanguages.article` | string | Title of the article in that edition. |
| `otherLanguages.articleUrl` | string | Link to the article in that edition. |
| `otherLanguages.views` | array | View counts for each day or month, with `date` and `views`. |

Counts are kept as Wikipedia publishes them. A day can show `0` views. A day that Wikipedia did not publish is left out, and the Actor does not add a zero for it.

**Example article views row**

This row is shortened. The real row has 235 entries in `otherLanguages`. Only the first two are shown, and `"..."` marks the rest.

```json
{
  "resultType": "articleViews",
  "language": "en",
  "article": "Albert Einstein",
  "articleUrl": "https://en.wikipedia.org/wiki/Albert_Einstein",
  "views": [
    {
      "date": "2026-10-01",
      "views": 9698
    },
    {
      "date": "2026-10-02",
      "views": 10103
    },
    {
      "date": "2026-10-03",
      "views": 8468
    },
    {
      "date": "2026-10-04",
      "views": 11126
    },
    {
      "date": "2026-10-05",
      "views": 9985
    },
    {
      "date": "2026-10-06",
      "views": 9988
    },
    {
      "date": "2026-10-07",
      "views": 9981
    }
  ],
  "description": "German-born theoretical physicist (1879–1955)",
  "wikidataId": "Q937",
  "otherLanguages": [
    {
      "language": "ab",
      "article": "Еинштеин, Алберт",
      "articleUrl": "https://ab.wikipedia.org/wiki/%D0%95%D0%B8%D0%BD%D1%88%D1%82%D0%B5%D0%B8%D0%BD,_%D0%90%D0%BB%D0%B1%D0%B5%D1%80%D1%82",
      "views": [
        {
          "date": "2026-10-01",
          "views": 0
        },
        {
          "date": "2026-10-02",
          "views": 2
        },
        {
          "date": "2026-10-03",
          "views": 1
        },
        {
          "date": "2026-10-04",
          "views": 1
        },
        {
          "date": "2026-10-05",
          "views": 2
        },
        {
          "date": "2026-10-06",
          "views": 0
        },
        {
          "date": "2026-10-07",
          "views": 0
        }
      ]
    },
    {
      "language": "af",
      "article": "Albert Einstein",
      "articleUrl": "https://af.wikipedia.org/wiki/Albert_Einstein",
      "views": [
        {
          "date": "2026-10-01",
          "views": 9
        },
        {
          "date": "2026-10-02",
          "views": 15
        },
        {
          "date": "2026-10-03",
          "views": 14
        },
        {
          "date": "2026-10-04",
          "views": 11
        },
        {
          "date": "2026-10-05",
          "views": 6
        },
        {
          "date": "2026-10-06",
          "views": 9
        },
        {
          "date": "2026-10-07",
          "views": 7
        }
      ]
    },
    "..."
  ]
}
```

**Top article row**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Always `topArticles`. |
| `language` | string | Language code of the edition. |
| `date` | string | The day of the top list, in YYYY-MM-DD. For a monthly list, the first day of the month. |
| `rank` | integer | Wikipedia's own rank number in the top list. |
| `article` | string | Title of the Wikipedia article. |
| `articleUrl` | string | Link to the article. |
| `views` | integer | Views on that day or in that month. |

The main page, search, and other non-article pages are left out of top lists. Wikipedia's own rank numbers are kept, so you may see gaps such as 2, 3, 5.

**Example top article row**

```json
{
  "resultType": "topArticles",
  "language": "en",
  "date": "2026-10-01",
  "rank": 2,
  "article": "Christa Pike",
  "articleUrl": "https://en.wikipedia.org/wiki/Christa_Pike",
  "views": 4309025
}
```

#### 💳 Pricing

This Actor uses pay per event pricing. You pay only for rows saved to your dataset.

| Event | Price | When you pay |
|---|---|---|
| Article views | $0.00225 ($2.25 per 1,000) | One named Wikipedia article saved with its daily or monthly view counts for your date range. |
| Top article | $0.00045 ($0.45 per 1,000) | One most-viewed article of a day or month saved with its rank and view count. |

Articles that are not found, unknown language codes, and days with no data do not create a row, so they are not charged. Use `maxItems` to cap how many rows a run can save.

#### 🔌 Integrations

You can connect this Actor to Make, Zapier, Google Sheets, Slack, webhooks, and other tools through Apify integrations. You can also run it from the Apify API, and schedule runs to track views over time.

https://www.youtube.com/watch?v=bNACk1_S_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Is this the official Wikimedia pageviews API?

No. This Actor is not made by Wikimedia. It returns the public view counts that Wikipedia publishes, as ready rows, so you do not need to write API code in Python or another language.

##### How far back does the view history go?

View counts start on 2015-07-01. You can ask for any range from that day to the latest day Wikipedia has published, which is often one or two days ago.

##### Can I get Wikipedia page views by country?

No. This Actor counts views by language edition, device, and traffic type. It does not split views by country.

##### Does it show unique visitors per month?

No. The counts are pageviews, not unique visitors. One person who opens an article twice counts as two views.

##### What happens if a title is a redirect?

The Actor follows the redirect to the main article, so `Einstein` returns the row for `Albert Einstein`. Turn on `includeRedirects` to also add the views that arrive through those other titles.

##### Why are some top list ranks missing?

Non-article pages, such as the main page and search, are removed from top lists. The Actor keeps Wikipedia's own rank numbers, so removed pages leave gaps.

##### Does the traffic type filter work for top articles?

No. The `trafficType` field applies to Article views only. Top article lists use Wikipedia's published top lists.

##### Can I check several languages in one run?

Yes. Add several codes to `languages`. Each article row also includes `otherLanguages` with its views in every linked edition.

### 📝 Changelog

**v0.0** (03-11-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~wikipedia-pageviews/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Naver DataLab Search Trends](https://apify.com/maximedupre/naver-search-trends): compare Wikipedia interest with search trends in Korea.
- [Pinterest Trends Scraper: Rising Search Terms](https://apify.com/maximedupre/pinterest-trends-scraper): find rising topics on Pinterest next to rising Wikipedia articles.
- [Google Autocomplete Suggestions](https://apify.com/maximedupre/google-autocomplete-suggestions): see what people type about a topic you track on Wikipedia.
- [Wikipedia Pageview Trends: Google Trends Alternative](https://apify.com/somepineapple/wikipedia-pageview-trends): another way to use Wikipedia views as a trend signal.
- [Wikipedia Pageviews API + Wikidata: Daily Views per Page](https://apify.com/lepidata/wiki-pageviews): daily views per page with extra Wikidata details.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `languages` (type: `array`):

Language codes of the Wikipedia editions to read, such as en for English, de for German, or ja for Japanese. Add one or more codes. The run returns results for each edition.

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

Get view counts for each day or for each month. Monthly counts use every month that the date range touches.

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

First day of the range, in YYYY-MM-DD format. Wikipedia view counts start on 2015-07-01. If you leave it empty, the range starts 30 days before the end date.

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

Last day of the range, in YYYY-MM-DD format. If you leave it empty, the range ends on the latest day that Wikipedia has published.

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

Stop after this many result rows. Leave it empty or set 0 to get all available results.

## `resultType` (type: `string`):

Article views returns one row for each article you name, with its daily or monthly view counts. Top articles returns the most-viewed articles of each day or month, with rank and views.

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

Article titles, such as Albert Einstein, or full Wikipedia article links, such as https://en.wikipedia.org/wiki/Albert_Einstein. A title is read from each language edition you chose. A link is read from its own edition.

## `searchTerms` (type: `array`):

Topics or words to look up, such as electric cars. Each term is matched to the best Wikipedia article, and the result shows which article the views belong to.

## `includeRedirects` (type: `boolean`):

Also count views that arrive through the article's other titles (redirects), and add them to the article's view counts.

## `trafficType` (type: `string`):

Count views from human readers only, from all traffic, or only from crawlers and automated traffic.

## `topCount` (type: `integer`):

How many top articles to get for each day or month, from 1 to 1000. The main page, search and other non-article pages are left out, and Wikipedia's own rank numbers are kept.

## `device` (type: `string`):

Count views from all devices, or only from desktop, mobile web, or the mobile app. Applies to Article views and Top articles.

## Actor input object example

```json
{
  "languages": [
    "en"
  ],
  "granularity": "daily",
  "startDate": "2026-10-01",
  "endDate": "2026-10-07",
  "maxItems": 20,
  "resultType": "articleViews",
  "articles": [
    "Albert Einstein"
  ],
  "includeRedirects": false,
  "trafficType": "user",
  "topCount": 10,
  "device": "all-access"
}
```

# Actor output Schema

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

The view counts from this run.

# 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 = {
    "languages": [
        "en"
    ],
    "startDate": "2026-10-01",
    "endDate": "2026-10-07",
    "maxItems": 20,
    "resultType": "articleViews",
    "articles": [
        "Albert Einstein"
    ],
    "topCount": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/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 = {
    "languages": ["en"],
    "startDate": "2026-10-01",
    "endDate": "2026-10-07",
    "maxItems": 20,
    "resultType": "articleViews",
    "articles": ["Albert Einstein"],
    "topCount": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/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 '{
  "languages": [
    "en"
  ],
  "startDate": "2026-10-01",
  "endDate": "2026-10-07",
  "maxItems": 20,
  "resultType": "articleViews",
  "articles": [
    "Albert Einstein"
  ],
  "topCount": 10
}' |
apify call maximedupre/wikipedia-pageviews --silent --output-dataset

```

## MCP server setup

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