2

i want to access the database of Wikipedia to get the information of any thing by using C#

Mahmoud
  • 29
  • 1
  • 2
  • similar question here: http://stackoverflow.com/questions/627594/is-there-a-wikipedia-api – Niklas Apr 13 '11 at 18:10
  • If you're looking into simply retrieving pages use: `HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://www.wikipedia.org/").GetResponse();` – Teoman Soygul Apr 13 '11 at 18:20

4 Answers4

4

You can't access Wikipedia database (mysql probably) directly but you can use the Wikipedi API (actually MediaWiki API) to access information on Wikipedia.

More info here: http://en.wikipedia.org/w/api.php

MediaWiki API is quite self explanatory and here: http://www.mediawiki.org/wiki/API

You can simply retrieve the contents of any wikipedia page using httpwebrequest as posted here: How to access wikipedia

Also using SPARQL to retrieve Wikipedia structured data seems to be an interesting and useful idea as in here: http://www.kozlenko.info/blog/2010/07/20/executing-sparql-query-on-wikipedia-in-net/

Community
  • 1
  • 1
Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
1

Use the MediaWiki API

http://www.mediawiki.org/wiki/API

RQDQ
  • 15,461
  • 2
  • 32
  • 59
1

Use the Wikipedia API.

anthonyvd
  • 7,329
  • 4
  • 30
  • 51
1

Try to use LINQPad with Wikipedia API

GregC
  • 7,737
  • 2
  • 53
  • 67