Given some integer n and a date d, I'd like to use the Wikipedia API to obtain the n most viewed articles in the time between d and the current date. Is this possible, and if so, how?
What I have tried so far is the following:
Use https://wikimedia.org/api/rest_v1/metrics/pageviews/top/en.wikipedia/all-access/2017/05/01 . The problems with this approach are that firstly, this seems to support no other value than
n = 1000and secondly, it aggregates views only for a single day and not an arbitrary time range.Use the query action with list
allpages(i.e. https://en.wikipedia.org/w/api.php?action=query&format=json&list=allpages) to obtain all articles, but I do not know how to filter the result such that only the most viewed articles are included.
I also checked https://stats.wikimedia.org/ but didn't find anything helpful there.