【问题标题】:How do I paginate through results returned by foursquare venues / search api?如何对foursquare场所/搜索api返回的结果进行分页?
【发布时间】:2019-06-10 13:41:22
【问题描述】:

我想在给定的经纬度范围内创建所有餐馆的列表。我正在使用相同的foursquare场所/搜索API,带有swne参数。

如果我期待 200 个结果。我知道每个限制上限为 50 个结果,我可以执行 4 个带有 +50 偏移量的请求。 但是当 [limit=50, offset=50] 和 [limit=50, offset=100]

以下是示例 GET 请求中的参数:

https://api.foursquare.com/v2/venues/search?client_id=blaa&client_secret=blaa2&v=20190610&categoryId=4d4b7105d754a06374d81259&limit=50&sw=40.467632,-74.292252&ne=40.935656,-73.672914&intent=browse&offset=50

【问题讨论】:

    标签: api pagination geocoding foursquare


    【解决方案1】:

    根据Foursquare的documentation for venues/search,没有offset参数。您可能希望将the venues/explore endpoint&section=food 参数一起使用(而不是categoryId 参数)。

    【讨论】:

    • 谢谢,但是 /explore API 是否支持 SW 和 NE 的边界?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-05-10
    • 2021-05-22
    • 1970-01-01
    • 2016-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多