# Wikipedia Article Pageviews API

Retrieve daily Wikipedia article pageviews to chart attention around an event, compare editorial periods or plan coverage for a specific language edition. Provide the project, article title and date range in the request path to receive daily view counts for the fixed all-access and user traffic scope, keeping article and project identifiers with each observation for reproducible comparisons.

Documentation: https://openany.si/wikipedia/wikipedia-article-pageviews/
API ID: 2acba350-8edc-49d9-90f6-e861c7ec6156
Provider: wikimedia
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/wikimedia/analytics/pageviews/{project}/{article}/{start}/{end}
Page update time: 2026-12-04T06:27:46.311Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-04T06:27:46.311Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Wikipedia Article Pageviews API

Supply project, article, start and end as path parameters, with dates in YYYYMMDD00 format. The response contains daily pageviews for all access methods, restricted to the user traffic category.

## What You Can Build with the Wikipedia Article Pageviews API

- **Plan editorial coverage**: Compare article attention over matching date ranges.
- **Study event attention**: Keep article and project fixed when examining a timeline.
- **Build a source-linked chart**: Plot timestamp/views pairs with project and traffic-classification labels.

Pass returned records to a downstream Agent for organization, comparison or reporting; additional data retrieval is a separate operation.

## Wikipedia Article Pageviews API Returned Data Fields & Response Coverage

Views are pageview counts, not unique visitors or keyword search volume. This contract does not expose hourly/monthly granularity, agent switches or automatic redirect aggregation.

| Field | Meaning |
| --- | --- |
| `items[].article` | Article identifier |
| `items[].timestamp` | Daily timestamp |
| `items[].views` | Pageview count, not unique visitors |
| `items[].access` | Fixed all-access scope |
| `items[].agent` | User traffic classification (fixed) |
| `items[].granularity` | Daily granularity (fixed) |

## Quick Start: Call the Wikipedia Article Pageviews API via REST

1. Configure OPENANY\_API\_KEY securely in your local environment and select Wikimedia.
2. The example queries Earth on en.wikipedia.org for two daily timestamps; replace the article and date range.
3. Check Selected price before running the command; execution sends a real request under the current contract.

```
curl --request GET \
  "https://api.openany.si/v1/agent-apis/wikimedia/analytics/pageviews/en.wikipedia.org/Earth/2026100100/2026100200" \
  --header "Authorization: Bearer ${OPENANY_API_KEY}"
```

## Understanding Response Examples

| Example | Provenance and scope |
| --- | --- |
| Documentation example | Documented response example showing fields and structure. |

Use the documented request as a calling template; consult the [public API contract](https://openany.si/api/v1/agent-apis/2acba350-8edc-49d9-90f6-e861c7ec6156) and the actual response for fields and status.

## Connect AI Agents via OpenAny MCP

Connect to https://mcp.openany.si, discover with search\_apis, then read the current contract and api\_version with get\_api. Use run\_api only after approval of inputs, price and call count; keep the key in secure client configuration.

**Agent prompt:** Read daily user pageviews for Earth on en.wikipedia.org for my chosen date range. Inspect the Wikimedia contract and current billing first, obtain execution approval if applicable, then return timestamp/views with project, agent and access labels.

## Pricing & Billing Rules

- No subscription; check the selected implementation’s contract and Selected price for the current amount and unit.
- Browsing, preparing inputs and viewing examples do not execute the API; curl and run\_api do.
- Extra pages, retries and chained requests are separate executions; review their billing and spending limit first.

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Wikipedia Article Pageviews API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "project": {
          "type": "string",
          "description": "Wikipedia project domain, such as en.wikipedia.org."
        },
        "article": {
          "type": "string",
          "description": "Article title with spaces replaced by underscores."
        },
        "start": {
          "type": "string",
          "description": "Start date in YYYYMMDD00 format."
        },
        "end": {
          "type": "string",
          "description": "End date in YYYYMMDD00 format."
        }
      },
      "required": [
        "project",
        "article",
        "start",
        "end"
      ]
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "article": {
            "type": "string"
          },
          "granularity": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "views": {
            "type": "integer"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/wikimedia/analytics/pageviews/en.wikipedia.org/Earth/2026100100/2026100200' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "items": [
    {
      "access": "all-access",
      "agent": "user",
      "article": "Earth",
      "granularity": "daily",
      "project": "en.wikipedia",
      "timestamp": "2026100100",
      "views": 8637
    },
    {
      "access": "all-access",
      "agent": "user",
      "article": "Earth",
      "granularity": "daily",
      "project": "en.wikipedia",
      "timestamp": "2026100200",
      "views": 9127
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Do I need a Wikipedia subscription or account cookie?
No. The published request does not require a Wikipedia account cookie or subscription. OpenAny API-key authentication still applies.

### Are pageviews the same as unique readers?
No. views counts pageviews. It is not a unique-reader or keyword-search-volume metric.

### How should I format dates and article names?
Use YYYYMMDD00 for start/end and underscores for spaces in article names, then encode the path safely.

### Can I choose bots, hourly data or monthly totals?
Not with this contract. It fixes all-access, user and daily; do not add unsupported inputs or silently reinterpret the data.

### Does this route aggregate translations or redirects automatically?
No such aggregation is documented here. Query the intended project/article explicitly and keep that scope in comparisons.

### How are requests billed?
Check the current billing status before running. The current API contract determines whether requests are free or charged; each additional article or date-range query is a separate request.

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
