How to extend the limit of 100 in Azure Maps /search/nearby/ API request

Patrick Reilly 5 Reputation points
2023-02-13T23:49:45.7866667+00:00

Using the documentation provided on Azure Maps Nearby Search:

https://learn.microsoft.com/en-us/rest/api/maps/search/get-search-nearby?tabs=HTTP

It states the limit is 100. My question is how to raise this or format a request to allow more than 100 returned results?

The idea is to get all POI's within a specific radius, there is no issue in making multiple requests to get this data and so I am billed accordingly, but I have no idea how you would get more than the 100 returned in one request.

Some API's such as googles maps API has the returned value: next_page_token which allows the user to request data based on this token getting new results for the next set of data, I.E: The next 100 results.

I don't see anything on these docs that have a way to get passed the 100 and return all possible results. I may be missing something but any help would be appreciated.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
836 questions
{count} vote

2 answers

Sort by: Most helpful
  1. IoTGirl 3,621 Reputation points Microsoft Employee Moderator
    2023-02-14T06:42:33.9233333+00:00

    Have you tried the ofs value? I believe that is the offset into the results set as documented at the link you provided above.

    1 person found this answer helpful.
    0 comments No comments

  2. rbrundritt 20,921 Reputation points Microsoft Employee Moderator
    2023-02-14T17:21:34.16+00:00

    Use ofs and limit together. ofs is the number of records to offset, and limit is the number of records to return. This example does this to loads the first 500 results within a radius https://samples.azuremaps.com/?search=search&sample=load-pois-as-the-map-moves

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.