3

I am exploring Google Knowledge Graph Search API, but I can't find relevant documentation explaining the @id field of the response or search entities. For example "@id": "kg:/m/09tm4t4".

1- What's the lifespan of this id? Is it safe to use it as a key for my own app-specific data that's based on the search results and assume the id is not going to change in the future?

2- All ids I've seen so far have the prefix kg:/m/. I'm thinking of ignoring this prefix in my keys. Would this decision be future-proof?

I haven't seen this format before so any links to documentation of explanation of this format are highly appreciated.

1 Answer 1

2

It is likely that the ids will be long lived, as the ones so far are migrated from from Freebase, the predecessor of Knowledge Graph. Freebase used the "/m/..." notation, for your example the Freebase page was http://www.freebase.com/m/09tm4t4 (that page is currently available but likely to go away soon). Google has made no guarentees about their lifetime as far as I've seen, however, if they have taken pains to preserve some backwards compatibility it seems likely they won't soon change them to break that compatibility.

I would not ignore the prefix in storing your keys. Should Google change its format for new entities as Freebase recedes into the past you will be out of luck.

2
  • Now that Freebase is gone, Google Knowledge Graph entities appear to be getting ids with the prefix /g/... instead of /m/..., so hopefully the asker followed your advice about not dropping the prefix. Commented Jun 5, 2016 at 18:50
  • The /g/ identifiers started appearing before Freebase disappeared, but the point about treating them as opaque identifiers is a good one.
    – Tom Morris
    Commented May 6, 2019 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.