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: accounts.locations.list
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Listet die Standorte für das angegebene Konto auf.
HTTP-Anfrage
GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/locations
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
parent |
string
Der Name des Kontos, aus dem Standorte abgerufen werden sollen. Wenn Account von AccountType PERSONAL ist, werden nur Standorte zurückgegeben, die direkt zum Konto gehören. Andernfalls werden alle über das Konto zugänglichen Standorte zurückgegeben, entweder direkt oder indirekt.
|
Abfrageparameter
Parameter |
pageSize |
integer
Die Anzahl der Standorte, die pro Seite abgerufen werden sollen. Die Standardeinstellung ist 100, die Mindestanzahl ist 1 und die maximale Seitengröße 100.
|
pageToken |
string
Wenn angegeben, werden die nächsten page von Standorten abgerufen. Das Seitentoken wird bei vorherigen Aufrufen von locations.list zurückgegeben, wenn mehr Speicherorte vorhanden waren, als für die angeforderte Seitengröße möglich waren.
|
filter |
string
Ein Filter, der die zurückzugebenden Standorte einschränkt. Die Antwort enthält nur Einträge, die dem Filter entsprechen. Wenn filter leer ist, werden Einschränkungen angewendet und alle Standorte (mit Seitenzahlen) für das angeforderte Konto abgerufen. Weitere Informationen zu gültigen Feldern und Anwendungsbeispiele finden Sie im Leitfaden zur Verwendung von Standortdaten.
|
languageCode (deprecated) |
string
Der BCP 47-Code der Sprache, in der die Eigenschaften für den Anzeigestandort abgerufen werden sollen. Wenn diese Sprache nicht verfügbar ist, werden sie in der Sprache des Standorts angegeben. Wenn keines von beiden verfügbar ist, werden sie auf Englisch angegeben. Verworfen. Nach dem 15. August 2020 ist dieses Feld nicht mehr verfügbar. Stattdessen wird immer die Sprache des Standorts verwendet.
|
orderBy |
string
Sortierreihenfolge für die Anfrage. Mehrere Felder sollten gemäß der SQL-Syntax durch Kommas getrennt werden. Standardmäßig wird die Sortierreihenfolge aufsteigend sein. Um eine absteigende Reihenfolge festzulegen, wird ein Suffix " desc" sollte hinzugefügt werden. Gültige Felder für „orderBy“ sind „locationName“ und „storeCode“. Beispiel: „locationName, storeCode desc“ oder „locationName“ oder „storeCode desc“
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:
Antwortnachricht für Locations.ListLocations
JSON-Darstellung |
{
"locations": [
{
object (Location )
}
],
"nextPageToken": string,
"totalSize": integer
} |
Felder |
locations[] |
object (Location )
Die Standorte.
|
nextPageToken |
string
Wenn die Anzahl der Standorte die angeforderte Seitengröße überschreitet, wird dieses Feld mit einem Token gefüllt, um bei einem nachfolgenden Aufruf von locations.list die nächste Seite mit Standorten abzurufen. Wenn keine weiteren Standorte vorhanden sind, ist dieses Feld in der Antwort nicht vorhanden.
|
totalSize |
integer
Die ungefähre Anzahl der Standorte in der Liste, unabhängig von der Paginierung.
|
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\u003eLists all accessible locations for a specified Google My Business account, including directly or indirectly owned locations based on account type.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering, pagination, and sorting of location data through query parameters like \u003ccode\u003efilter\u003c/code\u003e, \u003ccode\u003epageSize\u003c/code\u003e, \u003ccode\u003epageToken\u003c/code\u003e, and \u003ccode\u003eorderBy\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReturns a list of locations with details like location name, store code, and other properties, along with pagination information if applicable.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific OAuth scopes for accessing and managing business data.\u003c/p\u003e\n"],["\u003cp\u003eProvides a total count of locations irrespective of pagination for easier management and understanding of the data set.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.locations.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListLocationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nLists the locations for the specified account.\n\n### HTTP request\n\n`GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/locations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` The name of the account to fetch locations from. If the [Account](/my-business/reference/rest/v4/accounts#Account) is of [AccountType](/my-business/reference/rest/v4/accounts#Account.AccountType) PERSONAL, only Locations that are directly owned by the Account are returned, otherwise it will return all accessible locations from the Account, either directly or indirectly. |\n\n### Query parameters\n\n| Parameters ||\n|---------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` How many locations to fetch per page. Default is 100, minimum is 1, and maximum page size is 100. |\n| `pageToken` | `string` If specified, it fetches the next `page` of locations. The page token is returned by previous calls to `locations.list` when there were more locations than could fit in the requested page size. |\n| `filter` | `string` A filter constraining the locations to return. The response includes only entries that match the filter. If `filter` is empty, then constraints are applied and all locations (paginated) are retrieved for the requested account. For more information about valid fields and example usage, see [Work with Location Data Guide](https://developers.google.com/my-business/content/location-data#filter_results_when_you_list_locations). |\n| `languageCode` **(deprecated)** | `string` The BCP 47 code of language to get display location properties in. If this language is not available, they will be provided in the language of the location. If neither is available, they will be provided in English. Deprecated. After August 15th, 2020, this field will no longer be applied. Instead, the language of the location will always be used. |\n| `orderBy` | `string` Sorting order for the request. Multiple fields should be comma-separated, following SQL syntax. The default sorting order is ascending. To specify descending order, a suffix \" desc\" should be added. Valid fields to orderBy are locationName and storeCode. For example: \"locationName, storeCode desc\" or \"locationName\" or \"storeCode desc\" |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for Locations.ListLocations.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"locations\": [ { object (/my-business/reference/rest/v4/accounts.locations#Location) } ], \"nextPageToken\": string, \"totalSize\": integer } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locations[]` | `object (`[Location](/my-business/reference/rest/v4/accounts.locations#Location)`)` The locations. |\n| `nextPageToken` | `string` If the number of locations exceeded the requested page size, this field is populated with a token to fetch the next page of locations on a subsequent call to `locations.list`. If there are no more locations, this field is not present in the response. |\n| `totalSize` | `integer` The approximate number of Locations in the list irrespective of pagination. |\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)."]]