Google Cloud

Document AI Complete Guide: PDF/Image OCR, Invoices, Contracts & Custom Extractors

2026-05-24
NicheeLab Editorial Team

Document AI is GCP's document AI platform that automatically extracts structured data from PDFs and images. It ships with 50+ specialized processors (invoices, receipts, contracts, IDs, and more) on top of general-purpose OCR and Form Parser. Pair it with Gemini and you get a full document processing pipeline: OCR → structured extraction → summarization, classification, and Q&A.

Processor Types

CategoryProcessorUse Case
GeneralDocument OCRText extraction
GeneralForm ParserKey-value extraction
GeneralLayout ParserLayout structure extraction
FinanceInvoice ParserInvoices
FinanceExpense (receipts)Receipts
FinanceBank StatementBank statements
FinancePay Stub / W-2 / 1099Pay stubs and tax forms
IDUS Driver License / PassportID documents
Real EstateMortgage / LeaseMortgage and lease contracts
HealthcareHealthcare FormsMedical forms
CustomCustom Extractor / ClassifierIndustry-specific

Typical Pipeline

  1. Upload the document to GCS
  2. Eventarc trigger fires Cloud Run
  3. Extract with Document AI (e.g., Invoice Parser)
  4. Evaluate against a confidence score threshold (e.g., 0.85)
  5. Pass → auto-insert into BigQuery / your DB
  6. Fail → route to a Human-in-the-loop (HITL) review UI
  7. Layer on Gemini for summarization, classification, and Q&A

Python Sample (Invoice Parser)

from google.cloud import documentai_v1 as documentai

client = documentai.DocumentProcessorServiceClient()
processor_name = "projects/PROJECT/locations/us/processors/INVOICE_PROCESSOR_ID"

with open("invoice.pdf", "rb") as f:
    raw_doc = documentai.RawDocument(content=f.read(), mime_type="application/pdf")

request = documentai.ProcessRequest(name=processor_name, raw_document=raw_doc)
result = client.process_document(request=request)

for entity in result.document.entities:
    print(f"{entity.type_}: {entity.mention_text} (conf: {entity.confidence:.2f})")
# 出力例:
# invoice_id: INV-2026-001 (conf: 0.99)
# total_amount: 12500 (conf: 0.98)
# supplier_name: ACME Corp (conf: 0.95)

Pricing (US, 2026)

ProcessorPrice / 1,000 pages
Document OCR$1.50
Form Parser$30
Layout Parser$10
Invoice / Expense / W-2$30
Mortgage / Loan$65
Custom Extractor (inference)$30
Custom training$5/h

Gemini Integration Pattern

# Document AI で構造化抽出
extracted = process_with_doc_ai(pdf_path)
text = extracted.document.text

# Gemini で要約・Q&A
from vertexai.generative_models import GenerativeModel
gemini = GenerativeModel("gemini-2.0-pro-001")

summary = gemini.generate_content(
    f"以下の契約書を 5 行で要約してください:\n{text}"
)

answer = gemini.generate_content(
    f"以下の契約書を読んで、解約条件を教えてください:\n{text}"
)

Comparison with Other Cloud OCR Services

FeatureDocument AIAWS TextractAzure Form Recognizer
OCRExcellentExcellentExcellent
Form extractionExcellent (Form Parser)ExcellentExcellent
Specialized processors50+Invoices, receipts, IDsInvoices, receipts, IDs
Custom trainingExcellentExcellent (Custom Queries)Excellent (Custom Model)
OCR pricing$1.50/1k$1.50/1k$1/1k

Typical Use Cases

  • Accounting: automated ingestion of invoices and receipts (expense management SaaS)
  • Finance: verifying loan applications and pay stubs
  • Real estate: digitizing rental contracts
  • Healthcare: structuring insurance forms and medical reports
  • HR: parsing resumes and employment contracts
  • Logistics: shipping slips and customs documents

What is Document AI?

A managed service that automatically extracts structured data from PDFs and images. It combines OCR and ML to process invoices, receipts, contracts, forms, ID documents, and more.

