Question

Wikipedia Search API has usage limits.

I can get the source code for the API server from here, but there is no documentation about which Wikipeida format it takes or how to deploy it.

Any help regarding this matter is greatly appreciated!

Was it helpful?

Solution

Basic steps:

  1. Download the XML dump
  2. Download the mediawiki package (the wiki itself from https://git.wikimedia.org/tree/mediawiki%2Fcore.git/HEAD/includes%2Fapi)
  3. Install Apache with Php and mysql (any AMP package), place mediawiki in the www folder.
  4. Install/Configure the media wiki. It will be empty with no pages.
  5. 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.
  6. The API can be accessed, e.g., using http:// localhost/mediawiki/api.php?format=json&action=query&titles=Albert
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top