0

How can I get the daily pageview of wikipedia page.

for example, I want to get the history of daily page view of this page http://en.wikipedia.org/wiki/Programming
Is it possible?

MrSmith42
  • 9,961
  • 6
  • 38
  • 49
bbnn
  • 3,505
  • 10
  • 50
  • 68
  • there is this data, http://dammit.lt/wikistats/ but i dont know how to process gz file in PHP (fast) – bbnn Nov 09 '10 at 16:12

3 Answers3

1

There is a new (December 2015) API here: https://wikimedia.org/api/rest_v1/?doc

For example, to get the number of views of http://en.wiktionary.org/beauty on 2/12/2015:

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wiktionary/all-access/all-agents/beauty/daily/20151202/20151203

Response:

{
  "items": [
    {
      "project": "en.wiktionary",
      "article": "beauty",
      "granularity": "daily",
      "timestamp": "2015120200",
      "access": "all-access",
      "agent": "all-agents",
      "views": 34
    }
  ]
}

You can also see top 1000 pages on a wiki (/metrics/pageviews/top/) and aggregate pageviews on a wiki (/metrics/pageviews/aggregate/).

alkamid
  • 6,970
  • 4
  • 28
  • 39
1

There doesn't seem to be an API for it, but a website exists at stats.grok.se that processes the (very large) files from http://dammit.lt/wikistats/.

Anomie
  • 92,546
  • 13
  • 126
  • 145
0

There are (at least) two new initiatives to build an API around Wikipedia pageviews: https://www.mediawiki.org/wiki/Analytics/Hypercube and http://www.mediawiki.org/wiki/User:GWicke/Notes/Storage. Both are in the planning stage but feel free to chime in with specific use cases.

DrDee
  • 3,549
  • 6
  • 30
  • 37