Page MenuHomePhabricator

Expose the number of entities of each type for Wikibase somewhere in the API
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

Easily show how many entities of each type there are in a wikibase. This should probably be added to the stats; for example perhaps it should be done using https://www.mediawiki.org/wiki/Manual:Hooks/SpecialStatsAddExtra

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Displaying how many entities of each type there are when adding data to wikibase.world

Benefits (why should this be implemented?):

It would mean I don't need to paginate through all pages
${actionApi}?action=query&list=allpages&apnamespace=${propertyNamespaceId}&aplimit=500&format=json${extraPagigParams};`

Event Timeline

Tarrow renamed this task from Expose the number of entities of each time for Wikibase somewhere in the API to Expose the number of entities of each type for Wikibase somewhere in the API.Feb 17 2025, 3:35 PM

A side note here is that wikibase.world now includes a "highest item id" property https://wikibase.world/wiki/Property:P67
As this is a rough estimate of size, without needing to paginate through all items counting them

We will also ask the Wikidata data analyst if it would be useful if we did this in the stats and they used the info for the Grafana charts (instead of doing the SQL called directly to the db).