You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

HERE Places API获取住宿结果仅20条,如何获取更多?

How to Fetch More Than 20 Accommodation Results from HERE Places API

Hey there! I’ve worked with HERE’s Places API before, so I can help you get past that 20-result limit. The issue is that you’re using the wrong parameter—HERE’s Discover Search endpoint doesn’t recognize limit; instead, it uses pagination parameters to load more results. Here’s what you need to do:

1. Use size to increase results per page

The size parameter controls how many results you get per request, and you can set it up to a maximum of 100 (the default is 20). Add this to your query string to pull more results in one go.

2. Use page to fetch subsequent pages

Once you’ve set your desired size, use the page parameter to navigate through result sets. Start with page=1 for the first batch, then increment the number by 1 each time you make a new request to get the next set of results.

Example Request

Here’s your original query updated with these parameters (set to 100 results per page, second page):

https://places.cit.api.here.com/places/v1/discover/search?app_id=APP_ID&app_code=APP_CODE&in=-102.65625,-73.71566303112276,102.03125238418579,74.2119976769519&pretty&q=accommodation&size=100&page=2

Quick Tips

  • Keep requesting new pages until the response returns fewer results than your specified size (or an empty result set)—that means you’ve grabbed all available accommodation listings in your area.
  • Remember, size can’t go over 100, so if you need hundreds of results, you’ll have to loop through multiple page requests.
  • Double-check your API quota to make sure you don’t hit any limits with repeated requests.

内容的提问来源于stack exchange,提问作者nico

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 09:09:30