I have stored some search results of the the google knowledge Graph API (GKGA) in the form of ids, that the GKGA returns.
Now I want to get the whole Result again using the id, but that doesnt seem to work. After some research I found a query that works from here: How to use Google Knowledge Graph API
My requests are a bit different mainly the id:
https://kgsearch.googleapis.com/v1/entities:search?callback=jQuery321016748583817510942_1521200076900&indent=true&key={MY_API_KEY}&ids=kg:/m/031sc&_=1521200076901
The refereced working request is:
https://kgsearch.googleapis.com/v1/entities:search?ids=%2Fm%2F014nm_&key={API-KEY}
The main difference I could see was that the ids are different:
mine was:
- mine was: kg:/m/031sc
- his was: kg:/m/014nm_ but is %2Fm%2F014nm_ in the url
So I tried to use encodeURI on the id and whole url but made no difference.
So here is the question: What do I need to do with my id(s) so that I get the results of the GKGA?
Currently Im implementing my request like this: (if you were wondering about the JQuery part in my request-url)
let service_url = 'https://kgsearch.googleapis.com/v1/entities:search';
let requestParams = {
'indent': true,
'key': '{API-KEY}',
"ids":"kg:/m/031sc"
};
$.getJSON(service_url + '?callback=?', requestParams, (response) => {
}).done((response) => {
console.log('Response is: ' + JSON.stringify(response));
});