문제

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?

도움이 되었습니까?

해결책

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/.

다른 팁

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/).

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top