Pageview information about Wikimedia sites, which has been available for a
while through the standalone Pageviews REST API [1], is now available in
the action API as well, through the prop=pageviews [2], list=mostviewed [3]
and meta=siteviews [4] API modules. An example:

https://en.wikipedia.org/w/api.php?action=query&format=
jsonfm&errorformat=plaintext&prop=pageviews&list=mostviewed&meta=siteviews&
titles=Main+Page&formatversion=2&pvipdays=3&pvimlimit=3&pvisdays=3

The new API modules basically act as a proxy to the REST API, and are meant
as a less flexible but more convenient alternative for people who already
use the action API.


[1] https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
[2] https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bpageviews
[3] https://en.wikipedia.org/w/api.php?action=help&modules=
query%2Bmostviewed
[4] https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bsiteviews
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to