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

Lists the locations for the specified account.

### HTTP request

`GET https://mybusinessbusinessinformation.googleapis.com/v1alpha/{parent=accounts/*}/locations`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the account to fetch locations from. - **Specific Account ID** : If the account is of type `AccountType.PERSONAL`, the response returns only locations directly owned by that account. For all other types (e.g., `AccountType.LOCATION_GROUP`), it returns all accessible locations. - **Wildcard (`-`)** : Using `accounts/-` identifies the authenticated user. This scope defaults to `AccountType.PERSONAL` but includes both directly and indirectly owned locations (e.g., those accessible via member groups). |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. How many locations to fetch per page. Default value is 10 if not set. Minimum is 1, and maximum page size is 100. |
| `pageToken` | `string` Optional. 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` Optional. 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). |
| `orderBy` | `string` Optional. 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 title and storeCode. For example: "title, storeCode desc" or "title" or "storeCode desc" |
| `readMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. Read mask to specify what fields will be returned in the response. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body must be empty.

### Response body

Response message for Locations.ListLocations.

If successful, the response body contains data with the following structure:

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

| Fields ||
|---|---|
| `locations[]` | ``object (`https://developers.google.com/my-business/reference/businessinformation/rest/v1alpha/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. This field will only be returned if `filter` is used as a query parameter. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/business.manage`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).