Skip to content

Instantly share code, notes, and snippets.

@edsu
Last active January 21, 2016 15:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/c95c9ae9f60ecdf80077 to your computer and use it in GitHub Desktop.
Save edsu/c95c9ae9f60ecdf80077 to your computer and use it in GitHub Desktop.
Look up WikiData ID based using a Freebase ID. Possibly useful if you have lots of Freebase ids and want to turn them into WikiData ids when Freebase goes the way of the Dodo in June.
% curl --silent 'https://wdq.wmflabs.org/api?q=string\[646:/m/04hcw\]' | python -mjson.tool
{
"items": [
9391
],
"status": {
"error": "OK",
"items": 1,
"parsed_query": "STRING[646:'/m/04hcw']",
"querytime": "113ms"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment