Wikipedia:Wiki ViewStats/API

From Wikipedia, the free encyclopedia

URL Parameters

base url:     https://tools.wmflabs.org/wikiviewstats/index.php

Weitere Informationen parameter, impact ...
parameter impact possible values short example(s) default version
page page title
  • page title without or
  • with wildcards
  • page=Neuromancer
  • page=User:Jack*
  • page=list*episodes*
-none-0.92
langwiki language
  • country code as per ISO 639 or
  • commons
  • m (Mediawiki)
  • meta
  • incubator
  • sources
  • outreach
  • species or
  • * for all wikis
  • lang=en
  • lang=commons
  • lang=*
your browsers default language0.92
project
or
wiki
wiki
  • or wikipedia
  • b or wikibooks
  • d or wiktionary
  • n or wikinews
  • q or wikiquote
  • s or wikisource
  • v or wikiversity
  • voy or wikivoyage
  • * (all)
  • project=d
  • project=%
  • wiki=wiktionary
  • wiki=*
wikipedia0.92 / 0.99 (alternative parameter name + values)
latest  1query period in past days
  • 30
  • 60
  • 90
  • 180
  • latest=30
300.92
datefrom  1query start date
  • 0000-00-00 (today)
  • 2013-xx-00 (xx = dedicated month)
  • 2013-xx-yy (custom: any valid date)
  • datefrom=0000-00-00
  • datefrom=2013-10-00
  • datefrom=2013-06-14
automatically calculated0.1
dateto  1query end date
  • 2013-xx-yy (custom: any valid date)
  • dateto=2013-08-23
automatically calculated0.1
type  2TOP-lists, HOT today
  • world (all pages)
  • user (users)
  • discussion (talks, discussions)
  • portal (portals)
  • project (project pages)
  • comfile (commons & file)
  • special (special pages)
  • help (help pages)
  • thanks
  • type=user
  • type=world&datefrom=2013-08-00
  • type=thanks
-none-0.1 / thanks 0.98
locale  3GUI language
  • en
  • de
  • fr
  • es
  • it
  • nl
  • pl
  • ru
  • sv
  • zh
  • ja
  • locale=es
your browsers default language0.1
favurl  4URL of wiki page where your favorites are located
  • valid url of wiki (user) page
  • favurl=https://en.wikipedia.org/wiki/User:Jack
-none-0.95
section  5Page section where favorites are located
  • Section header
  • section=My_articles
-none-0.95
Schließen
(1) 
You can either specify latest OR datefrom (dedicated month) OR datefrom + dateto (custom). If you specify all of them - Uhm, you will see what you get.
(2) 
In combination with datefrom≔0000-00-00 (today) OR datefrom≔2013-xx-00 (dedicated month). If datefrom is omitted datefrom≔0000-00-00 (today) is set automatically
(3) 
Your preferred language not yet there? Feel free to act! Leave a message.
(4) 
Only in combination with parameter section. See help for impact of this parameter
(5) 
Only in combination with parameter favurl

Examples

Query string and parameters follow the rules of RFC 1738 and RFC 3986. The first parameter ist attached to base url with "?" sign, further parameters are attached with "&" sign.

base url:     https://tools.wmflabs.org/wikiviewstats/index.php

Weitere Informationen base url + query string, result ...
base url + query string result
https://tools.wmflabs.org/wikiviewstats/index.php?page=Star_Trekhits of page title "Star Trek" (30 days)
https://tools.wmflabs.org/wikiviewstats/index.php?page=Avatar_(película)&lang=eshits of "Avatar (film)" in spanisch wikipedia (30 days)
https://tools.wmflabs.org/wikiviewstats/index.php?page=word&lang=ru&project=dhits of "word" in russian wiktionary (30 days)
https://tools.wmflabs.org/wikiviewstats/index.php?type=world&lang=zh&project=%top list of all pages in all chinese (zh) wikis (today)
↓ for subsequent examples baseurl is not shown (you can click the link anyway)
?favurl=https://de.wikipedia.org/wiki/Benutzer:Hedonil&section=Agendahits of user hedonil's articles (30 days)
Schließen


Alternatively it's possible to make an invocation using RESTful URI syntax – also known as "clean" URI-syntax[1]

As of version 0.99 there are 2 alternatives:

Weitere Informationen type, RESTful URI syntax ...
type RESTful URI syntax internal wiki link
1. fullhttps://tools.wmflabs.org/wikiviewstats/lang.wiki/latest/page[[toollabs:wikiviewstats/de/latest30/Theodor_Fontane]]
alternatively
[[toollabs:wikiviewstats/de/30/Theodor_Fontane]]
2. shorthttps://tools.wmflabs.org/wikiviewstats/lang.wiki/page[[toollabs:wikiviewstats/de.q/Theodor_Fontane]]
alternatively
[[toollabs:wikiviewstats/de.wikiquote/Theodor_Fontane]]
Schließen
  • If a parameter is not specified, default values are set
  • With this syntax only "*" as wildcard is allowed. "%" is forbidden by specification.

References

API

Related Articles

Wikiwand AI