https://wikimedia.org/api/rest_v1/metrics/pageviews/v3/top_pages_per_editor/34722510/monthly/20260101/20260201 claims that:
{ "context": { "endpoint": "pageviews/v3/top_pages_per_editor", "user_central_id": 34722510, "granularity": "monthly", "start": "2026-01-01T00:00:00.000Z", "end": "2026-02-01T00:00:00.000Z" }, "items": [ { "timestamp": "2026-01-01T00:00:00.000Z", "top_k": 10, "rank_items": [ { "rank": 1, "wiki_id": "metawiki", "page_id": 135805, "view_count": 75149 }, // [...] ] } ] }
I interpret this as "in January 2026, metawiki's page 135805 was visited 75149 times". However, I was unable to find this number when cross-checking with pageviews dataset itself.
According to the query, the pageviews are computed for the calendar month represented by the timestamp key. For this case, this should mean January 2026.
Pageviews tool
I checked the Pageviews tool, which says:
putting the number of January 2026 pageviews at Pageviews: 26,826 (significantly longer than the 75k figure given by the other tool).
wmf.pageview_hourly
spark-sql (default)> select sum(view_count)
> from wmf.pageview_hourly
> where year=2026 and month=1
> and project = 'meta.wikimedia'
> and page_id = 135805
> and agent_type = 'user';
sum(view_count)
29051
Time taken: 84.412 seconds, Fetched 1 row(s)
spark-sql (default)>this puts the number of pageviews at 29051 (slightly higher than the Pageviews tool, but attributable to query looking for something slightly different).
Intermediary tables
The wmf_readership.pageview_per_editor_per_page_daily and wmf_readership.pageviews_top_pages_per_editor intermediary tables have the wrong numbers:
spark-sql (default)>
>
>
>
> select sum(view_count) from wmf_readership.pageview_per_editor_per_page_daily
> where user_central_id = 34722510
> and wiki_id = 'metawiki'
> and page_id = 135805
> and day >= DATE '2026-01-01' and day < DATE '2026-02-01'
> ;
sum(view_count)
75149
Time taken: 33.627 seconds, Fetched 1 row(s)
spark-sql (default)> select view_count from wmf_readership.pageviews_top_pages_per_editor
> where user_central_id = 34722510
> and wiki_id = 'metawiki'
> and page_id = 135805
> and granularity = 'monthly'
> and dt = TIMESTAMP '2026-01-01 00:00:00.000'
> ;
view_count
75149
Time taken: 10.656 seconds, Fetched 1 row(s)
spark-sql (default)>What is the cause for the discrepancy? Are we double-counting certain pageviews? Or are pageviews defined differently in this specific endpoint?
