# Wikipedia Trending Topics & Pageview Intelligence (`osmateus/wikipedia-trend-watcher`) Actor

Track Wikipedia pageview trends and rising topics across languages. Real-time trend detection API for SEO, content marketing, and market research. No proxies, no browser — uses official Wikipedia REST API.

- **URL**: https://apify.com/osmateus/wikipedia-trend-watcher.md
- **Developed by:** [Mateo Tejeda](https://apify.com/osmateus) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Trending Pages API

Wikipedia Trending Pages API helps teams collect Wikipedia trending pages, pageviews, most-read articles as clean JSON on Apify.
It uses Wikipedia REST featured feed, so the listing matches the real data source used by the Actor.
Track Wikipedia most-read pages, pageviews, ranks, extracts, thumbnails, and URLs from the official REST feed.
This Actor pulls Wikipedia's official *most-read* feed for a given language, then enriches each article with multi-day pageview totals from the Wikimedia Pageviews API. The result is a ranked, deduped list of trending topics with daily averages and view counts you can pipe straight into your dashboard or CRM.

> **Why Wikipedia?** It's the largest open knowledge base on the web. When something starts trending in the real world — a sports event, a tech product, a political scandal — Wikipedia's traffic spikes *before* mainstream media catches up. That spike is the signal you want.

---

### ✨ Features

- **9+ languages supported**: English, Spanish, German, French, Portuguese, Italian, Japanese, Chinese, Russian
- **Pageview enrichment**: total views + daily average over a 1–90 day window
- **Optional category filter**: focus on a topic (e.g. `"AI"`, `"football"`, `"election"`)
- **No proxies, no browser**: runs on Wikipedia's free public REST API (cost ~$0.001 per run)
- **Respects budget limits**: graceful exit if the user's spend cap is reached
- **Clean dataset output**: ranked JSON, ready for export to CSV/Excel/Parquet

---

### 📊 What you can extract

| Field | Type | Description |
|---|---|---|
| `rank` | integer | 1-based rank by total views |
| `title` | string | Wikipedia article title |
| `language` | string | ISO 639 code |
| `views_last_n_days` | integer | Total pageviews in your window |
| `daily_average` | integer | Views per day (rounded) |
| `top_rank` | integer | Highest rank in the per-article top-articles list |
| `url` | string | Direct link to the Wikipedia article |
| `description` | string \| null | Short description from Wikipedia |
| `fetched_at` | string | ISO timestamp of fetch |

---

### 🚀 Tutorial — get started in 3 steps

1. **Choose your language and window** in the input form. Default: `en`, last 7 days.
2. **(Optional) Add a category filter** — e.g. `"AI"` to keep only AI-related articles.
3. **Click Run** and download the resulting dataset as JSON, CSV, or Excel.

Or call the Actor via the **Apify API** for programmatic use — see [the Apify SDK docs](https://docs.apify.com/api/client/js/docs).

---

### 💰 Pricing — how much does it cost?

You only pay for what you extract. There are two events:

- `actor-start` — `$0.001` per run (covers the initial API call)
- `topic-analyzed` — `$0.005` per article analyzed

**Examples:**

| Run | Items | Cost |
|---|---|---|
| Quick check (en, 50 articles) | 50 | **$0.26** |
| Standard (es, 200 articles) | 200 | **$1.01** |
| Deep dive (en, 1000 articles) | 1000 | **$5.00** (capped) |

Your total spend per run is hard-capped at **$5.00** (`maxTotalChargeUsd`) so you'll never get a surprise bill.

---

### 📥 Input / Output examples

**Input:**
```json
{
  "language": "en",
  "category": "AI",
  "topN": 50,
  "daysBack": 7,
  "minViews": 1000
}
````

**Output (one item per article):**

```json
{
  "rank": 1,
  "title": "2026 FIFA World Cup qualification",
  "language": "en",
  "description": "...",
  "views_last_n_days": 2481337,
  "daily_average": 354476,
  "top_rank": 3,
  "url": "https://en.wikipedia.org/wiki/2026_FIFA_World_Cup_qualification",
  "fetched_at": "2026-07-05T14:42:30.000Z"
}
```

***

### ❓ FAQ / Support

- **Is this data legal?** Yes — Wikipedia publishes both the *most-read* feed and the *pageviews* API as public, no-auth endpoints. No terms of service are violated.
- **How fresh is the data?** The most-read feed updates every 24 hours; pageviews are real-time with a 1-hour delay.
- **Can I get historical data beyond 90 days?** The pageviews API supports older ranges, but this Actor caps at 90 days for cost reasons. Contact me if you need deeper history.
- **A run returned 0 results — what gives?** You probably set `minViews` too high for that language. Try lowering it or increasing `topN`.
- **I want a different language.** See the input dropdown. Any 2-3 letter ISO code Wikipedia supports will work — if your language isn't listed, set the field to its ISO code.

**Issues / feature requests**: open a ticket via the Apify Console "Issues" tab on the Actor's page, or message me via the Apify platform.

# Actor input Schema

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

ISO 639 code: en, es, de, fr, pt, it, ja, zh, ru, etc.

## `category` (type: `string`):

Optional. Filters articles whose description contains this keyword (case-insensitive). Leave empty to disable.

## `topN` (type: `integer`):

Number of top articles to analyze (10-1000).

## `daysBack` (type: `integer`):

Number of days to look back for pageview totals (1-90).

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

Only include articles with at least this many views in the window.

## Actor input object example

```json
{
  "language": "en",
  "category": "",
  "topN": 100,
  "daysBack": 7,
  "minViews": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("osmateus/wikipedia-trend-watcher").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("osmateus/wikipedia-trend-watcher").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call osmateus/wikipedia-trend-watcher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=osmateus/wikipedia-trend-watcher",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Wikipedia Trending Topics & Pageview Intelligence",
        "description": "Track Wikipedia pageview trends and rising topics across languages. Real-time trend detection API for SEO, content marketing, and market research. No proxies, no browser — uses official Wikipedia REST API.",
        "version": "0.1",
        "x-build-id": "4vegcQI2Ndh6tPpSE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/osmateus~wikipedia-trend-watcher/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-osmateus-wikipedia-trend-watcher",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/osmateus~wikipedia-trend-watcher/runs": {
            "post": {
                "operationId": "runs-sync-osmateus-wikipedia-trend-watcher",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/osmateus~wikipedia-trend-watcher/run-sync": {
            "post": {
                "operationId": "run-sync-osmateus-wikipedia-trend-watcher",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "language": {
                        "title": "Wikipedia language code",
                        "enum": [
                            "en",
                            "es",
                            "de",
                            "fr",
                            "pt",
                            "it",
                            "ja",
                            "zh",
                            "ru"
                        ],
                        "type": "string",
                        "description": "ISO 639 code: en, es, de, fr, pt, it, ja, zh, ru, etc.",
                        "default": "en"
                    },
                    "category": {
                        "title": "Optional category filter (keyword)",
                        "type": "string",
                        "description": "Optional. Filters articles whose description contains this keyword (case-insensitive). Leave empty to disable.",
                        "default": ""
                    },
                    "topN": {
                        "title": "How many top articles to fetch",
                        "minimum": 10,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Number of top articles to analyze (10-1000).",
                        "default": 100
                    },
                    "daysBack": {
                        "title": "Pageview window in days",
                        "minimum": 1,
                        "maximum": 90,
                        "type": "integer",
                        "description": "Number of days to look back for pageview totals (1-90).",
                        "default": 7
                    },
                    "minViews": {
                        "title": "Minimum views filter",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include articles with at least this many views in the window.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
