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

> Retrieve a folder by name, canonical path, or UUID

> [tab] Sync
>
> ```python theme={null}
> def get_folder(
>     folder_id_or_name: str,
> ) -> Folder
> ```

> [tab] Async
>
> ```python theme={null}
> async def get_folder(
>     folder_id_or_name: str,
> ) -> Folder
> ```

## Parameters

* `folder_id_or_name` (str): Folder identifier. Accepts the folder's UUID, name, or canonical path (e.g., `/projects/alpha/specs`; leading slash optional).

## Returns

* `Folder`: Folder object that can be used to scope operations (ingest, query, etc.).

Folder objects include hierarchy metadata such as `full_path`, `parent_id`, `depth`, and `child_count`, mirroring the server response.

## Examples

> [tab] Sync
>
> ```python theme={null}
> from morphik import Morphik
>
> db = Morphik()
> folder = db.get_folder("marketing_docs")
> same_folder = db.get_folder(folder.id)
> assert folder.id == same_folder.id
> ```

> [tab] Async
>
> ```python theme={null}
> from morphik import AsyncMorphik
>
> async with AsyncMorphik() as db:
>     folder = await db.get_folder("marketing_docs")
>     same_folder = await db.get_folder(folder.id)
>     assert folder.id == same_folder.id
> ```


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