# Wikipedia Pageviews Trends & Seasonality (`happysproutstore/wikipedia-pageviews-trends`) Actor

A Google Trends alternative with absolute numbers. For each topic or keyword get real Wikipedia views since 2015, peak and low months, a seasonality index, YoY growth, trend direction, spikes and a ranking. Any of ~300 languages, no proxy or API key needed.

- **URL**: https://apify.com/happysproutstore/wikipedia-pageviews-trends.md
- **Developed by:** [Recep Vural](https://apify.com/happysproutstore) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 topic analyzeds

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 Pageviews Trends & Seasonality

A Google Trends alternative that gives **absolute numbers**. Google Trends shows only a relative 0–100 score and often blocks automated requests. This Actor uses Wikimedia's official Pageviews API instead. The API is free and needs no key or proxy, and it records real daily views of every Wikipedia article in about 300 languages since July 2015.

Give it article titles or plain keywords. You get **one row per topic** with its real view counts and seasonality figures.

| Field | Meaning |
|---|---|
| `resolvedTitle`, `url` | The article that was analyzed. Plain keywords are matched with Wikipedia's own search. |
| `resolutionMethod`, `resolutionConfidence` | How the match was made (`exact`, `redirect`, `search`) and how sure it is (`high`, `medium`, `low`) |
| `totalViews`, `averageMonthlyViews`, `averageDailyViews` | Real views in the date range |
| `latestMonthViews`, `allTimePeakMonth` | Views in the last finished month, and the best single month in the range |
| `peakMonths` / `lowMonths` | Calendar months with the most and fewest views, averaged over all years |
| `monthlySeasonalityIndex` | Views per day for each calendar month, where 100 is the topic's average |
| `seasonalityLabel` | `strongly seasonal`, `seasonal` or `evergreen` |
| `monthsUntilPeak` | Months from now until the next peak month |
| `yoyGrowthPercent` | Last 12 months compared with the 12 months before |
| `trendDirection` | `rising`, `stable` or `declining`, from a linear slope over the range |
| `spikes` | Months with more than 3x the median daily views. `inPeakSeason` tells a normal seasonal peak from a one-off news spike. |
| `languageEditions` | Optional. Views of the same article in the largest language editions, added together. |
| `timeline` | Optional. The raw monthly or daily counts. |

With **Rank topics** switched on, the `OUTPUT` record of the key-value store ranks all topics by average monthly views and by YoY growth.

### Who it is for

- E-commerce and print-on-demand sellers timing product launches and stock
- Content creators and SEO teams building a seasonal calendar with real audience sizes
- Analysts and researchers who need an interest signal that is stable and reproducible

### Input example

```json
{"topics": ["Sunscreen", "pumpkin spice latte", "ozempic side effects", "tr:Lodos"],
 "projects": ["en.wikipedia"], "granularity": "monthly", "allLanguages": false}
```

Add a language prefix to a topic to send it to one edition only, for example `tr:Lodos` or `de.wikipedia:Glühwein`.

### Output example

```json
{"inputTopic": "ozempic side effects", "resolvedTitle": "Semaglutide", "resolutionMethod": "redirect (keyword)",
 "resolutionConfidence": "medium", "averageMonthlyViews": 123523, "peakMonths": ["Sep", "Oct", "Jan"],
 "seasonalityLabel": "evergreen", "yoyGrowthPercent": -66.2, "trendDirection": "declining"}
```

### Notes

- Wikipedia counts views per title. When an article has been renamed, the default **Auto** redirect mode finds its old titles in the page history and adds their views, so the history is complete.
- Plain keywords are matched to the closest encyclopedic article. For example, "how to lose weight" becomes *Weight loss*. Check rows with `resolutionConfidence: low`, or enter exact titles.
- By default only human traffic is counted. Bots and crawlers are excluded.
- The Actor follows Wikimedia's API rules: a descriptive User-Agent, at most 3 parallel requests, and about 180 requests per minute. It also waits as long as `Retry-After` asks. Expect roughly 30–60 topics per minute.
- A topic that fails gets a row with `error` set and is **not charged**.

Not affiliated with the Wikimedia Foundation. Wikipedia pageview data is provided by Wikimedia under CC0. By HAPPYSPROUTSTORE LLC.

# Actor input Schema

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

One topic per line: an exact Wikipedia article title (e.g. 'Sunscreen') or a free-text keyword (e.g. 'halloween costume ideas'). Free text is matched to the best article with Wikipedia's own search, and the matched title is reported. Prefix a topic with a language code to pin it to one edition, e.g. 'tr:Lodos' or 'de.wikipedia:Glühwein'.

## `projects` (type: `array`):

Language editions to query, such as en.wikipedia, de.wikipedia or tr.wikipedia (a bare code like 'tr' also works). Every topic is analyzed in every edition listed.

## `allLanguages` (type: `boolean`):

Follow the article's interlanguage links and add up the views of the same article in the largest Wikipedia editions. Gives a global interest number and a per-language breakdown.

## `topLanguages` (type: `integer`):

Used only when summing across languages: how many editions (including the one above) to add up, picked from the biggest Wikipedias that have the article.

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

Monthly covers finished months only. Daily goes up to yesterday; the current month is shown in the timeline but left out of the statistics.

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

YYYY-MM or YYYY-MM-DD. Leave empty for the last 5 years. Data starts at 2015-07.

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

YYYY-MM or YYYY-MM-DD. Leave empty for the last finished month (monthly) or yesterday (daily).

## `agent` (type: `string`):

Which traffic to count. 'Humans only' excludes crawlers and detected bots.

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

Which devices to count.

## `resolveKeywords` (type: `boolean`):

When a topic is not an exact article title (or is a disambiguation page), use Wikipedia search to pick the best article. Turn off to accept exact titles only.

## `includeRedirects` (type: `string`):

Wikipedia counts views per title, so a renamed article loses its history under the new title. 'Auto' finds the old titles in the article's move history and adds their views (one extra request). 'Always' adds redirect views for every topic, which needs many more requests.

## `includeTimeline` (type: `boolean`):

Add the raw monthly or daily view counts to each row.

## `compare` (type: `boolean`):

Write a ranking of all topics by average monthly views and by YoY growth to the OUTPUT record of the key-value store.

## Actor input object example

```json
{
  "topics": [
    "Sunscreen",
    "Halloween costume",
    "Bitcoin"
  ],
  "projects": [
    "en.wikipedia"
  ],
  "allLanguages": false,
  "topLanguages": 10,
  "granularity": "monthly",
  "agent": "user",
  "access": "all-access",
  "resolveKeywords": true,
  "includeRedirects": "auto",
  "includeTimeline": false,
  "compare": true
}
```

# Actor output Schema

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

No description

## `comparison` (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": [
        "Sunscreen",
        "Halloween costume",
        "Bitcoin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("happysproutstore/wikipedia-pageviews-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": [
        "Sunscreen",
        "Halloween costume",
        "Bitcoin",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("happysproutstore/wikipedia-pageviews-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": [
    "Sunscreen",
    "Halloween costume",
    "Bitcoin"
  ]
}' |
apify call happysproutstore/wikipedia-pageviews-trends --silent --output-dataset

```

## MCP server setup

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