# DocAIParser

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser)

Google Cloud Document AI parser.

Inherits from [`BaseBlobParser`][langchain_core.document_loaders.BaseBlobParser].

Parses documents using Google Cloud Document AI for text extraction and
layout analysis.

See [Document AI documentation](https://cloud.google.com/document-ai/docs/overview)
for detailed information.

!!! note "Installation"

    Requires additional dependencies:

    ```bash
    pip install langchain-google-community[docai]
    ```

## Signature

```python
DocAIParser(
    self,
    *,
    client: Optional[DocumentProcessorServiceClient] = None,
    project_id: Optional[str] = None,
    location: Optional[str] = None,
    gcs_output_path: Optional[str] = None,
    processor_name: Optional[str] = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `client` | `Optional[DocumentProcessorServiceClient]` | No | A `DocumentProcessorServiceClient` to use (default: `None`) |
| `location` | `Optional[str]` | No | A Google Cloud location where a Document AI processor is located (default: `None`) |
| `gcs_output_path` | `Optional[str]` | No | A path on Google Cloud Storage to store parsing results (default: `None`) |
| `processor_name` | `Optional[str]` | No | Full resource name of a Document AI processor or processor version (default: `None`) |

## Extends

- `BaseBlobParser`

## Constructors

```python
__init__(
    self,
    *,
    client: Optional[DocumentProcessorServiceClient] = None,
    project_id: Optional[str] = None,
    location: Optional[str] = None,
    gcs_output_path: Optional[str] = None,
    processor_name: Optional[str] = None,
)
```

| Name | Type |
|------|------|
| `client` | `Optional[DocumentProcessorServiceClient]` |
| `project_id` | `Optional[str]` |
| `location` | `Optional[str]` |
| `gcs_output_path` | `Optional[str]` |
| `processor_name` | `Optional[str]` |


## Methods

- [`lazy_parse()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/lazy_parse)
- [`online_process()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/online_process)
- [`batch_parse()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/batch_parse)
- [`parse_from_results()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/parse_from_results)
- [`operations_from_names()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/operations_from_names)
- [`is_running()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/is_running)
- [`docai_parse()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/docai_parse)
- [`get_results()`](https://reference.langchain.com/python/langchain-google-community/docai/DocAIParser/get_results)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/982e4015b249de8b9ba1e787746d8cc1f6d6b790/libs/community/langchain_google_community/docai.py#L40)