Wikipedia

Get Wikipedia page pageviews

Get a Wikipedia page's daily or monthly views by access method and agent.

GET/v1/wikipedia/pages/{title}/pageviews
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
7
titlestringrequiredpath

Page title on the chosen edition, e.g. `Albert Einstein`, `C++` or `Talk:Barack Obama`. URL-encode it in the path.

langstringoptionalquery

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

fromstringoptionalquery

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.

tostringoptionalquery

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.

granularitystringoptionalquery

`daily` (default) or `monthly`.

one of: daily, monthly

accessstringoptionalquery

Access method. Default: `all-access`.

one of: all-access, desktop, mobile-app, mobile-web

agentstringoptionalquery

Agent class. Default: `user`.

one of: user, spider, automated, all-agents

Response fields
18

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.

datatitle
string

Title.

dataproject
string

Project, e.g. `en.wikipedia`.

datagranularity
string

Daily or monthly rows.

one of: daily, monthly

dataaccess
string

Access method.

dataagent
string

Agent class.

datafrom
stringnullable

First day or month requested.

datato
stringnullable

Last day or month requested.

Views in the requested range.

datarows[]date
string

Day, `YYYY-MM-DD`.

datarows[]views
integernullable

Views that day; null on a day not yet counted.

≥ 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/pages/Albert%20Einstein/pageviews" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Get Wikipedia page pageviews