Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get total number of articles from a MediaWiki wiki programmatically

How can I get the total number of articles using the MediaWiki API?

I couldn't find it in the docs:

  • http://www.mediawiki.org/wiki/API:Search
  • http://en.wikipedia.org/wiki/Help:Searching#Search_engine_features

Even a rough approximation is fine.

like image 445
Mulone Avatar asked Nov 08 '11 13:11

Mulone


1 Answers

Use the link http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=statistics and read the property articles of the statistics tag.

like image 131
celtschk Avatar answered Oct 24 '22 08:10

celtschk