Google Business Performance API has a
NEW API method that allows fetching multiple `DailyMetrics` in a single API request. Review the
deprecation schedule and instructions to migrate over from v4 reportInsights API method to Google Business Profile Performance API.
Method: googleLocations.search
Stay organized with collections
Save and categorize content based on your preferences.
Search all of the possible locations that are a match to the specified request.
HTTP request
POST https://mybusiness.googleapis.com/v4/googleLocations:search
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
{
"resultCount": integer,
// Union field search_query can be only one of the following:
"location": {
object (Location )
},
"query": string
// End of list of possible types for union field search_query .
} |
Fields |
resultCount |
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.
|
Union field search_query . Search query. This can be provided either as a location object or as a string query. search_query can be only one of the following: |
location |
object (Location )
Location to search for. If provided, will find locations which match the provided location details.
|
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.
|
Response body
If successful, the response body contains data with the following structure:
Response message for GoogleLocations.SearchGoogleLocations.
JSON representation |
{
"googleLocations": [
{
object (GoogleLocation )
}
]
} |
Fields |
googleLocations[] |
object (GoogleLocation )
A collection of GoogleLocations that are potential matches to the specified request, listed in order from most to least accuracy.
|
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-16 UTC."],[[["Search for Google Locations using either a specific location or a text-based query."],["Specify the desired number of search results, with a maximum of 10."],["Results are returned in order of accuracy, with the most accurate matches appearing first."],["Requires specific authorization scopes for access."]]],["The core content describes searching for Google locations via a `POST` request to `https://mybusiness.googleapis.com/v4/googleLocations:search`. The request body can include either a `location` object or a string `query` within the `search_query` field, plus an integer `resultCount`. The response body contains an array of `googleLocations`, representing potential matches ranked by accuracy. Authorization requires either `plus.business.manage` or `business.manage` OAuth scopes.\n"]]