toy
toy

Reputation: 12131

How to search in freebase by mid

I have just dumped the data from Freebase, but when I see in the data I see "/m/03lp844" which is mid. But how am I going to get more detail out of that mid? I can't find anything on the documentation.

So, I dumped film data and when I look for actors, it only shows a bunch of mids, but I need actors name as well.

Thanks a lot.

Upvotes: 7

Views: 5263

Answers (3)

manova
manova

Reputation: 3593

You can you Freebase's MQLRead api, for example, this would return an json string about all "common topic" about "micheal jordan"

https://www.googleapis.com/freebase/v1/mqlread?query={"id":"/en/michael_jordan","limit":1,"*":null,"type":"/common/topic"}

This would show all the types that /en/micheal_jordan has.

https://www.googleapis.com/freebase/v1/mqlread?query={"id":"/en/michael_jordan","limit":1,"*":null}

Upvotes: 0

Chenyan Xiong
Chenyan Xiong

Reputation: 41

The mid is an uniq id for every object in freebase. So you will see a lot of edges pointing to other mids. Indeed, I think only when the linked information is not simple values like string, number, etc, it will be a mid. One easy way to look what those mid refer to is using the rdf api: you could query by key /en/michael_jordan : https://www.googleapis.com/freebase/v1/rdf/en/michael_jordan or you could query by mids: https://www.googleapis.com/freebase/v1/rdf/m/054c1 and you could get the name of actors names using the "rdfs:name" edge. The result RDF api shown to you should be familiar.They are all the triples start with the key or mid in the freebase dump.

other interesting apis are here: http://wiki.freebase.com/wiki/API you can search, fetch description, find everything related to a mid, etc. Hope it helps.

Upvotes: 1

Tom Morris
Tom Morris

Reputation: 10540

You should look at the Freebase schema so that you understand how things are connected to each other. In the case of films and actors, they are connected together by an intermediary node /film/performance. You'll need to follow the link from the films to those nodes and from there to the linked actor (and look at the actor's /type/object/name property).

Upvotes: 2

Related Questions