Method: findNearbyPlaces
Stay organized with collections
Save and categorize content based on your preferences.
Find nearby places for a given location.
HTTP request
POST https://locationselection.googleapis.com/v1beta:findNearbyPlaces
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
Fields |
localizationPreferences |
object (LocalizationPreferences )
Required. Preferences used for localizing the texts in response, for example, name and address.
|
searchLocation |
object (LatLng )
Required. Location where places need to be found.
|
maxResults |
integer
Required. Maximum number of results to be returned. Must be greater than 0.
|
wifiAccessPoints[] |
object (WiFiAccessPoint )
WiFi Access points around the request location. Used to provide higher quality search results.
|
Response body
If successful, the response body contains data with the following structure:
Find nearby places for a given location response message.
JSON representation |
{
"placeResults": [
{
object (PlaceResult )
}
]
} |
Fields |
placeResults[] |
object (PlaceResult )
Ordered list of places found. May be empty if no places were found around the request location. Ordering is based on a combination of likelihood and distance.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-30 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-30 UTC."],[[["The Location Selection API's Find Nearby Places function allows you to identify places near a specified location using a POST request."],["The request body requires location preferences, search location, maximum results, and optionally, WiFi access points for enhanced accuracy."],["The response provides an ordered list of places based on likelihood and distance, which may be empty if no suitable places are found."],["gRPC Transcoding syntax is used for the HTTP request URL."]]],["The core function is to find nearby places via a `POST` request to `https://locationselection.googleapis.com/v1beta:findNearbyPlaces`. The request body requires `localizationPreferences`, `searchLocation`, and `maxResults` (an integer). Optionally, `wifiAccessPoints` can be included. The response returns a `placeResults` array, containing a list of found places, ordered by likelihood and distance. The list may be empty if no locations were found.\n"]]