Basic steps:
- Download the XML dump
- Download the mediawiki package (the wiki itself from https://git.wikimedia.org/tree/mediawiki%2Fcore.git/HEAD/includes%2Fapi)
- Install Apache with Php and mysql (any AMP package), place mediawiki in the www folder.
- Install/Configure the media wiki. It will be empty with no pages.
- Download mwdumper jar, follow instructions in http://www.mediawiki.org/wiki/Manual:MWDumper to import the Wikipedia XML into mysql database of the locally installed mediawiki wiki. This will take a few hours.
- The API can be accessed, e.g., using http:// localhost/mediawiki/api.php?format=json&action=query&titles=Albert