Discussions on Query Builder
Start a New Discussion
-
-
I have one hundred wikipedia/en_ids that I want to get the corresponding Freebase guids for. I could do this one at a time but hoped there was a way to perform a bulk lookup
{
"/common/topic/article" : [
{
"guid" : null
}
],
"key" : [
{
"namespace" : "/wikipedia/en_id",
"value" : "426702"
}
],
"name" : null
}Thanks,
Biosopher-
At the very least you can reduce network latency by using the queries parameter to execute multiple queries per http request. See the examples on the mqlread page.
-
Thanks Willmoffat,
For anyone looking for a similar solution, here is the answer:http://www.freebase.com/api/service/mqlread?queries={"q0":{"query":[{"/common/topic/article" : [{"guid" : null}],"key" : [{"namespace":"/wikipedia/en_id","value":"426702"}]}]}, "q1":{"query":[{"/common/topic/article" : [{"guid" : null}],"key" : [{"namespace":"/wikipedia/en_id","value":"38252"}]}]}}
Cheers,
You can simply keep adding more queries to your URL up to the limit of the URL string length. Technically...the URL definition does not require a length limit but most servers have a limit around 256-500 chars typically.
Biosopher
-
-
-
I expected this to be simple but couldn't find any info on the site/web.
How do I get the description for a specific article. E.g. this simple query gets the name for an article but how do I get the description as well?
{
"id" : "/guid/9202a8c04000641f800000000023907a",
"name" : "San Quentin"
}Thanks,
Biosopher-
See here for a similar question/response...Here's the help section involved with the Trans service, you want section 4.8. Fetching Content with trans
-
-
-
-
Here's an example of a slick query builder UI:
http://www.openiris.org/screenshots/atct_album_image?b_start=12-
can we actually make links in discussion posts? like: http://www.openiris.org/screenshots/atct_album_image?b_start=12 .
-