Get total number of articles from a MediaWiki wiki programmatically
-
24-02-2021 - |
Pergunta
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.
Solução
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.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow