質問

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!

役に立ちましたか?

解決

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top