# Wikipedia Pageviews Scraper - By Language (`dataio/wikipedia-pageviews-by-language`) Actor

Scrape Wikipedia pageviews for any brand, product or person, language by language, with the article title resolved automatically in each language, the trend computed and spikes dated. Measure public attention across countries and track it over time. No API key.

- **URL**: https://apify.com/dataio/wikipedia-pageviews-by-language.md
- **Developed by:** [Tom Awake](https://apify.com/dataio) (community)
- **Categories:** MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 language rows

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

### What does Wikipedia Pageviews Scraper do?

How many people looked something up — and **in which language**.

Wikipedia pageviews are the broadest open measure of public attention
there is: every article, every day, in every language edition. Wikimedia
publishes them one article and one language at a time, as raw daily
series.

No API key. No account.

***

### Where attention actually is

Three car makers, 10 languages, 60 days:

**BYD Auto** — 44 language versions

| Language | Views | Share | Trend | Peak |
|---|---|---|---|---|
| English | 185,323 | 47.6% | −1.1% | ×1.5 |
| **German** | 88,786 | **22.8%** | −40.4% | ×4.2 |
| Japanese | 26,793 | 6.9% | −40.7% | ×2.8 |
| French | 24,781 | 6.4% | **+34.6%** | ×4.9 |

English accounts for less than half. German readers are nearly a quarter
of all attention on BYD — and that German interest spiked to 4.2× its
normal level, then fell back 40%. Something happened in Germany. The
English-only view shows none of it.

**Rivian** — Russian readership **+116.8%** over the same window.
**Tesla** — 104 language versions, and a 108× spread between the first
language and the tenth.

***

### The four things this does that the source does not

**1. It finds the article in each language.**

You supply "Tesla, Inc."; the Japanese article is titled テスラ, the Arabic
one تسلا موتورز. Titles are resolved automatically through Wikipedia's own
language links. Without this, any international comparison requires
knowing the exact title in every language you care about.

**2. One row per language, with its share.**

`shareOfTotalPct` is where a brand is known and where it is not. It is the
column that turns a list of numbers into a market map.

**3. Trend and spike, computed.**

The source returns a series and no direction. `trendPct` compares blocks
of **seven days** — Wikipedia readership drops at weekends, so splitting a
period unevenly manufactures a trend that does not exist.

`peakVsAverage` dates events: a day at 4.9× normal is something that
happened; a day at 1.2× is a Tuesday.

**4. The number of language versions.**

104 for Tesla, 44 for BYD, 25 for Rivian. On its own, that is a measure of
global standing, and it comes free with the title resolution.

***

### Field coverage

Measured on 30 rows across three subjects and ten languages: **100% on
every field** — views, share, daily average, peak, peak date, peak ratio,
trend, language versions and article URL.

That is unusual, and it is because the source is a clean numeric series
rather than a scraped document. What varies is not whether a field is
filled, but whether a subject has an article in a given language at all —
and when it does not, no row is produced for it.

***

### What it is for

- **Brand attention by market.** Which countries are actually paying
  attention, ahead of a launch or after a campaign.
- **Competitive tracking.** Your brand against two rivals, weekly, with
  the language split.
- **Event detection.** A spike with a date, per language. Recalls,
  launches, controversies and earnings all show up here before they show
  up in structured data.
- **Market entry research.** A brand with 104 language versions and one
  with 25 are at different stages, whatever their revenue says.
- **Alternative data.** Attention on a company, a product or a person as
  a daily series, free and going back years.

Three dataset views ship with the Actor: **Attention by language**,
**Spikes** and **Measurement detail**.

***

### Limits

Stated plainly, because they affect what you can conclude.

- **Attention is not sentiment.** A spike says people looked something up.
  It does not say whether they liked what they found, and bad news drives
  more lookups than good news.
- **Language is not country.** Spanish readers are not only in Spain;
  English is read everywhere. Treat a language as an audience, not a
  market.
- **Wikipedia readership is declining overall**, as answers move into
  search results and assistants. Compare subjects against each other, not
  against their own figures from five years ago.
- **Title resolution can land on the wrong article.** "Stripe" is a
  payments company, a pattern and a film. Check `articleTitle` on the
  rows; supply a more specific name if it is wrong.
- **Bots are partly filtered, not entirely.** Wikimedia excludes known
  crawlers, but automated traffic still gets through, especially on small
  language editions where a few hundred views is the whole signal.
- **Data lags by about two days**, so the period always ends slightly
  before today.
- **A missing row means no article**, not zero interest.

***

### How much does it cost?

You pay per language row returned: **$0.003 each**, that is $3.00 per 1,000. There is no start fee, and subscription plans pay less per language row.

The example input below asks for up to 500 language rows, so it costs **$1.50 at most**.

If a run reaches the spending limit you set, the output stops at that limit and never goes past it. You are never charged for rows that were not delivered.

### Use Wikipedia Pageviews Scraper as an API

Call it from your own code with the Apify client, here in Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("DataIO/wikipedia-pageviews-by-language").call(run_input={
    'entities': ['Tesla, Inc.', 'Rivian', 'BYD Auto'],
    'languages': ['en', 'de', 'fr', 'ja', 'es'],
    'days': 60,
    'maxItems': 500,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

It also works from JavaScript, Make, Zapier, n8n, and from AI agents through the Apify MCP server.

### Other actors you might like

- [Bluesky Followers Scraper](https://apify.com/DataIO/bluesky-followers-exporter): Export Audiences
- [OpenAlex Scraper](https://apify.com/DataIO/openalex-authors-affiliations): Research Authors & Funders
- [Google Trends Scraper & API](https://apify.com/DataIO/google-trends-scraper): 100 Keywords

### FAQ

#### Is it legal to use this data?

The actor reads public data from its official source, without logging in and without bypassing any access control. What you do with the data, for example contacting people listed in it, is your responsibility under the laws that apply to you, such as GDPR in Europe.

#### Can I run it on a schedule?

Yes. Create a schedule in Apify Console, daily or weekly for example, and each run delivers a fresh dataset, which you can send by email, webhook or integration.

#### Can AI agents use it?

Yes. It is available through the Apify MCP server, and every input field is described in its input schema, so an agent can call it directly.

### Source

The [Wikimedia REST API](https://wikimedia.org/api/rest_v1/) for
pageviews, and the Wikipedia action API for title resolution and language
links. Public, no authentication, licensed CC0. This Actor is not
affiliated with the Wikimedia Foundation.

# Actor input Schema

## `entities` (type: `array`):

Brands, companies, products or people — written as you would search for them. Put competitors together; the comparison is the point.

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

Wikipedia language codes: en, de, fr, ja, zh, es, pt, ru, ko, it, ar, hi. Each is a separate audience — measured on BYD Auto, German readers accounted for 22.8% of all attention.

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

14 to 730. A trend needs at least four full weeks to mean anything; 60 is a good default.

## `resolveTitles` (type: `boolean`):

On by default. Tesla's Japanese article is titled テスラ; without this you would have to know the exact title in every language, which makes international comparison impractical.

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

Mobile versus desktop readership differs sharply by country, which is itself a finding.

## `minViews` (type: `integer`):

Drops languages with negligible readership for the subject.

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

One row per subject per language.

## Actor input object example

```json
{
  "entities": [
    "Tesla, Inc.",
    "Rivian",
    "BYD Auto"
  ],
  "languages": [
    "en",
    "de",
    "fr",
    "ja",
    "es"
  ],
  "days": 60,
  "resolveTitles": true,
  "access": "all-access",
  "maxItems": 1000
}
```

# Actor output Schema

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

Every row produced by the run, in JSON.

# 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 = {
    "entities": [
        "Tesla, Inc.",
        "Rivian",
        "BYD Auto"
    ],
    "languages": [
        "en",
        "de",
        "fr",
        "ja",
        "es"
    ],
    "days": 60,
    "maxItems": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataio/wikipedia-pageviews-by-language").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 = {
    "entities": [
        "Tesla, Inc.",
        "Rivian",
        "BYD Auto",
    ],
    "languages": [
        "en",
        "de",
        "fr",
        "ja",
        "es",
    ],
    "days": 60,
    "maxItems": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("dataio/wikipedia-pageviews-by-language").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 '{
  "entities": [
    "Tesla, Inc.",
    "Rivian",
    "BYD Auto"
  ],
  "languages": [
    "en",
    "de",
    "fr",
    "ja",
    "es"
  ],
  "days": 60,
  "maxItems": 1000
}' |
apify call dataio/wikipedia-pageviews-by-language --silent --output-dataset

```

## MCP server setup

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

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/Ybh51Rb4fdveIVmu7/builds/fFBwLOdAztRUHi6HK/openapi.json
