# getDataSetsById

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

Defined in: [packages/synapse-core/src/warm-storage/get-data-sets-by-id.ts:50](https://github.com/FilOzone/synapse-sdk/blob/0c729dad461472f017e4d84f8e6ac16e6afbe7c0/packages/synapse-core/src/warm-storage/get-data-sets-by-id.ts#L50)

Get one or more FWSS data sets by ID via a single multicall.

Duplicate IDs are read once and empty input returns an empty map. Every
requested ID is present in the result; a non-existent data set maps to
`null`, matching [getDataSet](/reference/filoz/synapse-core/warm-storage/functions/getdataset/).

## Parameters

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

## Returns

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

Data-set information indexed by ID [getDataSetsById.OutputType](/reference/filoz/synapse-core/warm-storage/namespaces/getdatasetsbyid/type-aliases/outputtype/)

## Throws

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

## Example

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

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

const dataSets = await getDataSetsById(client, {
  dataSetIds: [1n, 2n],
})

console.log(dataSets.get(1n))
```