Get pageview counts for a project.
GET
/metrics/pageviews/aggregate/{project}/{access}/{agent}/{granularity}/{start}/{end}
Pageviews data
access method and/or agent type. You can choose between daily and hourly granularity
as well.
CC0 1.0 license.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate//////'
Response Response Example
200 - Example 1
{
"items": [
{
"access": "string",
"agent": "string",
"granularity": "string",
"project": "string",
"timestamp": "string",
"views": 0
}
]
}
Request
Path Params
project
string
required
for example 'en.wikipedia.org', 'www.mediawiki.org' or 'commons.wikimedia.org'.
If you are interested in all pageviews regardless of project, use all-projects.
access
string
required
If you are interested in pageviews regardless of access method, use all-access.
agent
string
required
in pageviews regardless of agent type, use all-agents.
granularity
string
required
endpoint are hourly, daily, and monthly.
start
string
required
end
string
required
Responses
Modified at 2023-08-15 06:49:12