Page MenuHomePhabricator

Pageviews API should allow specifying a country
Closed, DeclinedPublic

Description

The top-by-country pageviews API doesn't allow any querying of the data for a particular country. Instead, the only way to get broader data about a country is by using hundreds or thousands of requests for data on all countries, and pulling out the bits of relevant data. The Pageviews API should allow specifying a country, much like it allows specifying an access method.

(Ideally, there would be a way to request for multiple/all particular projects at once, but that's not even available for regular non-country-specific requests yet... Wikistats could make some interesting charts with that data.)

I suspect there would be more use for finding the progression and project-distribution of readers in a single country, than there would be for finding the geographic distribution of projects at a single point in time.

(Are there currently dumps for the pageviews data, as another possible alternative to loads of API requests? I haven't been able to find one.)

Event Timeline

Milimetric subscribed.

Can you explain why this is useful? As in, what is the use case. Keep in mind we don't report article views per country for privacy reasons.

Hi @Yair_rand, a pageviews top-per-country AQS endpoint was just released (docs). Does this fulfill your intended use case?

Ottomata subscribed.

Reopen if needed

Hi @Yair_rand, a pageviews top-per-country AQS endpoint was just released (docs). Does this fulfill your intended use case?

No, top-per-country deals with the most-viewed articles, not the most-viewed projects/language editions. This information is technically available using top-by-country, but only if one basically queries out the entire selection of all of the hundreds of domain options.

Please see my question from T245968#5912524, without a good reason we default to not providing data.