# Wikipedia Trends API
> Live readership-trend data from the Wikimedia Pageviews API — the official measure of what the world is reading on Wikipedia and its sister projects. See the most-viewed articles on any Wikipedia language edition for a given day (the daily trending list); pull the daily or monthly pageview trend for any single article over a date range; read a whole project's total pageviews over a range as a barometer of overall traffic; or rank several articles head-to-head by total views for topic-engagement comparison. Special / namespace pages (Main Page, Search, Portal…) are filtered out by default so the trending list is real articles. Read live from Wikimedia, nothing stored — data lags about 1-2 days, so ranges default to ending two days back. This is the Wikipedia readership-trend and topic-engagement layer for any trends, research, newsroom or analytics app — distinct from Wikipedia content APIs: this is the pageview, trending and engagement signal of what people are actually reading and how it changes.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/wikitrends-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 3 req/s
- **Starter** ($7/Mo) — 60,000 calls/Mo, 12 req/s
- **Pro** ($19/Mo) — 300,000 calls/Mo, 30 req/s
- **Business** ($46/Mo) — 1,500,000 calls/Mo, 60 req/s

## Endpoints

### Top

#### `GET /v1/top` — Most-viewed articles for a day

**Parameters:**
- `project` (query, optional, string) — Wikipedia project (default en.wikipedia) Example: `en.wikipedia`
- `date` (query, optional, string) — Day YYYY-MM-DD (default 2 days back) Example: `2026-06-08`
- `limit` (query, optional, string) — Max articles (1-1000) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/top?project=en.wikipedia&date=2026-06-08&limit=50"
```

**Response:**
```json
{
    "data": {
        "top": [
            {
                "rank": 4,
                "title": "Obsession (2025 film)",
                "views": 291972,
                "article": "Obsession_(2025_film)"
            },
            {
                "rank": 5,
                "title": "2026 Peruvian general election",
                "views": 281754,
                "article": "2026_Peruvian_general_election"
            },
            {
                "rank": 6,
                "title": "2026 FIFA World Cup",
                "views": 264644,
                "article": "2026_FIFA_World_Cup"
            },
            {
                "rank": 7,
                "title": "Backrooms (film)",
                "views": 174832,
                "article": "Backrooms_(film)"
            },
            {
                "rank": 8,
                "title": "Alexander Zverev",
                "views": 163973,
                "article": "Alexander_Zverev"
            },
            {
                "rank": 9,
                "title": "Masters of the Universe (2026 film)",
                "views": 155937,
                "article": "Masters_of_the_Universe_(2026_film)"
            },
            {
                "rank": 10,
                "title": "Christian Eriksen",
                "views": 139845,
                "article": "Christian_Eriksen"
            },
            {
                "rank": 11,
                "title": "Deaths in 2026",
                "views": 132986,
    
…(truncated, see openapi.json for full schema)
```

### Article

#### `GET /v1/article` — Pageview trend for one article

**Parameters:**
- `article` (query, required, string) — Article title Example: `Cristiano_Ronaldo`
- `project` (query, optional, string) — Wikipedia project Example: `en.wikipedia`
- `from` (query, optional, string) — Start YYYY-MM-DD Example: `2026-06-01`
- `to` (query, optional, string) — End YYYY-MM-DD Example: `2026-06-08`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/article?article=Cristiano_Ronaldo&project=en.wikipedia&from=2026-06-01&to=2026-06-08"
```

**Response:**
```json
{
    "data": {
        "to": "2026-06-08",
        "from": "2026-06-01",
        "count": 8,
        "title": "Cristiano Ronaldo",
        "access": "all-access",
        "series": [
            {
                "date": "2026-06-01",
                "views": 35837
            },
            {
                "date": "2026-06-02",
                "views": 38298
            },
            {
                "date": "2026-06-03",
                "views": 39473
            },
            {
                "date": "2026-06-04",
                "views": 39922
            },
            {
                "date": "2026-06-05",
                "views": 41528
            },
            {
                "date": "2026-06-06",
                "views": 49555
            },
            {
                "date": "2026-06-07",
                "views": 52183
            },
            {
                "date": "2026-06-08",
                "views": 48521
            }
        ],
        "source": "Wikimedia Pageviews",
        "article": "Cristiano_Ronaldo",
        "project": "en.wikipedia",
        "granularity": "daily",
        "total_views": 345317
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:42.003Z",
        "request_id": "90c541b2-ee02-4a12-a9f3-0610fdfc5bd0"
    },
    "status": "ok",
    "message": "Article trend retrieved successfully",
    "success": true
}
```

### Aggregate

#### `GET /v1/aggregate` — A project's total pageviews over a range

**Parameters:**
- `project` (query, optional, string) — Wikipedia project Example: `en.wikipedia`
- `from` (query, optional, string) — Start YYYY-MM-DD Example: `2026-06-01`
- `to` (query, optional, string) — End YYYY-MM-DD Example: `2026-06-08`
- `granularity` (query, optional, string) — daily or monthly Example: `daily`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/aggregate?project=en.wikipedia&from=2026-06-01&to=2026-06-08&granularity=daily"
```

**Response:**
```json
{
    "data": {
        "to": "2026-06-08",
        "from": "2026-06-01",
        "count": 8,
        "access": "all-access",
        "series": [
            {
                "date": "2026-06-01",
                "views": 314766231
            },
            {
                "date": "2026-06-02",
                "views": 311407635
            },
            {
                "date": "2026-06-03",
                "views": 308605746
            },
            {
                "date": "2026-06-04",
                "views": 303125887
            },
            {
                "date": "2026-06-05",
                "views": 311150207
            },
            {
                "date": "2026-06-06",
                "views": 310820458
            },
            {
                "date": "2026-06-07",
                "views": 327860680
            },
            {
                "date": "2026-06-08",
                "views": 341995000
            }
        ],
        "source": "Wikimedia Pageviews",
        "project": "en.wikipedia",
        "granularity": "daily",
        "total_views": 2529731844
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:42.131Z",
        "request_id": "4b824cc6-1fa5-44c7-adc2-103dc9a72305"
    },
    "status": "ok",
    "message": "Aggregate views retrieved successfully",
    "success": true
}
```

### Compare

#### `GET /v1/compare` — Rank several articles by total views

**Parameters:**
- `articles` (query, required, string) — Pipe/comma-separated article list Example: `Python_(programming_language)|Java_(programming_language)`
- `project` (query, optional, string) — Wikipedia project Example: `en.wikipedia`
- `from` (query, optional, string) — Start YYYY-MM-DD Example: `2026-06-01`
- `to` (query, optional, string) — End YYYY-MM-DD Example: `2026-06-08`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/compare?articles=Python_%28programming_language%29%7CJava_%28programming_language%29&project=en.wikipedia&from=2026-06-01&to=2026-06-08"
```

**Response:**
```json
{
    "data": {
        "to": "2026-06-08",
        "from": "2026-06-01",
        "count": 2,
        "source": "Wikimedia Pageviews",
        "project": "en.wikipedia",
        "ranking": [
            {
                "days": 8,
                "rank": 1,
                "found": true,
                "title": "Python (programming language)",
                "article": "Python_(programming_language)",
                "total_views": 53020
            },
            {
                "days": 8,
                "rank": 2,
                "found": true,
                "title": "Java (programming language)",
                "article": "Java_(programming_language)",
                "total_views": 29365
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:42.291Z",
        "request_id": "ffe99c16-9a71-4e2b-b98d-afa18f5fb310"
    },
    "status": "ok",
    "message": "Comparison completed successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Pageview data lags ~1-2 days; range/date defaults end 2 days back. project defaults to en.wikipedia (a bare lang code like 'de' becomes de.wikipedia).",
        "source": "Wikimedia Pageviews REST API (wikimedia.org, live)",
        "service": "wikitrends-api",
        "endpoints": {
            "GET /v1/top": "Most-viewed articles for a day — the trending list (project=en.wikipedia, date=2026-06-08, limit=50, exclude_special=true).",
            "GET /v1/meta": "This document.",
            "GET /v1/article": "Daily/monthly pageview trend for one article (article=Cristiano_Ronaldo, project=en.wikipedia, from=2026-06-01, to=2026-06-08).",
            "GET /v1/compare": "Rank several articles by total views (articles=Python_(programming_language)|Java_(programming_language), from=2026-06-01, to=2026-06-08).",
            "GET /v1/aggregate": "A project's total pageviews over a range (project=en.wikipedia, from=2026-06-01, to=2026-06-08, granularity=daily)."
        },
        "description": "Live readership-trend data from the Wikimedia Pageviews API — the official measure of what the world is reading on Wikipedia and its sister projects. The top endpoint returns the most-viewed articles on any Wikipedia language edition for a given day (the daily trending list); the article endpoint returns the daily or monthly pageview trend for any single article over a date range; the aggregate endpoint returns a whole project's total pageviews over a r
…(truncated, see openapi.json for full schema)
```

### Feed

#### `GET /v1/featured` — The daily featured feed

**Parameters:**
- `lang` (query, optional, string) — Wikipedia language code (default en) Example: `en`
- `date` (query, optional, string) — Day YYYY-MM-DD (default 2 days back) Example: `2026-06-10`
- `limit` (query, optional, string) — Max most-read (1-50) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/featured?lang=en&date=2026-06-10&limit=25"
```

**Response:**
```json
{
    "data": {
        "date": "2026-06-10",
        "lang": "en",
        "source": "Wikimedia Featured Feed",
        "most_read": [
            {
                "url": "https://en.wikipedia.org/wiki/Victor_Wembanyama",
                "rank": 4,
                "title": "Victor Wembanyama",
                "views": 343601,
                "extract": "Victor Wembanyama, nicknamed \"Wemby\" and \"the Alien\", is a French professional basketball player for the San Antonio Spurs of the National Basketball Association (NBA). He was selected first overall by the Spurs in the 2023 NBA draft and is considere",
                "thumbnail": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Victor_Wembanyama_San_Antonio_Spurs_2024.jpg/330px-Victor_Wembanyama_San_Antonio_Spurs_2024.jpg",
                "description": "French basketball player (born 2004)"
            },
            {
                "url": "https://en.wikipedia.org/wiki/2026_FIFA_World_Cup",
                "rank": 5,
                "title": "2026 FIFA World Cup",
                "views": 280506,
                "extract": "The 2026 FIFA World Cup is the current and 23rd edition of the FIFA World Cup, the quadrennial international men's soccer championship contested by the national teams of the member associations of FIFA. The tournament is currently taking place from J",
                "thumbnail": "https://upload.wikimedia.org/wikipedia/en/thumb/1/17/2026_FIFA_World_Cup_emblem.svg/330px-2026_FIFA_World
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/onthisday` — Notable historical events for a calendar day

**Parameters:**
- `lang` (query, optional, string) — Wikipedia language code (default en) Example: `en`
- `type` (query, optional, string) — events (default), births, deaths, holidays or selected Example: `events`
- `date` (query, optional, string) — MM-DD or YYYY-MM-DD (default today) Example: `06-10`
- `limit` (query, optional, string) — Max events (1-50) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/wikitrends-api/v1/onthisday?lang=en&type=events&date=06-10&limit=20"
```

**Response:**
```json
{
    "data": {
        "day": "10",
        "lang": "en",
        "type": "events",
        "count": 20,
        "month": "06",
        "events": [
            {
                "text": "Eleven people are killed, including the perpetrator, and eleven others are injured, in a mass shooting at a secondary school in Graz, Austria.",
                "year": 2025,
                "pages": [
                    "2025 Graz school shooting",
                    "Secondary school",
                    "Graz"
                ]
            },
            {
                "text": "A plane crash in Malawi leaves 10 people dead, including the country's Vice President Saulos Chilima.",
                "year": 2024,
                "pages": [
                    "2024 Chikangawa Dornier 228 crash",
                    "Malawi",
                    "Saulos Chilima"
                ]
            },
            {
                "text": "The Opportunity rover sends its last message back to Earth. The mission was finally declared over on February 13, 2019.",
                "year": 2018,
                "pages": [
                    "Opportunity (rover)",
                    "Earth"
                ]
            },
            {
                "text": "Eighty-eight year-old James Wenneker von Brunn opens fire inside the United States Holocaust Memorial Museum and fatally shoots Museum Special Police Officer Stephen Tyrone Johns. Other security guards returned fire, wounding von Brunn, who wa
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/wikitrends-api
OpenAPI spec: https://www.oanor.com/api/wikitrends-api/openapi.json
