# GET /wikipedia/pageviews: $0.002 per call

Daily Wikipedia page views for any article between two dates: a free, public measure of how much interest a topic, company, person of note or product is getting. Pass ?article=Bitcoin&start=20260801&end=20260830 (dates YYYYMMDD; add project=de.wikipedia for other languages). Human traffic only, bots excluded.

- **Price:** $0.002 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Answers cached for:** 6 hour(s)
- **Data sources:** Wikimedia Pageviews API (free)
- **Lane:** Research & news ([OpenAPI](/openapi/research.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/wiki-pageviews](/sample/wiki-pageviews). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/wiki-pageviews"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/wikipedia/pageviews?article=Bitcoin&start=20260801&end=20260814&project=en.wikipedia"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/wikipedia/pageviews?article=Bitcoin&start=20260801&end=20260814&project=en.wikipedia");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("wiki-pageviews", {"article":"Bitcoin","start":"20260801","end":"20260814","project":"en.wikipedia"});
```

## Inputs

- `article` **(required)** (string): Article title as in its URL, e.g. Bitcoin or Large_language_model (spaces allowed).
- `start` **(required)** (string): First day, YYYYMMDD (data from 2015-07-01).
- `end` **(required)** (string): Last day, YYYYMMDD.
- `project` (string; default `en.wikipedia`): Wiki, e.g. en.wikipedia (default), de.wikipedia, fr.wikipedia.

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

Example only: the shape of an answer, with placeholder addresses and made-up figures. It is not data about any real token or wallet; call the service (or its free sample) for real results.

```json
{
  "article": "Bitcoin",
  "project": "en.wikipedia",
  "days": [
    {
      "day": "2026080100",
      "views": 2186
    },
    {
      "day": "2026080200",
      "views": 2485
    },
    {
      "day": "2026080300",
      "views": 2157
    },
    {
      "day": "2026080400",
      "views": 2842
    },
    {
      "day": "2026080500",
      "views": 2551
    },
    {
      "day": "2026080600",
      "views": 2563
    },
    {
      "day": "2026080700",
      "views": 2401
    },
    {
      "day": "2026080800",
      "views": 2359
    },
    {
      "day": "2026080900",
      "views": 2157
    },
    {
      "day": "2026081000",
      "views": 2158
    },
    {
      "day": "2026081100",
      "views": 2077
    },
    {
      "day": "2026081200",
      "views": 3049
    },
    {
      "day": "2026081300",
      "views": 2156
    },
    {
      "day": "2026081400",
      "views": 2126
    }
  ],
  "source": "Wikimedia Pageviews API (CC0)"
}
```

## Related

- [GET /news](/services/news) ($0.01): Research any topic across Hacker News and headlines from major outlets (BBC, Guardian, Ars Technica, TechCrunch, crypto news and more), Lobsters, Lemmy and DEV 
- [GET /news/brief](/services/news-brief) ($0.03): AI research brief on any topic from the last 1-30 days: gathers Hacker News and headlines from major outlets, Lobsters, Lemmy and DEV, then writes a concise bri

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).