# Method: accounts.locations.list

- [HTTP request](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.request_body)
- [Response body](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.response_body)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.ListLocationsResponse.SCHEMA_REPRESENTATION)
- [Authorization Scopes](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/list#body.aspect)

Lists the locations for the specified account.

### HTTP request

`GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/locations`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` The name of the account to fetch locations from. If the `https://developers.google.com/my-business/reference/rest/v4/accounts#Account` is of `https://developers.google.com/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. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` How many locations to fetch per page. Default is 100, minimum is 1, and maximum page size is 100. |
| `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. |
| `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). |
| `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. |
| `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" |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains data with the following structure:
Response message for Locations.ListLocations.

| JSON representation ||
|---|---|
| ``` { "locations": [ { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations#Location`) } ], "nextPageToken": string, "totalSize": integer } ``` |

| Fields ||
|---|---|
| `locations[]` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations#Location`)`` The locations. |
| `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. |
| `totalSize` | `integer` The approximate number of Locations in the list irrespective of pagination. |

### 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](https://developers.google.com/identity/protocols/OAuth2).