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

# batch_get_documents

> Retrieve multiple documents by their IDs in a single batch operation

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    def batch_get_documents(
        document_ids: List[str],
        folder_name: Optional[Union[str, List[str]]] = None,
    ) -> List[Document]
    ```
  </Tab>

  <Tab title="Async">
    ```python theme={null}
    async def batch_get_documents(
        document_ids: List[str],
        folder_name: Optional[Union[str, List[str]]] = None,
    ) -> List[Document]
    ```
  </Tab>
</Tabs>

## Parameters

* `document_ids` (List\[str]): List of document IDs to retrieve
* `folder_name` (str | List\[str], optional): Optional folder scope. Accepts canonical paths or a list of paths/names.

## Returns

* `List[Document]`: List of document metadata for found documents

## Examples

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    from morphik import Morphik

    db = Morphik()

    docs = db.batch_get_documents(["doc_123", "doc_456", "doc_789"])
    for doc in docs:
        print(f"Document {doc.external_id}: {doc.metadata.get('title')}")
    ```
  </Tab>

  <Tab title="Async">
    ```python theme={null}
    from morphik import AsyncMorphik

    async with AsyncMorphik() as db:
        docs = await db.batch_get_documents(["doc_123", "doc_456", "doc_789"])
        for doc in docs:
            print(f"Document {doc.external_id}: {doc.metadata.get('title')}")
    ```
  </Tab>
</Tabs>

## Document Properties

Each `Document` object in the returned list has the following properties:

* `external_id` (str): Unique document identifier
* `content_type` (str): Content type of the document
* `filename` (Optional\[str]): Original filename if available
* `metadata` (Dict\[str, Any]): User-defined metadata
* `storage_info` (Dict\[str, str]): Storage-related information
* `system_metadata` (Dict\[str, Any]): System-managed metadata
* `chunk_ids` (List\[str]): IDs of document chunks
* `folder_path` (Optional\[str]): Canonical folder path (includes nested parents when scoped)
