I'm having trouble getting my Javascript program to access a free English Dictionary API called OwlBot: https://owlbot.info/
Here's what I tried (https://jsfiddle.net/85w03162/3/):
$.getJSON("https://owlbot.info/api/v1/dictionary/owl?format=json?callback=?",function(json){
console.log("This is the JSON output by the OwlBot API: ");
console.log(json);
});
As you can see from the fiddle, this code works for the Github API, but fails for my OwlBot API. The Firebug lite console in jsfiddle says the callback function returns undefined, while the Chrome console gives the following error:
I'm new to cross-domain requests, so any pointers would be much appreciated. I've looked at the other answers on StackOverflow and elsewhere, but nothing seems to apply.
Other Info
OwlBot allows me to make GET requests on the API in JSON format, so this is the output I'm expecting from https://owlbot.info/api/v1/dictionary/owl?format=json :
[{"type":"noun","defenition":"a nocturnal bird of prey with large eyes, a facial disc, a hooked beak, and typically a loud hooting call.","example":"I love reaching out into that absolute silence, when you can hear the owl or the wind."}]
I can also curl
this from the Terminal, no problem (curl https://owlbot.info/api/v1/dictionary/owl
), but can't for the life of me figure out how to access this object in Javascript.