Here's the quick version:
Assuming you want to search for some page on wikipedia, use this url:
http://en.wikipedia.org/w/api.php?action=opensearch&search=dogs
This will return an array in the form of [my search term, [array of matches]].
Chose one of the matches from the array and use this url to get the article:
http://en.wikipedia.org/w/api.php?action=parse§ion=0&format=xml&page=Dogs&redirects&prop=text
This will return the entire html of the article (I don't know of a way to just get plain text). If you want other information, change the prop parameter. For example
http://en.wikipedia.org/w/api.php?action=parse§ion=0&format=xml&page=Dogs&redirects&prop=links
will return all the links in the article. See this page for other properties you can request http://www.mediawiki.org/wiki/API:Properties.
↧