Method: accounts.locations.list
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
HTTP リクエスト
GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/locations
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
ビジネスを取得するアカウントの名前です。Account が AccountType 個人用の場合、そのアカウントが直接所有しているビジネス情報のみが返されます。それ以外の場合は、アカウントからアクセスできるすべてのビジネス情報が、直接的または間接的に返されます。
|
クエリ パラメータ
パラメータ |
pageSize |
integer
ページあたりで取得するビジネス情報の数です。デフォルトは 100 で、最小値は 1、最大ページサイズは 100 です。
|
pageToken |
string
指定すると、次の page 個のビジネスが取得されます。以前の locations.list の呼び出しによって、リクエストしたページサイズを超える場所があったときにページトークンが返されます。
|
filter |
string
返されるビジネスを制限するフィルタ。レスポンスには、フィルタに一致するエントリのみが含まれます。filter が空の場合、制約が適用され、リクエストされたアカウントのすべてのビジネス情報(ページ分けあり)が取得されます。 有効なフィールドと使用例について詳しくは、位置情報の使用に関するガイドをご覧ください。
|
languageCode (deprecated) |
string
表示位置のプロパティを取得する言語の BCP 47 コード。この言語を使用できない場合は、その場所の言語で提供されます。どちらも使用できない場合は、英語で提供されます。 非推奨です。2020 年 8 月 15 日以降、このフィールドは適用されなくなります。代わりに、場所の言語が常に使用されます。
|
orderBy |
string
リクエストの並べ替え順序。複数のフィールドは、SQL 構文に従ってカンマで区切る必要があります。デフォルトの並べ替え順は昇順です。降順を指定するには、末尾に「desc"追加する必要があります。orderBy で有効なフィールドは locationName と storeCode です。例: "locationName, storeCode desc"または「locationName」または「storeCode desc」
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
Locations.ListLocations に対するレスポンス メッセージです。
JSON 表現 |
{
"locations": [
{
object (Location )
}
],
"nextPageToken": string,
"totalSize": integer
} |
フィールド |
locations[] |
object (Location )
ロケーション。
|
nextPageToken |
string
ビジネスの数がリクエストしたページサイズを超えた場合、このフィールドには、後続の locations.list の呼び出しでビジネスの次のページを取得するためのトークンが入力されます。それ以上店舗がない場合、このフィールドはレスポンスに含まれません。
|
totalSize |
integer
ページ分けに関係なく、リスト内のビジネスのおおよその数。
|
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
詳しくは、OAuth 2.0 の概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 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)."]]