Code snippets in Python demonstrating how to use various modules of the MediaWiki Action API
- API:Tokens
- tokens.py: get tokens for data modifying operations
- API:Login
- login.py & clientlogin.py: login
- API:Parse
- parse.py: parse content of a page
- parse_wikitable.py: parse a section of its page and fetch its table data
- API:Search
- search.py: search for a title or a text
- API:Geosearch
- geosearch.py: search for pages nearby
- geoimagesearch.py: search for pages nearby with images
- geocoordinates.py: obtain coordinates for wiki pages nearby
- API:Opensearch
- opensearch.py: fetch results in an opensearch format
- API:Prefixsearch
- prefixsearch.py: perform a prefix search for page titles
- API:Languagesearch
- languagesearch.py: search for a language
- Article suggestion: A sample app that uses MediaWiki Action API:Search allows you to pick a category and suggest articles to write on that don't yet exist on English Wikipedia. This app uses Flask and WTForms for rendering form.
$ git clone https://github.com/srish/MediaWiki_Action_API_Code_Samples
$ cd MediaWiki_Action_API_Code_Samples
Install the necessary python modules with pip
$ python3 name_of_the_file.py #Enter any credentials if required in the file