# Wikipedia Trends API [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/trendsapi-ai/wikipedia-trends-api  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/wikipedia-trends-api-2

## Description
Wikipedia page view trends for any topic over time. Free key at trendsapi.ai

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "wikipedia-trends-api": {
    "command": "uvx",
    "args": ["trendsapi-wikipedia"],
    "env": {
      "TRENDSAPI_KEY": ""
    }
  }
}
```

**Requires environment variables:** `TRENDSAPI_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Wikipedia Trends API MCP server does

Wikipedia Trends API MCP server connects agent requests to the Trends API for Wikipedia page-view data. Its supported operations correspond to three main API methods: `get_time_series` returns dated values for a keyword, `get_growth` compares activity across one or more periods, and `get_live` retrieves a current ranked feed of trending pages. The API also exposes `get_top_trends`, which uses the same top-trends response type.

Historical results use a 0–100 index for the requested series. Each time-series point includes a date, value, and echoed keyword; volume and pipeline labels may also be present. Growth responses contain one result per requested window, including the period, growth value, direction, dates, and source values. Live results include a snapshot timestamp and ranked `[rank, label]` rows.

## How it works

Requests are sent to `POST https://api.trendsapi.ai/api` with a bearer token in the `Authorization` header. Wikipedia history requests use the lowercase source value `wikipedia` and either the `get_time_series` or `get_growth` mode. Live Wikipedia requests use the exact type `Wikipedia Trending` rather than a `source` field. Mixing these conventions can produce a 400 response.

A keyword identifies the series to retrieve, so article naming matters. For example, `Java` and `Java (programming language)` represent different series. Growth can use presets such as `7D`, `3M`, `12M`, `YTD`, or `2Y`, and it also accepts custom recent and baseline dates. Multiple growth windows are counted as one request. Live results support `limit` and `offset`; the documented `category` option applies to other feed types listed by the API.

## Setup and configuration

Install the Python package with `pip install trendsapi-wikipedia`, then set `TRENDSAPI_KEY` to a key obtained from trendsapi.ai. Python 3.9 or newer is required for the documented client. The same key is used by the HTTP API, and client construction can alternatively receive the key directly as an argument.

The package provides synchronous and asynchronous clients. Async calls can be combined with `asyncio.gather`, and each successful 200 response counts as one billed request. Time-series dataclasses can be converted with `dataclasses.asdict` for workflows such as loading the values into a pandas DataFrame.

## Tools and capabilities

- Retrieve a dated Wikipedia attention series for a topic.
- Compare recent, year-to-date, or custom date windows.
- List live Wikipedia trending pages with pagination fields.
- Read normalized values from Python dataclasses or JavaScript objects.
- Request other supported sources through the same client by passing a different `source` value where applicable.

## Limitations and notes

Wikipedia Trends API MCP server requires an API key and is subject to quota limits. A 401 indicates an invalid or missing key, while 429 indicates that the quota was reached. A 404 means that no series exists for the requested keyword and should not be retried. The client retries 5xx failures before raising an error.

Raw curl responses require the JSON string in the HTTP `body` field to be parsed a second time; the SDKs perform that decoding. The API returns indexed values, not necessarily absolute page-view volume. Absolute `volume` may be absent from individual time-series points. Use exact article titles when selecting a series, and use `type: Wikipedia Trending` for the live Wikipedia feed.

_Full upstream README: https://allmcps.com/mcp/wikipedia-trends-api-2/readme_

