# Export Project

## Export projects

Both features are supported through API call. Click [here](https://docs.datasaur.ai/api/export-project) for more detailed explanation.

1. Go to the **File** menu.
2. Select **Export file** or **Export all files**.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-0c99edcd16b4499693b2a0da169a50592cb5271b%2FProject%20-%20file%20menu%20-%20export.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Export** **file:** Export only the currently opened file. The output reflects the latest project state and does not include all project data.
* **Export all files:** Export all files in the project. For projects with multiple assignees, each labeled version is exported separately. The output is a `.zip` file containing three folders:
  * **DOCUMENT-Labeler-name:** Contains files labeled by each labeler.
  * **REVIEW:** Contains the final version, including auto-accepted labels and reviewer edits.
  * **ROOT:** Contains the original raw text without any labels or edits.

### Include unresolved labels / answers in the export result

You can include unresolved labels or answers inside the export result. This is supported for **span**, **row**, and **document labeling** projects in both **Datasaur Schema** and **CSV** formats.

#### Enable the option

When you select a supported export format, a checkbox will appear. If selected, unresolved labels or answers will be included in the export.

![](https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2d54c653d09c8b2031f2cfd8c9aab2077e7ecad0%2FProject%20-%20export%20all%20files%20dialog.png?alt=media)

#### Export result

* **Comma-separated values (.csv)**
  * **New column: Label Status**

    This column indicates whether a line is conflicted or resolved.
  * **New column: Line**

    This column indicates the line number.
* **Datasaur Schema (.json)**
  * **New values:** <mark style="color:red;">`rowAnswers`</mark>, <mark style="color:red;">`documentAnswers`</mark>, <mark style="color:red;">`spanLabels`</mark>, <mark style="color:red;">`arrowLabels`</mark>

    The conflicted values will be added to <mark style="color:red;">`rowAnswers`</mark>, <mark style="color:red;">`documentAnswers`</mark>, <mark style="color:red;">`spanLabels`</mark>, or <mark style="color:red;">`arrowLabels`</mark>.

    You can differentiate between resolved and unresolved answer by looking at <mark style="color:red;">`labeledBy`</mark> attribute. Unresolved label should have **CONFLICT** as their <mark style="color:red;">`labeledBy`</mark> value.

The following section will give you some illustration on the result.

* **Span labeling**
  * **Datasaur Schema (.json)**

    Conflicted labels will be added to <mark style="color:red;">`spanLabels`</mark> or <mark style="color:red;">`arrowLabels`</mark>.
  * **Comma-separated values (.csv)**

    This format is similar to the Amazon Comprehend CSV export format, but with an additional column titled `Label Status`.
* **Row and document Labeling**
  * **Datasaur Schema (.json)**

    Unresolved answer will not be added to the answer set (<mark style="color:red;">`rowAnswerSets`</mark> for Row Labeling, while <mark style="color:red;">`documentAnswerSets`</mark> for Document Labeling)

    However, it will be added to <mark style="color:red;">`rowAnswers`</mark> for Row Labeling, while <mark style="color:red;">`documentAnswers`</mark> for Document Labeling, along with the resolved answers.
  * **Comma-separated values (.csv)**

    Adds `Label Status` and `Line` column.

    There may be cases where a single line contains both resolved and unresolved answers due to consensus. In such cases, the answers are split into two lines: one for resolved answers and one for unresolved answers.

## Export methods

When exporting a file, you can choose from several delivery options. All methods are also available via [API](https://datasaurai.gitbook.io/datasaur/api/apis-docs).

![](https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-e93cf944562cfbafabd1759ac6bf2f62abbaa274%2FExport%20all%20files%20dialog%20-%20highlight%20export%20method.png?alt=media)

### **Download**

* The export result is uploaded to Datasaur's storage bucket, and you download it directly to your device via a generated link.
* Keep in mind that the time needed to generate the link will be directly proportional to the size of the project.

### **Email**

* Datasaur will generate a download link and send it to the email address used for your account.
* The link **expires in 6 hours**.

### **Webhook**

* The export result is sent as a payload in a webhook request.
* See the [Webhook](https://docs.datasaur.ai/api/export-project/custom-webhook) documentation for full details.
* The link **expires in 6 hours**.

### **External Object Storage**

* The export result is uploaded directly to your selected external storage bucket.
* You can also add a prefix to the file name. The prefix is appended directly without a separator. For example:
  * Prefix: `test`
  * File name: `name.json`
  * Result: `testname.json`

## Export multiple projects from the Projects page

You can export multiple projects with the **same project settings** in the **Projects** page.

1. Select all projects you want to export.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-cf5d6539c06d3fef07a1eb861771c73bdea23cf9%2FProjects%20-%20main%20page%20-%20bulk%20selection.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Click **Export** button. You can choose the export format and method. The output will be a `.zip` file.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2c684b44c9e61b9dcbdc7004d71286bd2fac3a3c%2FProjects%20-%20main%20page%20-%20bulk%20export%20dialog.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
We recommend exporting up to 10 projects at once for better performance.
{% endhint %}


---

# 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.datasaur.ai/data-studio-projects/export-project.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.
