# Wikipedia Scraper: Articles & Pageview Trends (`glitchbound/wikipedia-scraper`) Actor

Pull Wikipedia articles with summary, full plain text, images and coordinates, plus daily pageview analytics per article: total, average, peak day and trend direction. Any language edition. Official Wikimedia APIs, no key.

- **URL**: https://apify.com/glitchbound/wikipedia-scraper.md
- **Developed by:** [Daniel Meshulam](https://apify.com/glitchbound) (community)
- **Categories:** AI, SEO tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.75 / 1,000 articles

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/platform/actors/running/actors-in-store#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

## Wikipedia Scraper: Articles & Pageview Trends

Wikipedia articles **plus the daily traffic data behind them**.

### Why pageviews are the point

Article text is freely downloadable in bulk, that part isn't hard. **Per-article daily traffic is the valuable half**: how many people looked up a company, a drug, a candidate, a film or a product, day by day, going back to 2015.

That's a free demand signal, and it's what this Actor is really for.

| Field | Example |
|---|---|
| `totalViews` | `184,203` |
| `averageDailyViews` | `6,140` |
| `peakViews`, `peakDate` | `31,502`, `2026-07-14` |
| **`trendPercent`** | `+42.8`, second half of the window vs the first |

Set `includeDailyPageviews: true` to also get one row per day for charting.

### Article content

| Field | Example |
|---|---|
| `title`, `displayTitle`, `description` | `Python (programming language)`, `General-purpose programming language` |
| `extract` | the lead summary |
| `fullText` | complete article as plain text, up to 40,000 chars (`includeFullText`) |
| `image`, `thumbnail` | |
| `latitude`, `longitude` | for places |
| `pageId`, `url`, `lastModified`, `isDisambiguation` | |

### Example input

```json
{
  "titles": ["Tesla, Inc.", "Rivian"],
  "includePageviews": true,
  "pageviewDays": 90,
  "includeDailyPageviews": true
}
```

Don't know the exact title? Use `searchQueries` and the Actor resolves matches for you.

### Any language

`language: "de"` reads German Wikipedia, with German pageviews. Works for `he`, `fr`, `es`, `ja`, `ru` and every other edition, and comparing traffic for the same topic across languages is a genuinely useful geographic signal.

### Who this is for

- **Market & trend research**: public attention on a brand, product or person over time
- **Finance**: attention spikes on a company, dated to the day
- **SEO & content**: what people actually look up, and whether it's growing
- **AI / dataset builders**: clean article text with no HTML parsing
- **Journalists**: when did interest in this topic spike, and by how much

### Article data and pageview analytics in one row

Two official Wikimedia APIs, no key on either:

| You want | Source | Input |
|---|---|---|
| An article by exact title | the Wikipedia REST summary API | `titles` |
| Articles matching a keyword | the Wikipedia search API | `searchQueries` |
| How many people read it | `wikimedia.org/api/rest_v1` pageviews | `includePageviews` |

**Per article**: title, summary, full plain text when `includeFullText` is on,
description, main image, coordinates for anything with a location, the canonical
URL, and the page ID.

**Pageview analytics** is the half most tools skip. With `includePageviews` you
get total views over your window, the daily average, the peak day and its count,
and a trend direction, so an article is a time series rather than a snapshot.
`includeDailyPageviews` returns the day-by-day series itself.

**Any language edition** via `language`: `en`, `he`, `de`, `fr`, `es`, `it`,
`ru`, `ja`, `zh`, `ar`, `pt`, `nl`, `pl`, and the rest. Pageviews are counted per
edition, so the same subject in two languages is two genuinely different
audiences and comes back as two rows.

### Notes

- Pageview data starts in 2015 and lags by about a day, so the window always ends yesterday.
- Pageviews are keyed to the **exact** article title. The Actor resolves your input to Wikipedia's canonical title first, so redirects and casing are handled.
- `includeDailyPageviews` multiplies your row count by the window length, 90 days × 10 articles is 900 extra rows. It's off by default for that reason.
- `includeFullText` costs one extra request per article.
- Set a **max charge per run** in the run options for a hard spend ceiling. The Actor honors it and stops cleanly.

### Pricing

Pay per result. One row = one article (or one day of pageviews). Articles that don't exist come back as `error` rows and are **not** charged.

# Actor input Schema

## `titles` (type: `array`):

Exact Wikipedia article titles, one per line, e.g. "Python (programming language)". You can paste the URL instead of the identifier, e.g. https://en.wikipedia.org/wiki/Alan\_Turing works.

## `searchQueries` (type: `array`):

Find articles by keyword when you don't know the exact title. Matches are resolved and then fetched.

## `language` (type: `string`):

Wikipedia language edition: en, de, fr, es, he, ru, ja and so on.

## `includePageviews` (type: `boolean`):

Add daily traffic analytics: total, average, peak day and trend direction. This is the data you can't get anywhere else for free.

## `pageviewDays` (type: `integer`):

How many days of traffic to analyse, up to two years.

## `includeDailyPageviews` (type: `boolean`):

Also emit one row per day per article, for charting. Off by default because it multiplies your row count by the window length.

## `includeFullText` (type: `boolean`):

Add the complete article as plain text, up to 40,000 characters. Costs one extra request per article.

## `maxResultsPerQuery` (type: `integer`):

How many articles each search query resolves to.

## `proxyConfiguration` (type: `object`):

Proxy settings.

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

A hard ceiling on rows for the entire run, across every target. The per-target limits above cap each one separately, so fifty targets at twenty each is still a thousand rows; this caps the total. The run stops cleanly when it is reached and nothing beyond that point is fetched or charged. Leave empty for no ceiling.

## Actor input object example

```json
{
  "titles": [
    "Python (programming language)"
  ],
  "language": "en",
  "includePageviews": true,
  "pageviewDays": 30,
  "includeDailyPageviews": false,
  "includeFullText": false,
  "maxResultsPerQuery": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Wikipedia articles with summary, full text and daily pageview analytics.

# 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 = {
    "titles": [
        "Python (programming language)"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("glitchbound/wikipedia-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 = { "titles": ["Python (programming language)"] }

# Run the Actor and wait for it to finish
run = client.actor("glitchbound/wikipedia-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 '{
  "titles": [
    "Python (programming language)"
  ]
}' |
apify call glitchbound/wikipedia-scraper --silent --output-dataset

```

## MCP server setup

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