google-cloud-documentai
Google Cloud Documentai API client library
What it is and what it does
This is the official Python client for Google Cloud Document AI, a managed service that uses machine learning to extract and classify information from documents. It wraps Google's REST and gRPC APIs, allowing you to send documents to pre-trained or custom Document AI processors and receive structured data back. The library handles authentication, request serialization, and response parsing, so you work with Python objects rather than raw JSON.
The package is built on standard Google Cloud infrastructure (grpcio, protobuf, google-api-core, google-auth) and requires an active Google Cloud project with Document AI enabled and at least one deployed processor. It's intended for developers integrating document processing into applications—extracting invoices, forms, contracts, or other business documents at scale.
Use it for:
- Extract line items, totals, and vendor details from invoices and receipts automatically
- Parse form responses and structured fields from application forms or surveys
- Classify and extract key information from contracts or legal documents
- Batch process large volumes of documents to populate databases or data warehouses
- Build document intake workflows that route documents based on extracted metadata
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for Google Cloud Document AI, which parses structured information from unstructured or semi-structured documents using Google's natural language, computer vision, and machine learning capabilities.
Yes, if you have a Google Cloud project with Document AI enabled and need to process documents programmatically. The library is production-stable, actively maintained, has no known vulnerabilities, and integrates seamlessly with Google Cloud authentication. The main prerequisite is a working Google Cloud setup and a deployed processor; without those, the library alone is not useful.
Install
google-cloud-documentai on PyPI
pip
pip install google-cloud-documentaiuv
uv add google-cloud-documentaipoetry
poetry add google-cloud-documentaiInstalling google-cloud-documentai
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a release 72 days ago. Depends on standard Google Cloud libraries (grpcio, protobuf, google-api-core, google-auth, proto-plus), all widely used and well-maintained.
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; you must include a copy of the license and note any modifications.
Quickstart
pip install google-cloud-documentai
from google.cloud import documentai_v1
client = documentai_v1.DocumentProcessorServiceClient()
name = client.processor_path(project_id, location, processor_id)
response = client.process_document(request={"name": name, "raw_document": raw_document})
Requires Google Cloud project with Document AI enabled, valid credentials (via GOOGLE_APPLICATION_CREDENTIALS or Application Default Credentials), and a deployed Document AI processor. Python >= 3.10 required.
Verify before relying
- Specific supported document types and formats beyond the general 'unstructured or semi-structured' claim
- Performance characteristics or throughput limits for batch processing
- Whether the library supports all Document AI processor types or only a subset
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — grpcio, proto-plus, protobuf, google-api-core, google-auth |
| Maintenance | actively maintained — 72 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,878,766/month — #2,466 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_cloud_documentai-3.15.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
google-cloud-automlPython client library for Google Cloud AutoML,…
permissive · top 1,000 on PyPI
google-cloud-documentai-toolboxProgrammatically manage, manipulate, and…
permissive · top 15,000 on PyPI
google-cloud-visionProvides a Python client library for Google…
permissive · top 1,000 on PyPI
google-cloud-firestorePython client library for Google Cloud…
permissive · top 1,000 on PyPI
google-cloud-languagePython client library for Google Cloud Natural…
permissive · top 1,000 on PyPI
google-cloud-workflowsPython client library for Google Cloud…
permissive · top 1,000 on PyPI
google-cloud-translatePython client library for Google Cloud…
permissive · top 1,000 on PyPI
google-cloud-recommendations-aiPython client library for Google Cloud…
permissive · top 5,000 on PyPI
unstructured-clientHTTP client SDK for the Unstructured Platform…
permissive · top 5,000 on PyPI
google-cloud-videointelligencePython client library for Google Cloud Video…
permissive · top 1,000 on PyPI