# Export a Dataset Version

You can export data from Roboflow at any time. You can export data using the Roboflow web interface or our Python package.

To export data, first generate a dataset version in the Roboflow dashboard. You can do so on the "Versions" page associated with your project.

After you have generated a dataset, click "Export" next to your dataset version:

<figure><img src="/files/RvFiwewLi3VzH3iwiXHt" alt="" width="563"><figcaption></figcaption></figure>

You can download your data in a wide variety of formats. You can see a full list of supported export formats in the "Export" tab of our [formats directory](https://roboflow.com/formats).

After selecting an export format, you can choose to either download the data as a `.zip` file, or as a `curl` link to download from the command line.

![Exporting to a .zip folder on your device.](/files/-Mhen8pzAqoFOsCB6mpM)

{% hint style="warning" %}
*The `curl` and Python code will contain a private key unique to your account. Do not share this key!*
{% endhint %}

![The window that appears for "show download code" after selecting "Continue."](/files/-MAEBtt6UYVFGW5C_5fK)

## Notes

Dataset versions are designed to be used as training data for computer vision models. Therefore, we make some optimizations to improve the training experience and performance of the models.

### Image Compression

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 the original quality image, you can do so by clicking on a image on your dataset and selecting "Download Image".

<figure><img src="/files/AOVtKDEFbn4qj3ardVoE" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
You can also access your images programmatically via the [Image Details API](/developer/rest-api/manage-images/get-details-about-an-image.md). The `image.urls.original` property states the link to the original quality image.
{% endhint %}

If you're looking to download your entire dataset original quality images, you can do so by using the [Image Search API](/developer/rest-api/manage-images/get-details-about-an-image.md). Here's a code snippet you can use to do that:

```python
import os
import requests
from roboflow import Roboflow

rf = Roboflow("YOUR_ROBOFLOW_API_KEY")

project = rf.project("my-dataset-id")

records = []

for page in project.search_all(
    offset = 0,
    limit = 100,
    in_dataset = True,
    batch = False,
    fields = ["id", "name", "owner"],
):
    records.extend(page)

print(f"{len(records)} images found")

for record in records:
        base_url = "https://source.roboflow.com"
        url = f"{base_url}/{record['owner']}/{record['id']}/original.jpg"

        try:
            response = requests.get(url)
            response.raise_for_status()

            # Save to temp directory
            save_path = os.path.join('temp_images', record['name'])
            with open(save_path, 'wb') as f:
                f.write(response.content)

            print(f"Downloaded: {record['name']}")

        except requests.exceptions.RequestException as e:
            print(f"Error downloading image: {e}")

```

### Accepted Characters

To prevent issues from arising during training, we sanitize class names both at upload/import and export. At export, we perform the following:

* Class names are converted to ASCII
  * Where possible, characters are anglicized (ex: `ü` to `u`)
  * Otherwise, they are replaced with a dash (`-`)

{% hint style="info" %}
[Class name sanitization also occurs during upload](/datasets/adding-data.md#class-name-sanitization)
{% endhint %}

### Export with the Python Package

You can both generate versions and export datasets with the Python package.

{% content-ref url="/spaces/e5GEiPeDoFksvZv1vH3A/pages/0zziwbyAo255wXPCoF3O" %}
[Create a Dataset Version](/developer/python-sdk/create-a-dataset-version.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/datasets/dataset-versions/exporting-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
