{
"schemes": [
"https"
],
"swagger": "2.0",
"info": {
"description": "Page Analytics provides data about page views for Wikimedia projects.\nData provided by this API is available under the [CC0 1.0 license](https://creativecommons.org/publicdomain/zero/1.0/).",
"title": "Wikimedia Page Analytics",
"termsOfService": "https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use",
"contact": {},
"version": "1"
},
"host": "wikimedia.org",
"basePath": "/api/rest_v1/metrics",
"paths": {
"/legacy/pagecounts/aggregate/{project}/{access-site}/{granularity}/{start}/{end}": {
"get": {
"description": "Returns a time series of numbers of page views for a Wikimedia project, including page views from both users and bots. This endpoint provides data from January 2008 to July 2016.",
"produces": [
"application/json"
],
"summary": "Get number of page views (legacy)",
"parameters": [
{
"type": "string",
"example": "en.wikipedia.org",
"description": "Domain and subdomain of a Wikimedia project. For all projects, use `all-projects`",
"name": "project",
"in": "path",
"required": true
},
{
"enum": [
"all-sites",
"desktop-site",
"mobile-site"
],
"type": "string",
"example": "all-sites",
"description": "Method of access",
"name": "access-site",
"in": "path",
"required": true
},
{
"enum": [
"hourly",
"daily",
"monthly"
],
"type": "string",
"example": "monthly",
"description": "Time interval between data points",
"name": "granularity",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2015010100",
"description": "First day and hour to include in YYYYMMDDHH format",
"name": "start",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2016010100",
"description": "Last day and hour to include in YYYYMMDDHH format. For hourly and daily granularities, this value is inclusive. For monthly granularity, this value is exclusive",
"name": "end",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.LegacyResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/aggregate/{project}/{access}/{agent}/{granularity}/{start}/{end}": {
"get": {
"description": "Returns a time series of numbers of page views for a Wikimedia project.",
"produces": [
"application/json"
],
"summary": "Get number of page views",
"parameters": [
{
"type": "string",
"example": "en.wikipedia.org",
"description": "Domain and subdomain of a Wikimedia project. For all projects, use `all-projects`",
"name": "project",
"in": "path",
"required": true
},
{
"enum": [
"all-access",
"desktop",
"mobile-app",
"mobile-web"
],
"type": "string",
"example": "all-access",
"description": "Method of access",
"name": "access",
"in": "path",
"required": true
},
{
"enum": [
"all-agents",
"user",
"spider",
"automated"
],
"type": "string",
"example": "all-agents",
"description": "Type of user agent",
"name": "agent",
"in": "path",
"required": true
},
{
"enum": [
"hourly",
"daily",
"monthly"
],
"type": "string",
"example": "monthly",
"description": "Time interval between data points",
"name": "granularity",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2023010100",
"description": "First day and hour to include in YYYYMMDDHH format",
"name": "start",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2024010100",
"description": "Last day and hour to include in YYYYMMDDHH format",
"name": "end",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.AggregateResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/per-article/{project}/{access}/{agent}/{article}/{granularity}/{start}/{end}": {
"get": {
"description": "Returns a time series of numbers of page views for a wiki page.",
"produces": [
"application/json"
],
"summary": "Get number of page views for a page",
"parameters": [
{
"type": "string",
"example": "en.wikipedia.org",
"description": "Domain and subdomain of a Wikimedia project",
"name": "project",
"in": "path",
"required": true
},
{
"enum": [
"all-access",
"desktop",
"mobile-app",
"mobile-web"
],
"type": "string",
"example": "all-access",
"description": "Method of access",
"name": "access",
"in": "path",
"required": true
},
{
"enum": [
"all-agents",
"user",
"spider",
"automated"
],
"type": "string",
"example": "all-agents",
"description": "Type of user agent",
"name": "agent",
"in": "path",
"required": true
},
{
"type": "string",
"example": "Jupiter",
"description": "Page title in URL-encoded format. The API sandbox encodes titles automatically",
"name": "article",
"in": "path",
"required": true
},
{
"enum": [
"daily",
"monthly"
],
"type": "string",
"example": "monthly",
"description": "Time interval between data points",
"name": "granularity",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2023010100",
"description": "First day and hour to include in YYYYMMDDHH format",
"name": "start",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2024010100",
"description": "Last day and hour to include in YYYYMMDDHH format",
"name": "end",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.PerArticleResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/top-by-country/{project}/{access}/{year}/{month}": {
"get": {
"description": "Returns the approximate number of page views for a Wikimedia project, split by country of origin.\nTo protect the privacy of readers, this endpoint only returns data for countries with more than 100 page views.",
"produces": [
"application/json"
],
"summary": "Get number of page views by country",
"parameters": [
{
"type": "string",
"example": "en.wikipedia.org",
"description": "Domain and subdomain of a Wikimedia project. For all projects, use `all-projects`",
"name": "project",
"in": "path",
"required": true
},
{
"enum": [
"all-access",
"desktop",
"mobile-app",
"mobile-web"
],
"type": "string",
"example": "all-access",
"description": "Method of access",
"name": "access",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2023",
"description": "Year in YYYY format",
"name": "year",
"in": "path",
"required": true
},
{
"type": "string",
"example": "01",
"description": "Month in MM format",
"name": "month",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.TopByCountryResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/top-per-country/{country}/{access}/{year}/{month}/{day}": {
"get": {
"description": "Lists the 1000 most-viewed pages for a given country, across all Wikimedia projects, excluding page views from bots and web crawlers.\nTo protect the privacy of readers, this endpoint omits countries and pages with 1000 or fewer views.",
"produces": [
"application/json"
],
"summary": "List most-viewed pages for a country",
"parameters": [
{
"type": "string",
"example": "FR",
"description": "Country code in the ISO 3166-1 alpha-2 format",
"name": "country",
"in": "path",
"required": true
},
{
"enum": [
"all-access",
"desktop",
"mobile-app",
"mobile-web"
],
"type": "string",
"example": "all-access",
"description": "Method of access",
"name": "access",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2023",
"description": "Year in YYYY format",
"name": "year",
"in": "path",
"required": true
},
{
"type": "string",
"example": "01",
"description": "Month in MM format",
"name": "month",
"in": "path",
"required": true
},
{
"type": "string",
"example": "01",
"description": "Day in DD format",
"name": "day",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.TopPerCountryResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/top/{project}/{access}/{year}/{month}/{day}": {
"get": {
"description": "Lists the 1000 most-viewed pages on a Wikimedia project.",
"produces": [
"application/json"
],
"summary": "List most-viewed pages",
"parameters": [
{
"type": "string",
"example": "en.wikipedia.org",
"description": "Domain and subdomain of a Wikimedia project",
"name": "project",
"in": "path",
"required": true
},
{
"enum": [
"all-access",
"desktop",
"mobile-app",
"mobile-web"
],
"type": "string",
"example": "all-access",
"description": "Method of access",
"name": "access",
"in": "path",
"required": true
},
{
"type": "string",
"example": "2023",
"description": "Year in YYYY format",
"name": "year",
"in": "path",
"required": true
},
{
"type": "string",
"example": "01",
"description": "Month in MM format",
"name": "month",
"in": "path",
"required": true
},
{
"type": "string",
"example": "01",
"description": "Day in DD format, or `all-days`",
"name": "day",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.TopResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/v3/per_editor/{user_central_id}/{granularity}/{start}/{end}": {
"get": {
"description": "Returns a timeseries of pageview counts that an editor's edited pages have received. The list of pages for which pageview counts are summed is the list of pages ever edited by the user on the resulting timeseries date. E.g. if the user edited page A on 2023-01-01 and page B on 2023-01-02, then the pageview counts for 2023-01-01 will be the sum of the pageview counts for page A, and the pageview counts for 2023-01-02 will be the sum of the pageview counts for page A and page B. Please note that this endpoint is Analytics API v3, and may not match exactly with analytics API v1. E.g. all params and response keys use snake_case, end date parameters are exclusive, and response format has a context object and items array.",
"produces": [
"application/json"
],
"summary": "Returns a timeseries of pageview counts that an editor's edited pages have received.",
"parameters": [
{
"type": "integer",
"example": 12345,
"description": "Global / central user id (via CentralAuth)",
"name": "user_central_id",
"in": "path",
"required": true
},
{
"enum": [
"daily",
"monthly"
],
"type": "string",
"example": "monthly",
"description": "Time interval between data points",
"name": "granularity",
"in": "path",
"required": true
},
{
"type": "string",
"example": "20250101",
"description": "First day to include in YYYYMMDD format",
"name": "start",
"in": "path",
"required": true
},
{
"type": "string",
"example": "20260101",
"description": "Last day to include in YYYYMMDD format",
"name": "end",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.PerEditorResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
},
"/pageviews/v3/top_pages_per_editor/{user_central_id}/{granularity}/{start}/{end}": {
"get": {
"description": "Returns a timeseries of rankings, each data point shows the editor's top edited pages with most pageview counts in that time period. The list of pages for which pageview counts are summed is the list of pages ever edited by the user on the resulting timeseries date. Please note that this endpoint is Analytics API v3, and may not match exactly with analytics API v1. E.g. all params and response keys use snake_case, end date parameters are exclusive, and response format has a context object and items array.",
"produces": [
"application/json"
],
"summary": "Returns a timeseries of rankings, each data point shows the editor's top edited pages with most pageviews.",
"parameters": [
{
"type": "integer",
"example": 12345,
"description": "Global / central user id (via CentralAuth)",
"name": "user_central_id",
"in": "path",
"required": true
},
{
"enum": [
"monthly"
],
"type": "string",
"example": "monthly",
"description": "Time interval between data points, currently only monthly supported",
"name": "granularity",
"in": "path",
"required": true
},
{
"type": "string",
"example": "20250101",
"description": "First month to include in YYYYMMDD format",
"name": "start",
"in": "path",
"required": true
},
{
"type": "string",
"example": "20260101",
"description": "Last month to include in YYYYMMDD format",
"name": "end",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entities.TopPagesPerEditorResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"method": {
"type": "string"
},
"status": {
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},
"uri": {
"type": "string"
}
}
}
}
}
}
}
},
"definitions": {
"entities.Aggregate": {
"type": "object",
"properties": {
"access": {
"description": "Method of access",
"type": "string",
"example": "all-access"
},
"agent": {
"description": "Type of user agent",
"type": "string",
"example": "all-agents"
},
"granularity": {
"description": "Time interval between data points",
"type": "string",
"example": "monthly"
},
"project": {
"description": "Wikimedia project domain and subdomain",
"type": "string",
"example": "en.wikipedia"
},
"timestamp": {
"description": "Timestamp in YYYYMMDDHH format",
"type": "string",
"example": "2023010100"
},
"views": {
"description": "Number of page views",
"type": "integer",
"example": 327909958
}
}
},
"entities.AggregateResponse": {
"type": "object",
"properties": {
"items": {
"description": "Top-level response array",
"type": "array",
"items": {
"$ref": "#/definitions/entities.Aggregate"
}
}
}
},
"entities.Article": {
"type": "object",
"properties": {
"article": {
"description": "Page title in URL-encoded format",
"type": "string",
"example": "Main_Page"
},
"rank": {
"description": "Page rank",
"type": "integer",
"example": 1
},
"views": {
"description": "Number of page views",
"type": "integer",
"example": 4565816
}
}
},
"entities.Country": {
"type": "object",
"properties": {
"country": {
"description": "Country code in ISO 3166-1 alpha-2 format",
"type": "string",
"example": "PH"
},
"rank": {
"description": "Country rank",
"type": "integer",
"example": 7
},
"views": {
"description": "Range of page views",
"type": "string",
"example": "100000-999999"
},
"views_ceil": {
"description": "Approximate number of page views",
"type": "integer",
"example": 210000
}
}
},
"entities.Legacy": {
"type": "object",
"properties": {
"access-site": {
"description": "Method of access",
"type": "string",
"example": "all-sites"
},
"count": {
"description": "Number of page views",
"type": "integer",
"example": 9589069146
},
"granularity": {
"description": "Time interval between data points",
"type": "string",
"example": "monthly"
},
"project": {
"description": "Wikimedia project domain and subdomain",
"type": "string",
"example": "en.wikipedia"
},
"timestamp": {
"description": "Timestamp in YYYYMMDDHH format",
"type": "string",
"example": "2015010100"
}
}
},
"entities.LegacyResponse": {
"type": "object",
"properties": {
"items": {
"description": "Top-level response array",
"type": "array",
"items": {
"$ref": "#/definitions/entities.Legacy"
}
}
}
},
"entities.PerArticle": {
"type": "object",
"properties": {
"access": {
"description": "Method of access",
"type": "string",
"example": "all-access"
},
"agent": {
"description": "Type of user agent",
"type": "string",
"example": "all-agents"
},
"article": {
"description": "Page title in URL-encoded format",
"type": "string",
"example": "Jupiter"
},
"granularity": {
"description": "Time interval between data points",
"type": "string",
"example": "monthly"
},
"project": {
"description": "Wikimedia project domain and subdomain",
"type": "string",
"example": "en.wikipedia"
},
"timestamp": {
"description": "Timestamp in YYYYMMDDHH format",
"type": "string",
"example": "2023010100"
},
"views": {
"description": "Number of page views",
"type": "integer",
"example": 182693
}
}
},
"entities.PerArticleResponse": {
"type": "object",
"properties": {
"items": {
"description": "Top-level response array",
"type": "array",
"items": {
"$ref": "#/definitions/entities.PerArticle"
}
}
}
},
"entities.PerCountryArticle": {
"type": "object",
"properties": {
"article": {
"description": "Page title in URL-encoded format",
"type": "string",
"example": "Main_Page"
},
"project": {
"description": "Wikimedia project domain and subdomain",
"type": "string",
"example": "en.wikipedia"
},
"rank": {
"description": "Page rank",
"type": "integer",
"example": 6
},
"views_ceil": {
"description": "Approximate number of page views",
"type": "integer",
"example": 47700
}
}
},
"entities.PerEditorContext": {
"type": "object",
"properties": {
"end": {
"description": "Last date of the time period in ISO-8601 format (exclusive: end date is not included in the response)",
"type": "string",
"example": "2026-01-01T00:00:00.000Z"
},
"endpoint": {
"description": "API endpoint used",
"type": "string",
"example": "pageviews/v3/per_editor"
},
"granularity": {
"description": "Time interval between data points (e.g. daily, monthly)",
"type": "string",
"example": "monthly"
},
"start": {
"description": "First date of the time period in ISO-8601 format",
"type": "string",
"example": "2025-01-01T00:00:00.000Z"
},
"user_central_id": {
"description": "Global / central user id (via CentralAuth)",
"type": "integer",
"example": 12345
}
}
},
"entities.PerEditorItem": {
"type": "object",
"properties": {
"timestamp": {
"description": "Timestamp in ISO 8601 format",
"type": "string",
"example": "2025-01-01T00:00:00.000Z"
},
"view_count": {
"description": "Number of pageviews",
"type": "integer",
"example": 1250
}
}
},
"entities.PerEditorResponse": {
"type": "object",
"properties": {
"context": {
"$ref": "#/definitions/entities.PerEditorContext"
},
"items": {
"description": "Array of timeseries results",
"type": "array",
"items": {
"$ref": "#/definitions/entities.PerEditorItem"
}
}
}
},
"entities.Top": {
"type": "object",
"properties": {
"access": {
"description": "Method of access",
"type": "string",
"example": "all-access"
},
"articles": {
"description": "Array of article objects",
"type": "array",
"items": {
"$ref": "#/definitions/entities.Article"
}
},
"day": {
"description": "Day in DD format",
"type": "string",
"example": "01"
},
"month": {
"description": "Month in MM format",
"type": "string",
"example": "01"
},
"project": {
"description": "Wikimedia project domain and subdomain",
"type": "string",
"example": "en.wikipedia"
},
"year": {
"description": "Year in YYYY format",
"type": "string",
"example": "2023"
}
}
},
"entities.TopByCountry": {
"type": "object",
"properties": {
"access": {
"description": "Method of access",
"type": "string",
"example": "all-access"
},
"countries": {
"description": "Array of country objects",
"type": "array",
"items": {
"$ref": "#/definitions/entities.Country"
}
},
"month": {
"description": "Month in MM format",
"type": "string",
"example": "01"
},
"project": {
"description": "Wikimedia project domain and subdomain",
"type": "string",
"example": "en.wikipedia"
},
"year": {
"description": "Year in YYYY format",
"type": "string",
"example": "2023"
}
}
},
"entities.TopByCountryResponse": {
"type": "object",
"properties": {
"items": {
"description": "Top-level response array",
"type": "array",
"items": {
"$ref": "#/definitions/entities.TopByCountry"
}
}
}
},
"entities.TopPagesPerEditorContext": {
"type": "object",
"properties": {
"end": {
"description": "Last date of the time period in ISO-8601 format (exclusive: end date is not included in the response)",
"type": "string",
"example": "2026-01-01T00:00:00.000Z"
},
"endpoint": {
"description": "API endpoint used",
"type": "string",
"example": "pageviews/v3/top_pages_per_editor"
},
"granularity": {
"description": "Time interval between data points (currently only monthly)",
"type": "string",
"example": "monthly"
},
"start": {
"description": "First date of the time period in ISO-8601 format",
"type": "string",
"example": "2025-01-01T00:00:00.000Z"
},
"user_central_id": {
"description": "Global / central user id (via CentralAuth)",
"type": "integer",
"example": 12345
}
}
},
"entities.TopPagesPerEditorRankItem": {
"type": "object",
"properties": {
"page_id": {
"description": "Id of the page in question within its wiki",
"type": "integer",
"example": 12345
},
"rank": {
"description": "Rank number of the page in question",
"type": "integer",
"example": 1
},
"view_count": {
"description": "Number of pageviews for the page in question",
"type": "integer",
"example": 1250
},
"wiki_id": {
"description": "Id of the wiki the page in question belongs to",
"type": "string",
"example": "enwiki"
}
}
},
"entities.TopPagesPerEditorResponse": {
"type": "object",
"properties": {
"context": {
"description": "Context object",
"allOf": [
{
"$ref": "#/definitions/entities.TopPagesPerEditorContext"
}
]
},
"items": {
"description": "Array of timeseries results",
"type": "array",
"items": {
"$ref": "#/definitions/entities.TopPagesPerEditorResponseItem"
}
}
}
},
"entities.TopPagesPerEditorResponseItem": {
"type": "object",
"properties": {
"rank_items": {
"description": "Array of ranked pages",
"type": "array",
"items": {
"$ref": "#/definitions/entities.TopPagesPerEditorRankItem"
}
},
"timestamp": {
"description": "Timestamp in ISO 8601 format",
"type": "string",
"example": "2025-01-01T00:00:00.000Z"
},
"top_k": {
"description": "The max number of pages ranked for this data point",
"type": "integer",
"example": 10
}
}
},
"entities.TopPerCountry": {
"type": "object",
"properties": {
"access": {
"description": "Method of access",
"type": "string",
"example": "all-access"
},
"articles": {
"description": "Array of article objects",
"type": "array",
"items": {
"$ref": "#/definitions/entities.PerCountryArticle"
}
},
"country": {
"description": "Country code in ISO 3166-1 alpha-2 format",
"type": "string",
"example": "FR"
},
"day": {
"description": "Day in DD format",
"type": "string",
"example": "01"
},
"month": {
"description": "Month in MM format",
"type": "string",
"example": "01"
},
"year": {
"description": "Year in YYYY format",
"type": "string",
"example": "2023"
}
}
},
"entities.TopPerCountryResponse": {
"type": "object",
"properties": {
"items": {
"description": "Top-level response array",
"type": "array",
"items": {
"$ref": "#/definitions/entities.TopPerCountry"
}
}
}
},
"entities.TopResponse": {
"type": "object",
"properties": {
"items": {
"description": "Top-level response array",
"type": "array",
"items": {
"$ref": "#/definitions/entities.Top"
}
}
}
}
}
}