Search code examples
google-places-apid

Google Places webservice returns nextpage token as 0x0 after two requests


I have written a d code to retrieve the available places (like hospitals in US) from google places web service. I am able to retrieve place details only continuously for 2 requests only. afterwards the pagination token is set as 0x0 in the json response.

But if i manually do the search in the google then it keep on moving more than that. What is wrong am i doing here. Google says that it allows 1000 request per day limit for free. But it doesn't serve more than 2 requests. I have used d lang "requests" module for making the http request.


Solution

  • You only get 60 results across three pages, because that's the maximum provided by the API.

    Nearby Search and Text Search requests in the Google Places API web service return a maximum of 60 results. See the Accessing Additional Results section of the documentation, which says:

    each search can return as many as 60 results, split across three pages.

    (Emphasis mine.)