Get pageviews by country and access method.
GET
/metrics/pageviews/top-by-country/{project}/{access}/{year}/{month}
Pageviews data
Because of privacy reasons, pageviews are given in a bucketed format, and countries
with less than 100 views do not get reported.
Stability: experimental
CC0 1.0 license.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://wikimedia.org/api/rest_v1/metrics/pageviews/top-by-country////'
Response Response Example
200 - Example 1
{
"items": [
{
"access": "string",
"countries": [
{
"country": "string",
"rank": 0,
"views": 0
}
],
"month": "string",
"project": "string",
"year": "string"
}
]
}
Request
Path Params
project
string
required
for example 'en.wikipedia.org', 'www.mediawiki.org' or 'commons.wikimedia.org'.
access
string
required
If you are interested in pageviews regardless of access method, use all-access.
year
string
required
month
string
required
Responses
Modified at 2023-08-15 06:49:12