# Method: accounts.locations.findMatches

- [HTTP request](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.request_body)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.response_body)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.FindMatchingLocationsResponse.SCHEMA_REPRESENTATION)
- [Authorization Scopes](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#body.aspect)
- [MatchedLocation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#MatchedLocation)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#MatchedLocation.SCHEMA_REPRESENTATION)

Finds all of the possible locations that are a match to the specified location. This operation is only valid if the location is unverified.

### HTTP request

`POST https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*}:findMatches`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The resource name of the location to find matches for. |

### Request body

The request body contains data with the following structure:

| JSON representation ||
|---|---|
| ``` { "languageCode": string, "numResults": integer, "maxCacheDuration": string } ``` |

| Fields ||
|---|---|
| `languageCode` | `string` The preferred language for the matching location (in BCP-47 format). |
| `numResults` | `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. |
| `maxCacheDuration` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Deprecated. This field is ignored for all requests. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. |

### Response body

If successful, the response body contains data with the following structure:
Response message for Locations.FindMatchingLocations.

| JSON representation ||
|---|---|
| ``` { "matchedLocations": [ { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#MatchedLocation`) } ], "matchTime": string } ``` |

| Fields ||
|---|---|
| `matchedLocations[]` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations/findMatches#MatchedLocation`)`` A collection of locations that are potential matches to the specified location, listed in order from best to least match. If there is an exact match, it will be in the first position. |
| `matchTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` When the matching algorithm was last executed for this location. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |

### Authorization Scopes

Requires one of the following OAuth scopes:

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

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

## MatchedLocation

Represents a possible match to a location.

| JSON representation ||
|---|---|
| ``` { "location": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations#Location`) }, "isExactMatch": boolean } ``` |

| Fields ||
|---|---|
| `location` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations#Location`)`` The sparsely populated location that is a potential match. Unpopulated fields include, but may not be limited to: name (the matched location cannot be retrieved via `locations.get` nor `locations.batchGet`); `storeCode`; `serviceArea` coverage area details; `labels`; `adWordsLocationExtensions`; `photos` |
| `isExactMatch` | `boolean` Is this an exact match? |