# Method: projects.list

- [HTTP request](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#body.HTTP_TEMPLATE)
- [Query parameters](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#body.request_body)
- [Response body](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#body.ListProjectsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#try-it)

Lists projects that are direct children of the specified folder or organization resource. `list()` provides a strongly consistent view of the projects underneath the specified parent resource. `list()` returns projects sorted based upon the (ascending) lexical ordering of their `displayName`. The caller must have `resourcemanager.projects.list` permission on the identified parent.

### HTTP request

`GET https://cloudresourcemanager.googleapis.com/v3/projects`

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

### Query parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the parent resource whose projects are being listed. Only children of this parent resource are listed; descendants are not listed. If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an organization, use the value `organizations/{org_id}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `resourcemanager.projects.list` |
| `pageToken` | `string` Optional. A pagination token returned from a previous call to `https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#google.cloud.resourcemanager.v3.Projects.ListProjects` that indicates from where listing should continue. |
| `pageSize` | `integer` Optional. The maximum number of projects to return in the response. The server can return fewer projects than requested. If unspecified, server picks an appropriate default. |
| `showDeleted` | `boolean` Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be returned. Normally only `ACTIVE` projects are returned. |

### Request body

The request body must be empty.

### Response body

A page of the response received from the `https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects/list#google.cloud.resourcemanager.v3.Projects.ListProjects` method.

A paginated response where more pages are available has `nextPageToken` set. This token can be used in a subsequent request to retrieve the next request page.

NOTE: A response may contain fewer elements than the request `pageSize` and still have a `nextPageToken`.

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

| JSON representation |
|---|
| ``` { "projects": [ { object (`https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects#Project`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `projects[]` | ``object (`https://docs.cloud.google.com/resource-manager/reference/rest/v3/projects#Project`)`` The list of Projects under the parent. This list can be paginated. |
| `nextPageToken` | `string` Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `pageToken` parameter gives the next page of the results. When `nextPageToken` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/cloud-platform.read-only`
- `https://www.googleapis.com/auth/cloudplatformprojects`
- `https://www.googleapis.com/auth/cloudplatformprojects.readonly`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).