# getClientDataSets

> **getClientDataSets**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getclientdatasets/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/warm-storage/get-client-data-sets.ts:84](https://github.com/FilOzone/synapse-sdk/blob/aaa98045b003ec23f4318ba9a3032a434e5a20c9/packages/synapse-core/src/warm-storage/get-client-data-sets.ts#L84)

Get one bounded page of a client's data sets.

Pass the returned `nextCursor` back as `cursor`; treat it as opaque. Use
[paginate](/reference/filoz/synapse-core/core/functions/paginate/) to traverse every page. Use [getPdpDataSets](/reference/filoz/synapse-core/warm-storage/functions/getpdpdatasets/) when the
enriched PDP data-set representation is required.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`\> | The client to use to get data sets for a client address. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/warm-storage/namespaces/getclientdatasets/type-aliases/optionstype/) | [getClientDataSets.OptionsType](/reference/filoz/synapse-core/warm-storage/namespaces/getclientdatasets/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getclientdatasets/type-aliases/outputtype/)\>

A page of data set info entries [getClientDataSets.OutputType](/reference/filoz/synapse-core/warm-storage/namespaces/getclientdatasets/type-aliases/outputtype/)

## Throws

Errors [getClientDataSets.ErrorType](/reference/filoz/synapse-core/warm-storage/namespaces/getclientdatasets/type-aliases/errortype/)

## Examples

**Read the first page**

```ts
import { getClientDataSets } from '@filoz/synapse-core/warm-storage'
import { createPublicClient, http } from 'viem'
import { calibration } from '@filoz/synapse-core/chains'

const client = createPublicClient({
  chain: calibration,
  transport: http(),
})

const address = '0x0000000000000000000000000000000000000000'
const page = await getClientDataSets(client, { address })
console.log(page.items, page.nextCursor)
```

**Iterate over every page**

```ts
import { paginate } from '@filoz/synapse-core'
import { getClientDataSets } from '@filoz/synapse-core/warm-storage'

for await (const dataSet of paginate(({ cursor }) =>
  getClientDataSets(client, { address, cursor })
)) {
  console.log(dataSet.dataSetId)
}
```