> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/developer/python-sdk/download-a-dataset.md).

# Download a Dataset

Once a project has a generated version, you can download its images and annotations in any of the supported export formats. Use `Version.download()` for the synchronous "fetch and unzip" flow, or `Version.export()` to ask Roboflow to (re)generate the export asynchronously without downloading.

## Download a version

```python
import roboflow

rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("my-detector")
version = project.version(3)

dataset = version.download(
    model_format="yolov8",      # or "voc", "coco", "darknet", etc.
    location="./my-detector-v3", # optional, defaults to ./<project>-<version>
    overwrite=False,             # optional, set True to re-download an existing dir
)

print(dataset.location)  # path on disk
```

### Parameters

* `model_format` (str) - export format. Common values: `yolov8`, `yolov11`, `voc`, `coco`, `darknet`, `tfrecord`, `createml`, `multiclass`. The full list is project-type-dependent - pass an invalid value to get the full list back as an error.
* `location` (str, optional) - destination directory. Defaults to `./<project-slug>-<version>`.
* `overwrite` (bool, default `False`) - re-download even if the target directory already exists.

The returned `Dataset` object has a `.location` attribute pointing to the unzipped directory.

## Trigger a fresh export without downloading

```python
ok = version.export(model_format="coco")
```

This kicks off a server-side regeneration of the export. The call returns once the generation is complete (or raises `RuntimeError` if it fails). After that, a subsequent `download()` will fetch the freshly generated artifact.

## Public Universe datasets

You don't need to be a member of the workspace to download a public Universe project - your API key just needs Universe access:

```python
project = rf.workspace("roboflow-100").project("poker-cards-cxcvz")
project.version(1).download("yolov8", location="./poker-cards")
```

## REST and CLI equivalents

* REST: the dataset link comes back as part of [View a Version](/developer/rest-api/versions/view-a-version.md); also see [Export Data](/developer/rest-api/export-data.md).
* CLI: see [Download a Dataset (CLI)](/developer/command-line-interface/download-a-dataset.md).
