Hi Ed. In addition to the API(s), there's a specific Freebase<->Wikidata mapping dump which is a little old (18 months), but very compact and easy to work with. The identifiers are likely to be pretty stable, so if the entities you are interested in have been around for a while, it might be easier to work with.
https://developers.google.com/freebase/data#freebase-wikidata-mappings
The three hits for your sample topic make me suspicious about the quality of the mapping though
$ curl http://storage.googleapis.com/freebase-public/fb2w.nt.gz | zgrep 'm.04hcw' http://rdf.freebase.com/ns/m.04hcw < http://www.w3.org/2002/07/owl#sameAs%3E http://www.wikidata.org/entity/Q9391 . http://rdf.freebase.com/ns/m.04hcw4 < http://www.w3.org/2002/07/owl#sameAs%3E < http://www.wikidata.org/entity/Q1579293%3E . http://rdf.freebase.com/ns/m.04hcwh < http://www.w3.org/2002/07/owl#sameAs%3E < http://www.wikidata.org/entity/Q1347932%3E .
I don't know if this dump was used as the basis for the identifiers loaded into Wikidata, but you might want to consider building in some safeguards like double checking that names match -- whatever lookup scheme you decide to use.
Tom
On Sun, May 17, 2015 at 10:23 AM, Ed Summers ehs@pobox.com wrote:
Hi all,
I was wondering if anyone had any advice for mapping a set of Freebase identifiers to WikiData identifiers. I’m looking to port over a few thousand entities in use in an application since Freebase is going to be shut off next month.
My apologies if this is a rudimentary question. I took a quick look at the API [1] and didn’t see an obvious way of doing it. Or is the WikiData Query API [2] a better fit for this? I was able to figure out how to do a lookup based on the FreebaseID,
https://wdq.wmflabs.org/api?q=string[646:'/m/04hcw']
Any tips or pointers would be appreciated.
//Ed
[1] https://www.wikidata.org/w/api.php [2] https://wdq.wmflabs.org/api_documentation.html
Wikidata-l mailing list Wikidata-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l