127

On my Wikipedia user page, I run a Wikipedia script that displays my statistics (number of pages edited, number of new pages, monthly activity, etc.).

I'd like to put this information on my blog.

Is there an API that would allow me to do something like this?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
rbrayb
  • 46,440
  • 34
  • 114
  • 174
  • 1
    Check out [Extract the first paragraph from a Wikipedia article](http://stackoverflow.com/questions/4460921/extract-the-first-paragraph-from-a-wikipedia-article-python). – martineau Dec 16 '10 at 22:28

5 Answers5

100

MediaWiki's API is running on Wikipedia (docs). You can also use the Special:Export feature to dump data and parse it yourself.

More information.

Ross
  • 46,186
  • 39
  • 120
  • 173
18

Wikipedia is built on MediaWiki, and here's the MediaWiki API.

Hank Gay
  • 70,339
  • 36
  • 160
  • 222
15

If you want to extract structured data from Wikipedia, you may consider using DbPedia http://dbpedia.org/

It provides means to query data using given criteria using SPARQL and returns data from parsed Wikipedia infobox templates

Here is a quick example how it could be done in .NET http://www.kozlenko.info/blog/2010/07/20/executing-sparql-query-on-wikipedia-in-net/

There are some SPARQL libraries available for multiple platforms to make queries easier

Maksym Kozlenko
  • 10,273
  • 2
  • 66
  • 55
9

JWPL - Java-based Wikipedia Library -- An application programming interface for Wikipedia

http://code.google.com/p/jwpl/

5

Here are 2 from infochimps.com:

http://www.infochimps.com/datasets/wikipedia-articles-abstract-search

http://www.infochimps.com/datasets/wikipedia-articles-title-autocomplete

Andrei Sfat
  • 8,440
  • 5
  • 49
  • 69
bina
  • 51
  • 1
  • 1