Search for places with a text query.
HTTP request
POST https://mapstools.googleapis.com/v1:searchText
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"textQuery": string,
"languageCode": string,
"regionCode": string,
"pageSize": integer,
"includeExtendedDetails": boolean,
"locationBias": {
object ( |
| Fields | |
|---|---|
textQuery |
Required. The text query. |
languageCode |
Optional. The language to request that the summary is returned in. If the language code is unspecified or unrecognized, the summary with a preference for English will be returned. For example, "en" for English. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport. |
regionCode |
Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For example, "US" for United States. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported. |
pageSize |
Optional. The maximum number of places to return, up to 10. The service may return fewer than this value. The default value is 5. Requesting more than 5 places will trigger the Pro tier and incur higher billing cost and latency. |
includeExtendedDetails |
Optional. Includes extended place details in the response. Set this field to Leave Enabling this field will trigger the Pro tier and incur higher billing cost and higher latency. |
locationBias |
An optional region to bias the search results to. If an explicit location is in |
Response body
If successful, the response body contains an instance of SearchTextResponse.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/maps-platform.mapstools