Is there a Wikipedia API?
Asked Answered
W

5

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?

Warlike answered 9/3, 2009 at 19:4 Comment(1)
Check out Extract the first paragraph from a Wikipedia article.Duffie
W
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.

Welby answered 9/3, 2009 at 19:8 Comment(0)
D
18

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

Duna answered 9/3, 2009 at 19:7 Comment(0)
N
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

Norvell answered 14/12, 2010 at 4:46 Comment(0)
P
9

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

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

Peterus answered 18/1, 2011 at 13:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.