# download

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

Defined in: [packages/synapse-core/src/piece/download.ts:21](https://github.com/FilOzone/synapse-sdk/blob/7fdc04df4e3c52366a9f0cd55da4c05e20b2ed82/packages/synapse-core/src/piece/download.ts#L21)

Download a piece from a URL.

## Parameters

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

## Returns

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

Data [download.ReturnType](/reference/filoz/synapse-core/piece/namespaces/download/type-aliases/returntype/)

## Throws

Errors [download.ErrorType](/reference/filoz/synapse-core/piece/namespaces/download/type-aliases/errortype/)