The statistics query returns the counts that describe the size of the wiki. It is short and read only, which makes it useful for a backup check or a migration check.
The query
api.php?action=query&meta=siteinfo&siprop=statistics
Counts it returns
- Pages. The number of content pages.
- Edits. The total number of saved edits.
- Users. The number of registered members.
- Files. The number of uploaded files.
- Jobs. The number of queued maintenance jobs.
Migration check. Record the counts before a migration and compare them afterwards. A difference is not always an error, but it always deserves an explanation.
The query uses the same site info call as the previous page, with the statistics property added. That pattern is common in the wiki API: one query call with a different set of properties.
{
"query": {
"statistics": {
"pages": 0,
"edits": 0,
"users": 0,
"files": 0
}
}
}
The example above shows the shape of the response. The live values depend on the wiki that answers the call.