canonical: https://jentic.com/apis/amazonaws.com/textract

# AWS Amazon Textract

Jentic publishes the only available OpenAPI specification for Amazon Textract, keeping it validated and agent-ready. Amazon Textract extracts printed text, handwriting, forms, tables, signatures, and ID and expense fields from scanned documents and PDFs. It returns structured JSON with bounding boxes and confidence scores for each detected element, supporting both synchronous calls for single-page documents and asynchronous jobs for multi-page PDFs stored in Amazon S3. Specialized analyzers cover invoices, receipts, identity documents, and lending packages.

## For AI agents

Extract text, forms, tables, IDs, and expense fields from scanned documents and PDFs with structured JSON output and confidence scores.

## Scope

Does not handle handwriting recognition for non-Latin scripts at GA quality, image labelling, or video analysis - use for document text, form, table, and structured-field extraction only.

## Capabilities

- Detect printed and handwritten text in single-page images via synchronous DetectDocumentText
- Analyze forms, tables, signatures, and key-value pairs through AnalyzeDocument
- Run multi-page asynchronous jobs against PDFs stored in S3 with StartDocumentAnalysis
- Extract structured fields from invoices and receipts using AnalyzeExpense
- Pull identity fields from passports and driver licenses with AnalyzeID
- Process complex lending document packages through StartLendingAnalysis
- Retrieve job results paginated by JobId with GetDocumentAnalysis and GetDocumentTextDetection

## Use cases

### Invoice and Receipt Data Capture

Accounts payable and expense management workflows use Textract's AnalyzeExpense operation to pull vendor name, invoice number, line items, totals, tax, and payment terms from scanned invoices and receipts. Returned fields include normalized labels and bounding boxes so the calling system can verify against a captured image. Synchronous calls handle single-page receipts; multi-page invoices in S3 use StartExpenseAnalysis with results retrieved via GetExpenseAnalysis.

Example prompt: Call AnalyzeExpense with a scanned invoice PDF, parse the SUMMARY_FIELDS for INVOICE_RECEIPT_ID and TOTAL, and return them as a structured payload

### Identity Document Verification

Onboarding and KYC flows use AnalyzeID to extract structured fields from US driver licenses, state IDs, and passports - name, date of birth, document number, expiration, and address. Each field is returned with normalized type, raw value, and confidence score so downstream verification logic can flag low-confidence reads for human review. Operates synchronously on a single image.

Example prompt: Call AnalyzeID with a driver license image, extract the FIRST_NAME, LAST_NAME, and DATE_OF_BIRTH fields, and reject the document if any field has confidence below 90

### Multi-Page PDF Form and Table Extraction

Document processing pipelines use StartDocumentAnalysis with FORMS and TABLES feature types against multi-page PDFs in S3. Textract returns hierarchical block JSON - pages, lines, words, key-value pairs, table cells - that downstream code reassembles into structured records. Long jobs notify completion via Amazon SNS so the agent can fetch results once ready.

Example prompt: Start a document analysis job with FeatureTypes [FORMS, TABLES] for s3://docs/loan-app.pdf, poll GetDocumentAnalysis until JobStatus is SUCCEEDED, and return the extracted tables

### AI Agent Document Understanding

AI agents use Textract through Jentic to convert unstructured document images into structured JSON they can reason over. Jentic isolates AWS Signature v4 credentials and exposes the synchronous and asynchronous Textract operations as searchable tools, so an agent invoked by 'extract fields from this invoice' calls AnalyzeExpense without ever seeing raw secret keys.

Example prompt: Search Jentic for 'extract text from a document', load the AnalyzeDocument operation, and execute it with the provided document bytes and FeatureTypes [FORMS, TABLES]

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /#X-Amz-Target=Textract.DetectDocumentText | Detect text in a single-page document synchronously |
| POST | /#X-Amz-Target=Textract.AnalyzeDocument | Analyze forms, tables, signatures, and queries in a document |
| POST | /#X-Amz-Target=Textract.AnalyzeExpense | Extract structured fields from invoices and receipts |
| POST | /#X-Amz-Target=Textract.AnalyzeID | Extract fields from identity documents |
| POST | /#X-Amz-Target=Textract.StartDocumentAnalysis | Start an asynchronous multi-page document analysis job |
| POST | /#X-Amz-Target=Textract.GetDocumentAnalysis | Retrieve results of an asynchronous analysis job |
| POST | /#X-Amz-Target=Textract.StartLendingAnalysis | Process a lending document package |

