> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# getDatasets

***

# Function: getDatasets()

## Call Signature

```ts theme={null}
function getDatasets(): Promise<DatasetDBType[]>;
```

Defined in: [src/utils/datasets.ts](https://github.com/rungalileo/galileo-js/blob/main/src/utils/datasets.ts)

Lists all datasets.

### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)\[]>

A promise that resolves to the list of datasets.

## Call Signature

```ts theme={null}
function getDatasets(options: object): Promise<DatasetDBType[]>;
```

Defined in: [src/utils/datasets.ts](https://github.com/rungalileo/galileo-js/blob/main/src/utils/datasets.ts)

Lists datasets with optional filtering by project.

### Parameters

#### options

(Optional) Options for listing datasets.

##### limit?

`number`

(Optional) The maximum number of datasets to return.

##### projectId?

`string`

(Optional) The ID of the project that uses the datasets.

##### projectName?

`string`

(Optional) The name of the project that uses the datasets.

### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)\[]>

A promise that resolves to the list of datasets.
