> ## Documentation Index
> Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# get_document_download_url

> Generate a presigned URL to download a document's raw file content

> [tab] Sync
>
> ```python theme={null}
> def get_document_download_url(document_id: str, expires_in: int = 3600) -> Dict[str, Any]
> ```

> [tab] Async
>
> ```python theme={null}
> async def get_document_download_url(document_id: str, expires_in: int = 3600) -> Dict[str, Any]
> ```

## Parameters

* `document_id` (str): External ID of the document.
* `expires_in` (int, optional): URL expiration time in seconds. Default is 3600 (1 hour).

## Returns

* `Dict[str, Any]` containing:
  * `download_url` – presigned URL usable in a browser or `requests.get`.
  * `filename`, `content_type`, `expires_in`, `document_id` (echoed back).

## Example

```python theme={null}
info = db.get_document_download_url(doc.external_id)
print(info["download_url"])
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.