- [HTTP request](https://developers.google.com/maps/ai/maps-experience-agent-tools/reference/rest/v1/TopLevel/searchText.md.txt#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/maps/ai/maps-experience-agent-tools/reference/rest/v1/TopLevel/searchText.md.txt#body.request_body)
  - [JSON representation](https://developers.google.com/maps/ai/maps-experience-agent-tools/reference/rest/v1/TopLevel/searchText.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/maps/ai/maps-experience-agent-tools/reference/rest/v1/TopLevel/searchText.md.txt#body.response_body)
- [Authorization scopes](https://developers.google.com/maps/ai/maps-experience-agent-tools/reference/rest/v1/TopLevel/searchText.md.txt#body.aspect)

Search for places with a text query.

### HTTP request

`POST https://mapstools.googleapis.com/v1:searchText`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) 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 (`LocationBias`) } } ``` |

| Fields ||
|---|---|
| `textQuery` | `string` Required. The text query. |
| `languageCode` | `string` 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` | `string` 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` | `integer` 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` | `boolean` Optional. Includes extended place details in the response. Set this field to `true` when the user request requires rich qualitative insights, real-time dynamics, or specialized entity attributes: - Qualitative reviews, customer sentiment, and feedback. - Specific offerings like menu items, dishes, food specialties, beverages, or business highlights. - Qualitative atmosphere, interior decor, aesthetic, ambience, or mood. - Real-time data and specialized facility specs, visitor policies/tips, wait times. Leave `false` (default) for standard discovery searches (e.g., cuisines, store types), location/address lookups, contact info, operating hours, and standard metadata/amenities. Enabling this field will trigger the Pro tier and incur higher billing cost and higher latency. |
| `locationBias` | ``object (`LocationBias`)`` An optional region to bias the search results to. If an explicit location is in `textQuery`, it will be used to bias the search results instead of this field. |

### 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`