# getPiecesForDataSet

> **getPiecesForDataSet**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ReturnType`](/reference/filoz/synapse-core/sp/namespaces/getpiecesfordataset/type-aliases/returntype/)\>

Defined in: [packages/synapse-core/src/sp.ts:345](https://github.com/FilOzone/synapse-sdk/blob/32f86959b0bf15557657ea412e31a0897440ca98/packages/synapse-core/src/sp.ts#L345)

Get the pieces for a data set from the PDP API.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/getpiecesfordataset/type-aliases/optionstype/) | [getPiecesForDataSet.OptionsType](/reference/filoz/synapse-core/sp/namespaces/getpiecesfordataset/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ReturnType`](/reference/filoz/synapse-core/sp/namespaces/getpiecesfordataset/type-aliases/returntype/)\>

Pieces with URLs. [getPiecesForDataSet.ReturnType](/reference/filoz/synapse-core/sp/namespaces/getpiecesfordataset/type-aliases/returntype/)

## Throws

Errors [getPiecesForDataSet.ErrorType](/reference/filoz/synapse-core/sp/namespaces/getpiecesfordataset/type-aliases/errortype/)