For example using this Wikipedia dump:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=lebron%20james&rvprop=content&redirects=t
You're probably looking for the Pywikipediabot for manipulating the wikipedia API.