## Key resources

- **DocumentText** — Detect printed and handwritten text on single or multi-page documents
- **DocumentAnalysis** — Analyze forms, tables, signatures, and queries within documents
- **ExpenseAnalysis** — Extract structured fields from invoices and receipts
- **IdentityAnalysis** — Extract fields from identity documents such as licenses and passports
- **LendingAnalysis** — Process lending document packages with classification and extraction

## Why Jentic

- **Setup:** Wiring Textract by hand means implementing AWS SigV4 signing, targeting the regional host such as textract.us-east-1.amazonaws.com, and building your own polling loop for asynchronous multi-page jobs plus S3 read plumbing. Through Jentic you install once, import Amazon Textract from the API Directory, store the AWS access key once, and your agent calls it.
- **Permission scoping:** Textract sends the document bytes or S3 location in the request body rather than the URL path, so scoping is by operation, not by path prefix. Limit the agent to the operations it needs, such as AnalyzeDocument and AnalyzeExpense for extraction, and leave others out unless you add them.
- **Credential handling:** Your AWS access key is stored once, encrypted, by your own Jentic One instance and used to sign each Textract request with SigV4 at execution time. The raw secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'extract text from a document' or 'pull fields from an invoice', and Jentic returns the matching Textract operation such as AnalyzeDocument with its input schema so the agent calls the right endpoint without browsing the AWS reference.

## Related APIs

- **Amazon Comprehend** — Comprehend runs NLP on the text Textract extracts
- **Amazon Rekognition** — Rekognition handles image and video analysis; Textract specialises in document text
- **Amazon SageMaker** — SageMaker can host a custom OCR model; Textract is a managed OCR service

## FAQ

### Why is there no official OpenAPI spec for Amazon Textract?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Amazon Textract via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Amazon Textract API use?

Textract uses AWS Signature Version 4 with an access key ID and secret access key scoped via IAM policies that grant textract:* and s3:GetObject for the bucket holding source documents. Through Jentic, those credentials sit in the encrypted vault and are signed into each request server-side, so an agent never receives raw long-lived keys.

### Can I extract tables and forms with the Amazon Textract API?

Yes. Call AnalyzeDocument synchronously with FeatureTypes [TABLES] or [FORMS] for single-page documents, or StartDocumentAnalysis for multi-page PDFs in S3. Both return BlockType=KEY_VALUE_SET, TABLE, and CELL elements you can walk to reconstruct the structured data.

### What are the rate limits for the Amazon Textract API?

Synchronous operations like DetectDocumentText and AnalyzeDocument have per-second transaction limits that vary by region - defaults start around 10 TPS and can be raised via service quotas. Asynchronous jobs are subject to concurrent-job quotas. Check the AWS service quotas console for current values.

### How do I run an asynchronous PDF analysis job through Jentic?

Search Jentic for 'extract text from a document' to surface StartDocumentTextDetection and StartDocumentAnalysis. Load the StartDocumentAnalysis schema with the Jentic SDK (pip install jentic), execute it with DocumentLocation pointing to your S3 object, then poll GetDocumentAnalysis with the returned JobId until JobStatus equals SUCCEEDED.

### Is Amazon Textract free?

No. Textract charges per page processed, with separate prices for DetectDocumentText, AnalyzeDocument (with FORMS/TABLES/QUERIES), AnalyzeExpense, and AnalyzeID. The AWS Free Tier includes a limited number of pages per month for the first three months. See the AWS pricing page for current per-page rates.

### Can I limit what my agent is allowed to do with the Amazon Textract API?

Yes. Because Textract passes the document bytes or S3 location in the request body rather than the URL path, your self-hosted Jentic One instance scopes access by operation, not by path prefix. You decide which operations the agent may call, so you can allow only AnalyzeDocument and AnalyzeExpense for extraction while leaving AnalyzeID, StartDocumentAnalysis, and the rest out unless you explicitly add them. Your own rules also govern which AWS credentials the agent can use to sign those calls.
