# Wikipedia Attention Trends: Topic Interest by Day & Language (`renzxlp/wikipedia-attention-trends`) Actor

Measure public interest in any topic with Wikipedia pageviews: daily or monthly series in every language, peaks, week-over-week change, and what's trending today per country language. Official Wikimedia APIs, no CAPTCHAs. A reliable Google Trends alternative.

- **URL**: https://apify.com/renzxlp/wikipedia-attention-trends.md
- **Developed by:** [Jhair](https://apify.com/renzxlp) (community)
- **Categories:** Marketing, AI, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 items

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

## Wikipedia Attention Trends: Topic Interest by Day & Language

See how much attention any topic gets, day by day, in any language. The actor reads Wikipedia pageviews, a public signal of what people look up, and returns a clean time series with totals, peaks, and week-over-week change. It also lists the most-read articles of the day for each language you pick.

It runs on the official Wikimedia APIs, so there are no CAPTCHAs, no proxies, and no blocked requests. That makes it a dependable Google Trends alternative for dashboards, research, content planning, and AI agents that need a trend signal they can cite.

### What you get

Each topic gives one item per language:

| Field | Example |
|---|---|
| `topic`, `language`, `article`, `url` | Machu Picchu, es, Machu Picchu, https://es.wikipedia.org/wiki/Machu_Picchu |
| `series` | `[{"date": "2026-10-23", "views": 807}, ...]`, with days without views filled in as 0 |
| `totalViews`, `averageViews` | 23990, 799.7 (30 days, Spanish Wikipedia) |
| `peakDate`, `peakViews` | 2026-10-27, 1066 |
| `changePercent` | 1.4 (last 7 days against the 7 before; last month against the previous one for monthly data) |

Trending items (`type: trending`) have `language`, `date`, `rank`, `article`, `views`, and `url`. Special pages such as the main page or search are left out.

### Input

```json
{
    "topics": ["Machu Picchu", "Artificial intelligence"],
    "languages": ["en", "es", "pt"],
    "startDate": "2026-10-01",
    "granularity": "daily",
    "trendingLanguages": ["es"],
    "trendingLimit": 25
}
```

- **topics**: a name, a phrase, or a Wikipedia URL. The actor finds the article in the first language, then follows the same article in the others.
- **languages**: Wikipedia language codes. If a topic has no article in a language, the log says so and the run goes on.
- **granularity**: `daily` (up to three years per run) or `monthly`. Data starts on July 1, 2015.

### Pricing

You pay per item saved to the dataset: one per topic and language, and one per trending article. There's also a tiny fee when the run starts. Set a maximum charge per run in the run options and the actor stops there.

### Good to know

- Pageviews count people, not bots: the actor asks Wikimedia for user traffic only.
- Interest on Wikipedia and on search engines move together for most news and products, but they aren't the same audience. Use the trend, not the exact number.
- Data: Wikimedia Foundation, through its public APIs. This actor isn't affiliated with or endorsed by Wikimedia.

# Actor input Schema

## `topics` (type: `array`):

One per line: a topic, a name, or a Wikipedia article URL. Each topic is matched to its Wikipedia article in the first language below.

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

Language codes such as en, es, pt, fr, de or ja. The same article is followed in every language it exists in.

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

Optional. Default: 30 days ago. Data starts on 2015-07-01.

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

Optional. Default and latest: yesterday.

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

Daily covers up to three years per run.

## `trendingLanguages` (type: `array`):

Optional. For each language, the most-read articles of the day, without special pages.

## `trendingDate` (type: `string`):

Optional. Default: yesterday.

## `trendingLimit` (type: `integer`):

How many of the day's most-read articles to return for each language.

## Actor input object example

```json
{
  "topics": [
    "Machu Picchu",
    "Artificial intelligence"
  ],
  "languages": [
    "en",
    "es"
  ],
  "granularity": "daily",
  "trendingLimit": 25
}
```

# Actor output Schema

## `items` (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 = {
    "topics": [
        "Machu Picchu",
        "Artificial intelligence"
    ],
    "languages": [
        "en",
        "es"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("renzxlp/wikipedia-attention-trends").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 = {
    "topics": [
        "Machu Picchu",
        "Artificial intelligence",
    ],
    "languages": [
        "en",
        "es",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("renzxlp/wikipedia-attention-trends").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 '{
  "topics": [
    "Machu Picchu",
    "Artificial intelligence"
  ],
  "languages": [
    "en",
    "es"
  ]
}' |
apify call renzxlp/wikipedia-attention-trends --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,renzxlp/wikipedia-attention-trends"
        }
    }
}
```

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/0ULu16cddeWQ5uzwR/builds/EECAtK5YGkeHVBZMd/openapi.json
