You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Analytics/AQS/Legacy Pagecounts

From Wikitech-static
< Analytics‎ | AQS
Revision as of 18:57, 7 April 2017 by imported>Nuria
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page documents a public API developed and maintained by the Wikimedia Foundation that serves analytical data about pagecounts of Wikipedia and its sister projects. Pagecount is the legacy definition of what we now call "pageview". Pagecounts agreggated per project are available since December 2007 to December 2016. The main difference among pagecounts and the current pageview data is lack of filtering of self-reported bots, thus automated and human traffic are reported together.

Quick Start

Pagecounts

Daily Counts

Get a daily pagecount timeseries of en.wikipedia for the month of October 2010:

GET https://wikimedia.org/api/rest_v1/metrics/legacy/pagecounts/aggregate/en.wikipedia.org/all-sites/daily/2010100100/2010103100

Monthly Counts

Get a pagecount monthly timeseries of de.wikipedia for 2010 and 2012

GEThttps://wikimedia.org/api/rest_v1/metrics/legacy/pagecounts/aggregate/de.wikipedia.org/all-sites/monthly/2010010100/2012123100

Get a pagecount monthly timeseries of de.wikipedia for 2010 and 2012 only mobile data

GEThttps://wikimedia.org/api/rest_v1/metrics/legacy/pagecounts/aggregate/de.wikipedia.org/mobile-site/monthly/2010010100/2012123100

Get a pagecount monthly timeseries of de.wikipedia for 2010 and 2012 only desktop data

GEThttps://wikimedia.org/api/rest_v1/metrics/legacy/pagecounts/aggregate/de.wikipedia.org/desktop-site/monthly/2010010100/2012123100

Pagecounts for ALL projects

Get a pagecount monthly timeseries for all projects, all sites since data is available

GEThttps://wikimedia.org/api/rest_v1/metrics/legacy/pagecounts/aggregate/all-projects/all-sites/monthly/2007120918/2017040100

Get a pagecount monthly timeseries for all projects, all sites since data is available, desktop views only

GEThttps://wikimedia.org/api/rest_v1/metrics/legacy/pagecounts/aggregate/all-projects/desktop-site/monthly/2007120918/2017040100

The API

What is it?

The API is a collection of REST endpoints that serve analytical data about pageviews in Wikimedia's projects. It's developed and maintained by WMF's Analytics and Services teams, and is implemented using Analytics' Hadoop cluster and RESTBase. This API is meant to be used by anyone interested in pageview statistics on Wikimedia wikis: Foundation, communities, and the rest of the world.

How to access

The API is accessible via https at wikimedia.org/api/rest_v1. As it is public, it doesn't need authentication and it supports CORS. The urls are structured like this:

/metrics/legacy/pagecounts/{endpoint}/{parameter 1}/{parameter 2}/.../{parameter N}

Technical Reference

Please, see AQS's RESTBase docs for a complete and interactive technical reference on API endpoints.

Changes and known problems since December 2007

Date from Date until Task record_version Details
December 2017 end of data T162157} * No data for metawiki, too many quality issues