> 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/datasets/create-and-upload/download-a-dataset.md).

# Download a Dataset

Export your dataset of images and annotations for training locally.

## Web App

{% hint style="info" %}
Refer to the [Download a Roboflow Universe Dataset](https://docs.roboflow.com/datasets/universe/universe/download-a-universe-dataset.md) documentation if you want to download a dataset from Roboflow Universe.
{% endhint %}

To download or export a dataset from Roboflow, first navigate to the Dataset page in your project.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-296b711dc71c98f15db570f16d7378e415a0b382%2Fimage%20(473).png?alt=media" alt="" width="165"><figcaption></figcaption></figure>

To the right of the image search bar, click Export.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-67a7e608c82e2db023fac82cffdfa3fcf19c84e2%2Fimage%20(474).png?alt=media" alt="" width="344"><figcaption></figcaption></figure>

A modal will appear giving you options for formats to download your data as. Roboflow supports [over 50 different annotation formats](https://roboflow.com/formats).

You can also choose to either download your dataset directly as a zip file or be provided with a code snippet to download the data locally.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-636e02dd0aefc5c3da02f4c20c8441f357b426dd%2Fimage%20(475).png?alt=media" alt=""><figcaption></figcaption></figure>

If you choose the code option, the code shows right away in "Jupyter" (Python) and "Terminal" (CLI) tabs. Run it to export and download the images that match your current search, in the format you picked.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-a86cf54b729c808095b7edfd3f6112e15b6227bf%2Fimage%20(477).png?alt=media" alt=""><figcaption></figcaption></figure>

### FAQs

<details>

<summary>Why don't my zipped image counts match the UI?</summary>

There are two possibilities for this:

* An image randomly failed to download in the respective cloudly service.
* The image is corrupt or too large, leading to some errors.

Our application only generates the export zip once and then re-downloads the same export if the same format (e.g. COCO) is selected. If you ever notice that the image count is off in the download, you can always create a new version and re-download.

\\

</details>

<details>

<summary>Are the downloaded images the original quality?</summary>

No. To prevent training slowdowns, we compress images at a level that maintains a balance between training speed and resolution needed for sufficient model performance.

If you're looking to download a single original quality image, you can do so by clicking on a image on your dataset and selecting "Download Image".

If you're looking to download multiple original quality images, we recommend using our [CLI](#cli) or our [Image Search API](https://docs.roboflow.com/datasets/manage/manage-datasets/dataset-search.md#search-images-across-a-workspace).

</details>

## Python SDK

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")
```

## CLI

If your project has a saved version, you can download the images and annotations for that version using the command line.

### Command

```bash
roboflow version download <workspace/project/version> -f <format> -l <location>
```

Or use the shorthand alias:

```bash
roboflow download <workspace/project/version> -f <format> -l <location>
```

Where:

* `<format>` is one of the supported dataset formats (like `voc`, `yolov8`, `coco`, `darknet`, etc). Run `roboflow version download --help` for the full list.
* `<location>` is the local path to download to (optional - defaults to current directory)
* The dataset URL uses [resource shorthand](https://docs.roboflow.com/reference/platform/cli#resource-shorthand): `workspace/project/version`, `project/version`, or just specify `-p project` and a version number.

### Examples

Download a dataset version in VOC format:

```bash
roboflow download -f voc -l ./my-dataset my-workspace/hand-gestures/1
```

Download using project shorthand (uses your default workspace):

```bash
roboflow download -f yolov8 hand-gestures/1
```

Download publicly available datasets from [Roboflow Universe](https://universe.roboflow.com):

```bash
roboflow download -f coco joseph-nelson/chess-pieces-new/25
```

### JSON Output

For scripting and automation, use `--json` to get structured output:

```bash
roboflow download hand-gestures/1 -f yolov8 --json
```

```json
{
  "workspace": "my-workspace",
  "project": "hand-gestures",
  "version": 1,
  "format": "yolov8",
  "location": "./hand-gestures-1"
}
```

## MCP Server

Connect your AI agent to the [MCP Server](https://docs.roboflow.com/agents/mcp-server) and it can fetch a dataset download with these tools:

<table data-search="false"><thead><tr><th width="290">Tool</th><th>Description</th></tr></thead><tbody><tr><td><code>versions_export</code></td><td>Check or trigger a dataset export for a version.</td></tr><tr><td><code>versions_get</code></td><td>Get version info including splits and its trainings.</td></tr></tbody></table>
