You can grab the (incredibly lightweight) wikipedia.js library from here.
Want to browse the annotated source?
The library is the work of Open Knowledge Foundation Labs and Rufus Pollock in particular. It is, in essence, a small wrapper around the data and APIs of the DBPedia project and it is they who have done all the heavy lifting of extracting structured data from Wikipedia - huge credit and thanks to DBPedia folks!
// first include the script <script src='http://okfnlabs.org/wikipediajs/wikipedia.js'></script> var info = WIKIPEDIA.getData('http://en.wikipedia.org/wiki/Invasion_of_Normandy'); alert(info.summary.title); console.log(info);
Or, check out the more detailed demo below ...