Für die
Google Business Performance API gibt es eine
NEUE API-Methode, mit der sich mehrere „DailyMetrics“-Objekte in einer einzelnen Anfrage abrufen lassen.
Sehen Sie sich den
Zeitplan für die Einstellung und die Anleitung für die Migration von der reportInsights API-Methode Version 4 zur Google Business Profile Performance API an.
Method: googleLocations.search
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Es wird in allen möglichen Standorten gesucht, die mit der angegebenen Anfrage übereinstimmen.
HTTP-Anfrage
POST https://mybusiness.googleapis.com/v4/googleLocations:search
Die URL verwendet die Syntax der gRPC-Transcodierung.
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung |
{
"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 .
} |
Felder |
resultCount |
integer
Die Anzahl der zurückzugebenden Übereinstimmungen. Der Standardwert ist 3, der Höchstwert ist 10. Die Latenz kann sich erhöhen, wenn mehr angefordert werden. Es gibt keine Paginierung.
|
Union-Feld search_query . Suchanfrage. Dies kann entweder als Standortobjekt oder als Stringabfrage angegeben werden. Für search_query ist nur einer der folgenden Werte zulässig: |
location |
object (Location )
Standort, nach dem gesucht werden soll. Sofern angegeben, werden Standorte gesucht, die mit den angegebenen Standortdetails übereinstimmen.
|
query |
string
Textabfrage, nach der gesucht werden soll. Die Suchergebnisse aus einem Abfragestring sind weniger genau als bei der Angabe eines genauen Standorts. Sie können jedoch genauere Übereinstimmungen liefern.
|
Antworttext
Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:
Antwortnachricht für GoogleLocations.SearchGoogleLocations
JSON-Darstellung |
{
"googleLocations": [
{
object (GoogleLocation )
}
]
} |
Felder |
googleLocations[] |
object (GoogleLocation )
Eine Sammlung von GoogleLocations, bei denen es sich um potenzielle Übereinstimmungen für die angegebene Anfrage handelt, die in absteigender Genauigkeit aufgelistet sind.
|
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
Weitere Informationen finden Sie in der Übersicht über OAuth 2.0.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 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)."]]