What processors are available?

Document OCR (general purpose), Form Parser, Layout Parser, 50+ specialized processors (invoices, receipts, W-2, W-9, driver's licenses, passports, etc.), and Custom Extractor (trained on your own data).

What is the Custom Extractor?

A feature for handling industry-specific forms by labeling and training the model yourself. Combine it with the Custom Document Classifier to build a fully bespoke document processing pipeline.

How is pricing structured?

Document OCR is $1.50 per 1,000 pages, Form Parser is $30 per 1,000 pages, and specialized processors run $30-65 per 1,000 pages. Custom processors charge separately for training and inference.

How does it integrate with Vertex AI and Gemini?

The standard pattern is extract with Document AI, then summarize, classify, or answer questions with Gemini. You can also feed the output into Vertex AI Search to power a RAG-based architecture.

Is Document AI Warehouse deprecated?

Yes — it was deprecated in 2024 and folded into Vertex AI Search. Long-term storage plus search is now handled through Vertex AI Search by default.

How does it compare to other cloud OCR services?

AWS Textract and Azure Form Recognizer offer comparable capabilities. Document AI's strength is the broadest catalog of specialized processors, with strong HIPAA and PCI compliance coverage.

How do you use confidence scores?

Every extracted value comes with a confidence score from 0 to 1. The standard pattern is to route anything below your threshold to a Human-in-the-loop (HITL) review queue.

Related Articles: AI / Document Processing

Vertex AI Agent Builder 完全ガイド|Conversational Agents・Vertex AI Search・Tool Use (GCP)

Google Cloud Vertex AI Agent Builder の全機能解説。Conversational Agents (Dialogflow CX 後継)、Vertex AI Search、Tool Use、Grounding、Playbook、料金、ChatGPT GPTs / Copilot Studio 比較を網羅。

Vision AI / Video Intelligence 完全ガイド|画像・動画解析 API (GCP)

Google Cloud Vision API / Video Intelligence / Vertex AI Vision の全機能解説。OCR、物体検出、顔認識、SafeSearch、AutoML Vision、Edge デプロイ、料金、AWS Rekognition / Azure CV 比較を網羅。

Cloud Build 完全ガイド|CI/CD・cloudbuild.yaml・Private Pool・GitHub 連携 (GCP)

Google Cloud Cloud Build の全機能解説。cloudbuild.yaml、トリガー設定、Private Pool、Workload Identity、Build Approvals、Cloud Deploy 連携、AWS CodeBuild / Azure DevOps 比較を網羅。

Generative AI Leader (GAIL) 完全ガイド|Google Cloud 生成 AI 認定 (2025 年 5 月リリース新試験)

Google Cloud Generative AI Leader (GAIL、2025-05-14 リリース) の完全ガイド。4 ドメイン (生成 AI 基礎 30% / GCP 提供サービス 35% / モデル出力改善 20% / ビジネス戦略 15%)、Gemini ファミリー、Vertex AI Agent Builder、RAG、ビジネス導入観点を日本語で網羅。

* Google Cloud is a trademark of Google LLC. For the latest information, see the official Document AI documentation.

Check what you learned with practice questions

Practice with certification-focused question sets

View GCP Exam Prep
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Google Cloud

Google Cloud Certification Roadmap (2026)

Choose your GCP certification path — Foundational, Associate...

Google Cloud

CDL Cloud Digital Leader: Complete Exam Guide (2026)

Pass the Cloud Digital Leader exam — cloud business value, G...

Google Cloud

GAIL Generative AI Leader: Complete Exam Guide (2026)

Pass the Generative AI Leader exam — Gemini, Vertex AI, Work...

Google Cloud

Vertex AI Fundamentals for GCP Certs (2026)

Vertex AI basics every cert candidate needs — Workbench, Pip...

Google Cloud

Associate Cloud Engineer (ACE): Complete Guide (2026)

Pass the Associate Cloud Engineer exam — Console, gcloud, pr...

Browse all Google Cloud articles (103)
© 2026 NicheeLab All rights reserved.