A wrapper for the MediaWiki API, aimed particularly at the Wikimedia 'production' wikis, such as Wikipedia. It can be used to retrieve page text, information about users or the history of pages, and elements of the category tree.
An R API wrapper for MediaWiki, optimised for the Wikimedia Foundation MediaWiki instances, such as Wikipedia.
Author: Oliver Keyes
WikipediR is a wrapper around the MediaWiki API, optimised for the Wikimedia Foundation's production sites, such as Wikipedia. It is written in and for R, a statistical environment and associated programming language in heavy use by HCI researchers that, somehow, escaped having an API wrapper until now.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
For the most recent version, on CRAN:
For the development version:
WikipediR currently lacks:
These issues will be solved in time; if there is a particular feature you want, open an issue here on github: I can't prioritise if I don't know what people are trying to do :).
random_pagenow allows you to return more than one page.
page_backlinksdoes as well; thanks to Brock Tibert for the code.
limitintroduced as an argument to pages_in_category - thanks to Ben Marwick for finding the bug.
limitintroduced as an argument to page_links - thanks to Hui Li of the Universität Heidelberg for the initial report.
NEW FEATURES *Random pages can now be retrieved with random_page *pageID based querying is available *Custom user
DEVELOPMENT *Doc tweaks and some simplification of argument parsing around page_content and random_page *Additional unit tests *query() marked as exportable to allow simple third-party plugins into WikipediR