NEED HELP - Wikipedia Viewer Project

I’m having trouble with getting back the data after the API call. It just keeps coming back as an empty object. Any suggestions? Thanks!
CLICK HERE TO VIEW MY PROJECT

I don’t know about the herokuapp URL, but you can get data from the Wikipedia API without relying on a third party application. You just need to add origin=* in the URL parameters, and you’re good to go. You also need to remove the callback bit.

// other options removed for brevity
var api = 'https://en.wikipedia.org/w/api.php?origin=*&format=json&...&srsearch='
var apiUrl = api + encodeURIComponent(query);
1 Like

Thank you! Yeah it works now. Just needed the origin=*