Wikipedia

Get Wikipedia site pageviews

Get a Wikipedia edition's site-wide pageviews or unique-device totals.

GET/v1/wikipedia/pageviews/site
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
5
langstringquery

Wikimedia edition code, e.g. `en`, `de`, `ja`, `simple` or `zh-min-nan`. Default: `en`.

metricstringquery

`views` (default) or `unique_devices`.

one of: views, unique_devices

fromstringquery

Start of the window as a real `YYYY-MM-DD` day (read as midnight UTC) or a full ISO 8601 date-time with a zone.

tostringquery

End of the window as a real `YYYY-MM-DD` day (read as midnight UTC) or a full ISO 8601 date-time with a zone.

granularitystringquery

`daily` (default) or `monthly`.

one of: daily, monthly

Response fields
20

Endpoint-specific response payload.

datalookupStatus
string

Whether the entity, page or data set exists. A missing entity is `not_found`; an existing entity with no rows is `found` with `empty: true`.

one of: found, not_found

datalang
string

Edition code.

datametric
string

Whether the rows are views or unique devices.

one of: views, unique_devices

datagranularity
string

Daily or monthly rows.

one of: daily, monthly

datafrom
stringnullable

First day or month requested.

datato
stringnullable

Last day or month requested.

Site-wide totals in the requested range.

datarows[]date
string

Day or month, ISO 8601.

datarows[]project
stringnullable

Project.

datarows[]accessSite
stringnullable

Site access class.

datarows[]views
integernullable

Views.

≥ 0

datarows[]devices
integernullable

Unique devices.

≥ 0

datarows[]offset
integernullable

Devices offset.

≥ 0

datarows[]underestimate
integernullable

Underestimate of unique devices.

≥ 0

dataempty
boolean

Whether the answer is a valid empty result rather than missing.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/wikipedia/pageviews/site?lang=en" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Get Wikipedia site pageviews