Method: accounts.locations.findMatches

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 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": number,
  "maxCacheDuration": string
}
Fields
languageCode

string

The preferred language for the matching location (in BCP-47 format).

numResults

number

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. This field is only respected if the cache needs to be updated.

maxCacheDuration

string (Duration format)

Indicates the duration of acceptable cache-age. If omitted, will always return the cached data (if available). If the cache is older than the provided duration, or if a cached value is not available, results will be re-calculated and re-cached.

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 MyBusiness.FindMatchingLocations.

JSON representation
{
  "matchedLocations": [
    {
      object(MatchedLocation)
    }
  ],
  "matchTime": string
}
Fields
matchedLocations[]

object(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 (Timestamp format)

When the matching algorithm was last executed for this location.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/plus.business.manage

For more information, see the OAuth 2.0 Overview.

MatchedLocation

Represents a possible match to a location.

JSON representation
{
  "location": {
    object(Location)
  },
  "isExactMatch": boolean
}
Fields
location

object(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?

Send feedback about...

Google My Business API
Google My Business API
Need help? Visit our support page.