pending_actions Transportation and Logistics documentation is being deprecated. The updated documentation is available on the
Mobility Services site.
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 2022-11-04 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 2022-11-04 UTC."],[[["Finds nearby places for a given location using a POST request to `https://locationselection.googleapis.com/v1beta:findNearbyPlaces`."],["The request body requires a search location, localization preferences, and allows specifying the maximum number of results and nearby WiFi access points for improved accuracy."],["The response provides an ordered list of places based on likelihood and distance from the search location, which might be empty if no places are found."]]],["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 \u003e 0). Optionally, `wifiAccessPoints` can be included to enhance results. The successful response returns an ordered array of `placeResults`, which can be empty if no places are found. Ordering is a mix between likelihood and distance.\n"]]