- [HTTP request](https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations/search#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations/search#body.request_body)
  - [JSON representation](https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations/search#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations/search#body.response_body)
  - [JSON representation](https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations/search#body.SearchGoogleLocationsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations/search#body.aspect)

Search all of the possible locations that are a match to the specified request.

### HTTP request

`POST https://mybusinessbusinessinformation.googleapis.com/v1/googleLocations:search`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "pageSize": integer, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "location": { object (`https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location`) }, "query": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `pageSize` | `integer` The number of matches to return. The default value is 3, with a maximum of 10. Note that latency may increase if more are requested. There is no pagination. |
| Search query. This can be provided either as a location object or as a string query. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location`)`` Location to search for. If provided, will find locations which match the provided location details, which must include a value for the title. |
| `query` | `string` Text query to search for. The search results from a query string will be less accurate than if providing an exact location, but can provide more inexact matches. |
| End of mutually exclusive fields. ||

### Response body

Response message for GoogleLocations.SearchGoogleLocations.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "googleLocations": [ { object (`https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations#GoogleLocation`) } ] } ``` |

| Fields ||
|---|---|
| `googleLocations[]` | ``object (`https://developers.google.com/my-business/reference/businessinformation/rest/v1/googleLocations#GoogleLocation`)`` A collection of GoogleLocations that are potential matches to the specified request, listed in order from most to least accuracy. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/business.manage`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).