how to increase freebase API result limit

不问归期 提交于 2019-12-01 18:17:50

You can use the limit property to request more results. However, fetching large numbers can give you a query timeout.

A more reliable way is to use the cursor property. Pass in a cursor value of true. You'll get a batch of results, but you'll also get a new value for cursor in the response. Repeat your query, but substitute in the new cursor value to get the next batch of results. In this way you can fetch even a very large set of data.

More info: http://www.freebase.com/docs/mql/ch04.html#envelopeparameters

A coworker helped me figure this one out. I thought I should use the limit parameter but I didn't put it in the right place. Here's how it's done:

[{
  "type":"/base/popstra/celebrity",
  "name":null,
  "limit":300
}]
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!