Search code examples
google-mapsgoogle-nearby

Why Google Places API's Nearby Search got an out-of-range result than what is specified?


I used Nearby Search of Google Places API and sent a request with the radius parameter having a value of 1000 meters. My assumption is that the distance between any of search result and the target location will be less than 1km. But the API response gave me results that is beyond the 1km radius (like 1.3km).

I want to know if is this normal?


Solution

  • The Nearby Search radius parameter does not restrict the results to be within the circle.

    Here's what the docs says:

    "You may bias results to a specified circle by passing a location and a radius parameter. Doing so instructs the Places service to prefer showing results within that circle; results outside of the defined area may still be displayed."

    Thus, the Nearby Search is working as intended if it gives you results a little bit beyond your search biasing using the radius parameter.