I’m struggling a bit to wrap my head around this one. Initially I was trying the following URL to retrieve data from the Wikipedia api:
This seemed to work when I pasted it in my browser, I saw many related results pop up. However When I tried to access it with my ajax get request I was getting errors. I searched around and found someone who suggested using this url:
https://en.wikipedia.org/w/api.php?action=opensearch&search= + searchTermHere + &format=json&callback=?;
I did and viola, it works! But I don’t understand why. Before I copy and paste I want to understand why my original url was not returning information while this one is. I mean they seem to provide roughly the same data when I enter them in my browser so I’m just not getting where the difference lies. Any pointers?