# Wikipedia Pageviews (`wikipedia.pageviews`)

Daily human pageviews of a Wikipedia article for the last 1 to 90 days: a free proxy for public interest in a topic.

- **Route:** `POST /v1/run/wikipedia.pageviews`
- **Price:** $0.0005 per request ($0.50 per 1,000) · `cost_usd` on every response
- **Source:** Wikimedia APIs (`wikipedia`) · failover: no
- **Measured latency:** not enough calls measured yet
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `title` | string | yes |  | Exact article title |
| `language` | string | no | "en" | Language edition, e.g. en, de, fr |
| `days` | integer | no | 30 | Days to cover, ending yesterday |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `daily` | date and views per day. |
| `total_views` | Sum over the period. |
| `daily_average` | Average per day. |
| `peak` | Busiest day. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/wikipedia.pageviews \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"ChatGPT","days":7}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('wikipedia.pageviews', {'title': 'ChatGPT', 'days': 7})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run wikipedia.pageviews '{"title":"ChatGPT","days":7}'
```

Quote first (free, validates input): `POST /v1/quote/wikipedia.pageviews` with the same body.
