I found in stackoverflow an answer that retrieves the infobox from wikipedia given a url.
var url="http://en.wikipedia.org/w/api.php?action=parse&format=json&page=" + interests[index].name + "&redirects&prop=text&callback=?";
var html = "";
$.getJSON(url,function(data){
wikiHTML = data.parse.text["*"];
$wikiDOM = $("<document>"+wikiHTML+"</document>");
result_html += '<p>' + $wikiDOM.find('.infobox').html() + '</p>';
});
But i am getting the following error:
Uncaught TypeError: Cannot read property 'text' of undefined
The url is valid, although the searchterm has spaces. Example:
Full Metal Alchemist would be the interests[index].name.