# Export docs overview

Exporting files refers to exporting Feishu documents, spreadsheets, and Base as local files, including formats such as Word, Excel, PDF, and CSV. This document describes the complete steps for exporting files.

## Notes

- When exporting to `docx`, there is a limit on the size of document resources (such as images). If the total size of resources in the document exceeds 1GB, the export will fail.
- When exporting to `pdf`, there is a limit on the size of document resources (such as images). If the total size of resources in the document exceeds 128MB, the export will fail.
- You should download the exported file promptly. After 10 minutes of the export task ending, the exported files will be deleted, making them inaccessible for download.

## Enabling watermarking consideration
- When watermarking is enabled within the enterprise:
    - Exporting using the application identity will use the application ID as the watermark, such as `cli_a2c2xxxxxxxxd01b`.
    - Exporting using the user identity will use the user identifier as the watermark.

## Supported export file types

OpenAPI supports exporting the following Feishu cloud documents to the following file types.

Feishu Cloud Document | Supported Export File Types
---|---
- [New documents](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-overview) with document type `docx`<br>- [Old version documents](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs/upgraded-docs-access-guide/upgraded-docs-openapi-access-guide)with document type `doc`(deprecated) | - Microsoft Word documents with extension `.docx`<br>- Files with extension `.pdf`
- [Base](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/bitable-overview) <br>-  [Spreadsheet](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview) | - Microsoft Excel tables with extension `.xlsx`<br>- Files with extension `.csv`

## Export steps

### Step 1: Create export task

Call the [Create Export Task](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create) API to create a task for exporting cloud documents and obtain the export ID.
**Notice**：If you want to export documents of type Knowledge Base (`wiki`), you need to first obtain the `obj_token` (document token) and `obj_type` (document type) corresponding to the node through [Get Knowledge Space Node Information](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get_node), and then create the export task.

### Step 2: Query export task result

Call the [Query Export Task Result](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get) API to retrieve the export result and export file information based on the export task ID (`ticket`) returned in step one.

### Step 3: Download exported file

Call the [Download Exported File](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download) API to download the exported file based on the `token` of the export file returned in step two.
**Notice**：You should download the exported file promptly. After 10 minutes of the export task ending, the exported files will be deleted, making them inaccessible for download.
