# Wikipedia Article Data & Pageviews Scraper (`scrapers_lat/wikipedia-articles-pageviews-scraper`) Actor

Scrape Wikipedia article summaries, metadata and official daily pageviews with trend analysis, plus keyword search and trending topics (top articles). Multi-language. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/wikipedia-articles-pageviews-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, News, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.32 / 1,000 article records

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 Article Data & Pageviews Scraper](https://scrapers.lat/banners/wikipedia-articles-pageviews-scraper.png)](https://apify.com/scrapers_lat/wikipedia-articles-pageviews-scraper)

## Wikipedia Article Data & Pageviews Scraper

Look up any Wikipedia article and get its summary and metadata paired with the official daily pageviews trend, so you see not just what a topic is but how much attention it is getting right now. Search by keyword or pull the day's trending articles too. Here is one real result, with every base field the actor returns:

```json
{
  "title": "OpenAI",
  "description": "American artificial intelligence company",
  "extract": "OpenAI is an American artificial intelligence (AI) research organization headquartered in San Francisco, consisting of OpenAI Group PBC, a for-profit public benefit corporation (PBC), partially controlled by OpenAI Foundation, a nonprofit. OpenAI develops generative AI models, particularly the GPT series of large language models. Its release of ChatGPT in November 2022 has been credited with catalyzing the AI boom, and widespread interest in generative AI.",
  "url": "https://en.wikipedia.org/wiki/OpenAI",
  "lang": "en",
  "pageId": 48795986,
  "lastEdit": "2026-08-17T09:50:57Z",
  "thumbnailUrl": null,
  "type": "standard",
  "pageviewsWindowDays": 30,
  "pageviewsTotalWindow": 213442,
  "pageviewsAvgDaily": 7360,
  "pageviewsLatestDay": 7685,
  "pageviewsTrendPct": -4.7,
  "observedAt": "2026-08-17T11:25:36.861Z",
  "error": null
}
```

Wikipedia article intelligence in one actor. It returns the article summary, description, canonical URL, page ID, lead image and last-edit timestamp, and pairs each one with the official Wikimedia pageviews time series distilled into a window total, a daily average, the latest day, and a 7-day-over-7-day trend percentage. That is what turns a bare summary into a signal you can track.

**📥 [Input](https://apify.com/scrapers_lat/wikipedia-articles-pageviews-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/wikipedia-articles-pageviews-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/wikipedia-articles-pageviews-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/wikipedia-articles-pageviews-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Data](https://img.shields.io/badge/Data-Summaries%20%7C%20Pageviews%20%7C%20Trends-blue)
![Languages](https://img.shields.io/badge/Languages-Multilingual-brightgreen)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)

### Table of contents

- [What it does](#what-it-does)
- [Use cases](#use-cases)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

The actor works in three modes and writes one clean record per article to the run's dataset. In **article** mode you pass a list of titles and get each one back with its summary and pageviews trend. In **search** mode you pass a keyword and it finds the matching articles, each enriched with the same summary and pageviews fields plus a matched snippet and word count. In **top** mode it returns the day's trending articles ranked by real pageviews, with non-article entries such as the main page and search pages filtered out. Because official pageviews data lags a day or two, top mode defaults to the most recent day with data and steps back automatically until it finds a populated ranking.

Every record carries the pageviews aggregates computed over your chosen window (30, 60 or 90 days): `pageviewsTotalWindow`, `pageviewsAvgDaily`, `pageviewsLatestDay` and a `pageviewsTrendPct` comparing the last seven days with the seven before. Two optional add-ons (paid Apify plans only) go further. `includePageviewSeries` attaches the full daily time series of date and views for seasonality and charting. `withAiSummary` distills the extract into a TL;DR, key facts, a category and named entities. Missing values are always returned as `null`, never invented, and articles that do not exist come back as an unbilled error row.

### Use cases

- **Content and topic research.** Pull summaries and metadata for a list of topics and rank them by how much attention each is getting, so your content calendar follows real demand.
- **SEO and topic trend monitoring.** Track the pageviews trend of the Wikipedia articles behind your target keywords to spot rising and cooling topics before they show up in other tools.
- **Trending topics discovery.** Use top mode to surface the day's most-viewed articles in any language edition for newsrooms, social teams and market research.
- **Knowledge panels and enrichment.** Fetch clean descriptions, extracts, lead images and canonical URLs to power knowledge panels, chat answers and internal wikis.
- **ML and NLP datasets.** Assemble multilingual article summaries with attention signals and, optionally, the full pageviews time series for training and evaluation datasets.
- **Reputation and PR tracking.** Watch the daily pageviews of the articles for your brand, people or products to quantify spikes in public interest.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns two articles with their 30-day pageviews trend.

```json
{
  "mode": "article",
  "titles": ["OpenAI", "Artificial intelligence"],
  "pageviewDays": "30",
  "maxResults": 25
}
```

Switch `mode` to `search` and set a `query` to find articles by keyword, or set `mode` to `top` to pull the day's trending articles. Change `lang` to any Wikipedia edition code such as `es`, `de` or `ja`.

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `mode` | string | no | `article` | What to fetch: `article`, `search` or `top`. |
| `titles` | string\[] | for article mode | `["OpenAI","Artificial intelligence"]` | Article titles to look up in article mode. |
| `query` | string | for search mode | `quantum computing` | Keyword(s) to find matching articles in search mode. |
| `date` | string | no | (most recent) | Day to rank in top mode, `YYYY-MM-DD`. Leave empty to use the latest day with data. |
| `lang` | string | no | `en` | Wikipedia language edition code, for example `en`, `es`, `de`, `fr`, `pt`, `ja`. |
| `pageviewDays` | string | no | `30` | Pageviews window to aggregate: `30`, `60` or `90` days. |
| `maxResults` | integer | no | `25` | Maximum number of article rows to return. Free plans are capped at 10. |
| `includePageviewSeries` | boolean | no | `false` | Paid add-on. Attach the full daily pageviews time series to each article. Billed per article on a non-empty series. |
| `withAiSummary` | boolean | no | `false` | Paid AI add-on. Add a TL;DR, key facts, category and entities from the extract. Billed per article on usable output. |

### Output reference

One dataset item per article. Types: `string`, `integer`, `number`, `array`, or `null` when the source value is absent.

| Field | Type | Description |
|---|---|---|
| `title` | string | Article title. |
| `description` | string | Short one-line description of the article. |
| `extract` | string | Plain-text lead summary. |
| `url` | string | Canonical desktop URL of the article. |
| `lang` | string | Wikipedia language edition code. |
| `pageId` | integer | Wikipedia numeric page identifier. |
| `lastEdit` | string | ISO 8601 timestamp of the last edit. |
| `thumbnailUrl` | string | Lead image thumbnail URL, or `null`. |
| `type` | string | Article type, `standard` or `disambiguation`. |
| `pageviewsWindowDays` | integer | Number of days aggregated for the pageviews figures. |
| `pageviewsTotalWindow` | integer | Total pageviews over the window. |
| `pageviewsAvgDaily` | integer | Average daily pageviews over the window. |
| `pageviewsLatestDay` | integer | Pageviews on the most recent available day. |
| `pageviewsTrendPct` | number | Percent change of the last 7 days versus the prior 7 days. |
| `snippet` | string | Search mode only: matched text snippet. |
| `wordcount` | integer | Search mode only: article word count. |
| `articleSize` | integer | Search mode only: article size in bytes. |
| `rank` | integer | Top mode only: trending rank for the day. |
| `views` | integer | Top mode only: views on the ranked day. |
| `topDate` | string | Top mode only: the day the ranking is for. |
| `pageviewSeries` | array | Add-on: full daily time series of `{date, views}`, or `null`. |
| `aiTldr` | string | AI add-on: one to two sentence TL;DR, or `null`. |
| `aiKeyFacts` | array | AI add-on: key facts, or `null`. |
| `aiCategory` | string | AI add-on: broad topic category, or `null`. |
| `aiEntities` | array | AI add-on: named entities, or `null`. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `error` | string | Present only when an article could not be fetched; the row is not billed. |

### Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~wikipedia-articles-pageviews-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode":"article","titles":["OpenAI","Artificial intelligence"],"pageviewDays":"30"}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~wikipedia-articles-pageviews-scraper/runs?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode":"top","lang":"en","maxResults":25}'
```

Apify CLI:

```bash
apify call scrapers_lat/wikipedia-articles-pageviews-scraper \
  --input '{"mode":"search","query":"quantum computing","maxResults":25}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large result sets. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per article.** You are charged per article record returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/wikipedia-articles-pageviews-scraper/pricing) for the current per-result price.
- **Add-ons billed separately.** `pageviews_series` is charged per article only when a non-empty daily series is attached, and `ai_summary` is charged per article only when the model returns usable output. Both are opt-in and available on paid Apify plans only.
- **No charge on failure.** Articles that do not exist and failed runs are written as an `error` row and are never charged. Empty and zero-result runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 rows per run and cannot use the paid add-ons. Upgrade for higher `maxResults`.

### FAQ and troubleshooting

**How fresh are the pageviews?**
Official Wikimedia pageviews data lags about one to two days, so the window ends two days before today and top mode uses the most recent day that has data. The `pageviewsLatestDay` value reflects that most recent complete day.

**What does `pageviewsTrendPct` mean?**
It is the percentage change between the total views of the last seven days in the window and the seven days before that. A positive value means rising attention, a negative value means cooling. It is `null` when there are fewer than fourteen days of data.

**Which languages are supported?**
Any Wikipedia language edition. Set `lang` to the edition code, for example `en`, `es`, `de`, `fr`, `pt`, `ru`, `ja` or `zh`. Titles, search and pageviews are all resolved within that edition.

**How do I get the full daily pageviews history?**
Enable `includePageviewSeries` on a paid plan. Each article then includes a `pageviewSeries` array of `{date, views}` covering your chosen window, ready for charting and seasonality analysis.

**A run returned an error row for a title. Why?**
The title did not resolve to an existing article in that language edition. Check spelling and capitalization, or use search mode to find the exact title. Error rows are not billed.

**Is this an official Wikipedia or Wikimedia tool?**
No. This actor is independent and has no affiliation with Wikipedia or the Wikimedia Foundation. It reads only publicly available article metadata and pageviews.

### Related scrapers

- [arXiv Research Papers & Abstracts Scraper](https://apify.com/scrapers_lat/arxiv-papers-scraper): Preprint metadata, authors and abstracts.
- [Wikidata Entities Scraper](https://apify.com/scrapers_lat/wikidata-entities-scraper): Structured entities, statements and identifiers.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for public platforms: company registries, government data, finance, e-commerce, media and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with Wikipedia or the Wikimedia Foundation. Accesses only publicly available article metadata and pageviews.

# Actor input Schema

## `mode` (type: `string`):

What to fetch: article (look up specific titles), search (find articles by keyword), or top (daily trending articles).

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

Article mode: one or more Wikipedia article titles to fetch (e.g. "OpenAI", "Artificial intelligence").

## `query` (type: `string`):

Search mode: keyword(s) to find matching Wikipedia articles.

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

Top mode: the day to rank trending articles for. Leave empty to use the most recent day with data (about 2 days ago).

## `lang` (type: `string`):

Wikipedia language edition code (e.g. en, es, de, fr, pt, ja).

## `pageviewDays` (type: `string`):

Number of recent days of pageviews to aggregate for the trend attached to each article.

## `maxResults` (type: `integer`):

Maximum number of article rows to return. Free Apify plans are capped at 10 per run.

## `includePageviewSeries` (type: `boolean`):

Attach the full daily pageviews time series (date + views) to each article for detailed trend/seasonality analysis. Billed per article only on a successful non-empty series. Paid plans only.

## `withAiSummary` (type: `boolean`):

Add an AI TL;DR, key facts, category and named entities per article, distilled from its extract. Billed per article only on usable AI output. Paid plans only.

## Actor input object example

```json
{
  "mode": "article",
  "titles": [
    "OpenAI",
    "Artificial intelligence"
  ],
  "query": "quantum computing",
  "lang": "en",
  "pageviewDays": "30",
  "maxResults": 25,
  "includePageviewSeries": false,
  "withAiSummary": false
}
```

# Actor output Schema

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

No description

# 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": [
        "OpenAI",
        "Artificial intelligence"
    ],
    "query": "quantum computing",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/wikipedia-articles-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 = {
    "titles": [
        "OpenAI",
        "Artificial intelligence",
    ],
    "query": "quantum computing",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/wikipedia-articles-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 '{
  "titles": [
    "OpenAI",
    "Artificial intelligence"
  ],
  "query": "quantum computing",
  "maxResults": 25
}' |
apify call scrapers_lat/wikipedia-articles-pageviews-scraper --silent --output-dataset

```

## MCP server setup

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