> ## 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

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    def get_document_download_url(document_id: str, expires_in: int = 3600) -> Dict[str, Any]
    ```
  </Tab>

  <Tab title="Async">
    ```python theme={null}
    async def get_document_download_url(document_id: str, expires_in: int = 3600) -> Dict[str, Any]
    ```
  </Tab>
</Tabs>

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