# List all projects

> [!WARNING] Warning: Experimental API
> Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

## Query parameters

**`sort`**

- Type: enum
- Example: `"name"`

Sorts projects (default sorting is by ascending name)

<details>
<summary>Show enum values</summary>

**`name`**

Sort by name (ascending order)

**`-name`**

Sort by name (descending order)

**`last_data_change_at`**

Sort by last_data_change_at (ascending order)

**`-last_data_change_at`**

Sort by last_data_change_at (descending order)

**`plan`**

Sort by plan (ascending order)

**`-plan`**

Sort by plan (descending order)

**`created_at`**

Sort by creation date (ascending order)

**`-created_at`**

Sort by creation date (descending order)

</details>

**`filters`**

- Type: object

<details>
<summary>Show object format</summary>

**`match`**

- Type: string

Filter by project name

</details>

**`page`**

- Type: object

Parameters to control offset-based pagination

<details>
<summary>Show object format</summary>

**`offset`**

- Type: integer
- Example: `200`

The (zero-based) offset of the first entity returned in the collection (defaults to 0)

**`limit`**

- Type: integer

The maximum number of entities to return (defaults to 20, maximum is 50)

</details>

**`include`**

- Type: string
- Example: `"active_plan,transfer"`

Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`.

## Returns

Returns an array of resource objects of type [site](https://www.datocms.com/docs/content-management-api/resources/site.md)

## Examples

###### Example Basic example

```javascript
import { buildClient } from "@datocms/dashboard-client";

async function run() {
  const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });

  // iterates over every page of results
  for await (const site of client.sites.listPagedIterator()) {
    // Check the 'Returned output' tab for the result ☝️
    console.log(site);
  }
}

run();
```

## Related content in "Dashboard API"

- [Account](https://www.datocms.com/docs/dashboard-api/resources/account.md)
- [Session](https://www.datocms.com/docs/dashboard-api/resources/session.md)
- [OAuth application](https://www.datocms.com/docs/dashboard-api/resources/oauth-application.md)
- [Organization](https://www.datocms.com/docs/dashboard-api/resources/organization.md)
- [Organization role](https://www.datocms.com/docs/dashboard-api/resources/organization-role.md)
- [Organization invitation](https://www.datocms.com/docs/dashboard-api/resources/organization-invitation.md)
- [Organization membership](https://www.datocms.com/docs/dashboard-api/resources/organization-membership.md)
- [Organization mandate request](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate-request.md)
- [Organization mandate](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate.md)
- [Project](https://www.datocms.com/docs/dashboard-api/resources/site.md)
- [Retrieve a project](https://www.datocms.com/docs/dashboard-api/resources/site/self.md)
- [List all projects](https://www.datocms.com/docs/dashboard-api/resources/site/instances.md)
- [Create a new project](https://www.datocms.com/docs/dashboard-api/resources/site/create.md)
- [Update project](https://www.datocms.com/docs/dashboard-api/resources/site/update.md)
- [Delete a project](https://www.datocms.com/docs/dashboard-api/resources/site/destroy.md)
- [Duplicate an existing project](https://www.datocms.com/docs/dashboard-api/resources/site/duplicate.md)
- [Site invitation](https://www.datocms.com/docs/dashboard-api/resources/site-invitation.md)
- [Site transfer request](https://www.datocms.com/docs/dashboard-api/resources/site-transfer.md)
- [Account subscription](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-billing-profile.md)
- [Invoice](https://www.datocms.com/docs/dashboard-api/resources/invoice.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/resource-usage.md)
- [Daily Usage](https://www.datocms.com/docs/dashboard-api/resources/daily-usage.md)
- [Subscription limit](https://www.datocms.com/docs/dashboard-api/resources/subscription-limit.md)
- [Subscription feature](https://www.datocms.com/docs/dashboard-api/resources/subscription-feature.md)
- [Job result](https://www.datocms.com/docs/dashboard-api/resources/job-result.md)
- [Per-project subscription](https://www.datocms.com/docs/dashboard-api/resources/site-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/site-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile.md)