A API
Google Business Performance tem um
NOVO método de API que permite buscar várias "DailyMetrics" em uma única solicitação de API.
Confira a
programação de descontinuação e instruções para migrar do método de API reportInsights v4 para a API Google Business Profile Performance.
Method: googleLocations.search
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Pesquisar todos os locais possíveis que correspondem à solicitação especificada.
Solicitação HTTP
POST https://mybusiness.googleapis.com/v4/googleLocations:search
O URL usa a sintaxe de transcodificação gRPC.
Corpo da solicitação
O corpo da solicitação contém dados com a seguinte estrutura:
Representação JSON |
{
"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 .
} |
Campos |
resultCount |
integer
O número de correspondências a serem retornadas. O valor padrão é 3, com um máximo de 10. A latência pode aumentar se mais solicitações forem solicitadas. Não há paginação.
|
Campo de união search_query . Consulta de pesquisa. Pode ser fornecido como um objeto de localização ou como uma consulta de string. search_query pode ser apenas de um dos tipos a seguir: |
location |
object (Location )
Local a ser pesquisado. Se fornecido, encontrará locais que correspondem aos detalhes de local informados.
|
query |
string
Consulta de texto a ser pesquisada. Os resultados da pesquisa de uma string de consulta serão menos precisos do que se fornecerem uma localização exata, mas podem fornecer correspondências mais imprecisas.
|
Corpo da resposta
Se bem-sucedido, o corpo da resposta incluirá dados com a estrutura a seguir:
Mensagem de resposta para GoogleLocations.SearchGoogleLocations.
Representação JSON |
{
"googleLocations": [
{
object (GoogleLocation )
}
]
} |
Campos |
googleLocations[] |
object (GoogleLocation )
Uma coleção de GoogleLocations que são possíveis correspondências para a solicitação especificada, listados em ordem de maior para menor precisão.
|
Escopos de autorização
Requer um dos seguintes escopos do OAuth:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
Para mais informações, consulte a Visão geral do OAuth 2.0.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-25 UTC.
[null,null,["Última atualização 2025-07-25 UTC."],[[["\u003cp\u003eSearch for Google Locations using either a specific location or a text-based query.\u003c/p\u003e\n"],["\u003cp\u003eSpecify the desired number of search results, with a maximum of 10.\u003c/p\u003e\n"],["\u003cp\u003eResults are returned in order of accuracy, with the most accurate matches appearing first.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific authorization scopes for access.\u003c/p\u003e\n"]]],["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"],null,["# Method: googleLocations.search\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SearchGoogleLocationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nSearch all of the possible locations that are a match to the specified request.\n\n### HTTP request\n\n`POST https://mybusiness.googleapis.com/v4/googleLocations:search`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"resultCount\": integer, // Union field `search_query` can be only one of the following: \"location\": { object (/my-business/reference/rest/v4/accounts.locations#Location) }, \"query\": string // End of list of possible types for union field `search_query`. } ``` |\n\n| Fields ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| `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. |\n| 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: |||\n| `location` | `object (`[Location](/my-business/reference/rest/v4/accounts.locations#Location)`)` Location to search for. If provided, will find locations which match the provided location details. |\n| `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. |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for GoogleLocations.SearchGoogleLocations.\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"googleLocations\": [ { object (/my-business/reference/rest/v4/googleLocations#GoogleLocation) } ] } ``` |\n\n| Fields ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `googleLocations[]` | `object (`[GoogleLocation](/my-business/reference/rest/v4/googleLocations#GoogleLocation)`)` A collection of GoogleLocations that are potential matches to the specified request, listed in order from most to least accuracy. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]