Wikipedia API project - would appreciate some help!

Wikipedia API project - would appreciate some help!
0.0 0


Hello! I’m working on the Wikipedia Viewer project, and I can’t seem to get the JSON object from Wikipedia no matter what.

I haven’t decided what data I’m gonna get from the API yet.
For now I’m just testing if getting the JSON data works, first of all, by replacing the text “Result Test” to some JSON data in the Wikipedia query of “Einstein” when a key is submitted in the search bar. But when I check the Chrome console after searching something, it just shows me this error:

Failed to load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

I’ve done some research, and what I got from it was that this shouldn’t be an issue if I use jsonp. I set the datatype to jsonp, but it’s still not working. Can someone plz tell me what I did wrong :frowning: Thanks!!!

Link to the Codepen


The URL “” is not right.

I think what you want is "". I don’t know if you meant to do it but you had 2 URLs in there which Wikipedia didn’t know how to handle.