---
site_search: "GET /ask?q={query} (read-only search over extend.ai and docs.extend.ai; returns links and quoted passages, not generated answers)"
title: "Migrate from AWS Textract to Extend"
description: "A developer guide to moving from AWS Textract to Extend: how AnalyzeDocument, async jobs, and block output map, before-and-after Python code, and a side-by-side migration plan."
canonical: https://www.extend.ai/migrate/aws-textract
---

# Migrate from AWS Textract to Extend

> Search this site and the docs: [`/ask?q=…`](/ask?q=webhook+retries) returns matching pages from extend.ai and docs.extend.ai, with quoted passages.

Migrate · AWS Textract to Extend

Replace Textract's block graph with Markdown chunks and schema-shaped JSON, and delete your assembly code.

[Get an API key](https://dashboard.extend.ai/) · [Extend vs. AWS Textract](https://www.extend.ai/compare/extend-vs-aws-textract.md)

[View as Markdown](https://www.extend.ai/migrate/aws-textract.md)

## Five steps

1. Get an API key
2. Swap one call
3. Run both side by side
4. Scale with async
5. Cut over

- **Calls to swap:** analyze_document, async analysis jobs
- **SDK:** pip install extend-ai or npm install extend-ai
- **API key variable:** EXTEND_API_KEY
- **Parsing accuracy:** Extend 95.7% vs. AWS Textract 70.5% on RealDoc-Bench

On this page:

- Concept map
- Steps
- Agent prompt
- SDK, CLI, and MCP
- FAQ

## Concept map

| AWS Textract | Extend | What to know |
| --- | --- | --- |
| `analyze_document(FeatureTypes=['TABLES', 'FORMS'])` | `client.parse(file=...)` | Tables, form regions, checkboxes, and signatures come back as typed blocks with Markdown, no block assembly needed. |
| `QUERIES and AnalyzeExpense` | `client.extract(config={'schema': ...})` | Define the fields you need once in a JSON Schema instead of per-query questions or preset outputs. |
| `Async document analysis jobs` | `Run endpoints with create_and_poll or webhooks` | No S3 staging or SNS topics: pass a URL or an uploaded file ID. |
| `Block Confidence scores` | `Per-field confidence and citations` | Route low-confidence values to a built-in human review step. |
| `S3Object or Bytes input` | `File URL or file ID` | Upload once with client.files.upload and reuse the ID. |
| `IAM credentials` | `EXTEND_API_KEY` | One API key per workspace; SSO/SAML and RBAC on Enterprise. |

## 01 Get an API key

Sign up, then export your key as EXTEND_API_KEY. You start with 10,000 free credits.

## 02 Swap one call

Add Extend next to your current call, behind a flag.

Start where your block-assembly code is largest.

### Analyze a document

Get Markdown and typed blocks instead of a block graph.

Remove · AWS Textract (Python):

```python
import boto3

client = boto3.client("textract", region_name="us-east-1")

response = client.analyze_document(
    Document={"S3Object": {"Bucket": "my-bucket", "Name": "invoice.pdf"}},
    FeatureTypes=["TABLES", "FORMS"],
)

for block in response["Blocks"]:
    if block["BlockType"] == "LINE":
        print(block["Text"])
# Rebuild tables and key-value pairs from CELL and KEY_VALUE_SET blocks
```

Add · Extend (Python):

```python
from extend_ai import Extend

client = Extend()  # reads EXTEND_API_KEY

response = client.parse(
    file={"url": "https://example.com/invoice.pdf"}
)

for chunk in response.output.chunks:
    print(chunk.content)  # Markdown for the chunk
    for block in chunk.blocks:
        print(block.type, block.content)
```

### Replace queries with a schema

One JSON Schema replaces one query per field.

Remove · AWS Textract (Python):

```python
response = client.analyze_document(
    Document={"S3Object": {"Bucket": "my-bucket", "Name": "invoice.pdf"}},
    FeatureTypes=["QUERIES"],
    QueriesConfig={
        "Queries": [
            {"Text": "What is the invoice number?"},
            {"Text": "What is the total?"},
        ]
    },
)
```

Add · Extend (Python):

```python
from extend_ai import Extend

client = Extend()

result = client.extract(
    file={"url": "https://example.com/invoice.pdf"},
    config={
        "schema": {
            "type": "object",
            "properties": {
                "invoice_number": {"type": ["string", "null"]},
                "total": {"type": ["number", "null"]},
            },
        },
        "advancedOptions": {"citationsEnabled": True},
    },
)

print(result.output.value)     # shaped like your schema
print(result.output.metadata)  # per-field confidence and citations
```

### Replace async jobs with runs and webhooks

Use runs and webhooks instead of jobs, SNS, and paging.

Remove · AWS Textract (Python):

```python
job = client.start_document_analysis(
    DocumentLocation={"S3Object": {"Bucket": "my-bucket", "Name": "report.pdf"}},
    FeatureTypes=["TABLES", "FORMS"],
)

result = client.get_document_analysis(JobId=job["JobId"])
# Poll until JobStatus is SUCCEEDED, then page with NextToken
```

Add · Extend (Python):

```python
from extend_ai import Extend

client = Extend()

# Starts the run and polls until it finishes
run = client.parse_runs.create_and_poll(
    file={"url": "https://example.com/long-report.pdf"}
)

# For production volume, register a webhook endpoint instead of polling
client.webhook_endpoints.create(
    url="https://your-app.com/webhooks/extend",
    name="Extend runs",
    enabled_events=["parse_run.processed", "parse_run.failed"],
    api_version="2026-02-09",
)
```

## 03 Run both side by side

Compare both on 50 to 100 of your documents, and save them as an evaluation set.

- [Evaluation sets](https://docs.extend.ai/evaluation/overview)
- [Async processing](https://docs.extend.ai/general/async-processing)
- [Batch processing](https://docs.extend.ai/general/batch-processing)

## 04 Scale with async

Use async runs with webhooks, or batches of up to 1,000 files.

## 05 Cut over

Switch traffic once results pass, and rerun the set after changes.

### What you gain

- 95.7% vs. 70.5% on RealDoc-Bench parsing.
- Markdown and JSON instead of a block graph.
- Extraction, splitting, review, and evals in one API.
- 10,000 free credits with no three-month cutoff.

### When to keep both

- You only need low-cost text detection inside an AWS-native stack and your team is ready to build and operate the surrounding pipeline.

## Agent prompt

Paste into Claude Code, Cursor, or Codex to run the migration.

Prompt:

```text
Migrate this codebase from AWS Textract to Extend. Read the guide at https://www.extend.ai/migrate/aws-textract.md, install the extend-ai SDK, and replace each AWS Textract call using its concept map and code samples. Keep the AWS Textract path behind a flag until both paths have run on the same documents, and read the API key from EXTEND_API_KEY.
```

## SDK, CLI, and MCP

Pick how you want to work.

### SDKs

Python, TypeScript, Java, and Go.

```bash
pip install extend-ai
npm install extend-ai
```

- [SDK guide](https://www.extend.ai/agents/sdk.md)
- [SDK docs](https://docs.extend.ai/sdks)

### CLI

Run any processor from your terminal.

```bash
curl -fsSL https://extend.ai/install.sh | sh
extend setup
extend parse invoice.pdf > invoice.md
```

- [CLI guide](https://www.extend.ai/agents/cli.md)
- [CLI docs](https://docs.extend.ai/cli)

### MCP server

Let your coding agent call Extend.

```bash
claude mcp add --transport http extend https://mcp.extend.ai/mcp
```

- [MCP guide](https://www.extend.ai/agents/mcp.md)
- [MCP docs](https://docs.extend.ai/mcp)

### Agent quickstart

Give your agent current Extend docs.

```bash
npx skills add extend-hq/extend-agent-plugin --skill extend-api
```

- [Agent quickstart](https://docs.extend.ai/agent-quickstart)

## FAQ

### AWS Textract is down. What should I do?

Check AWS Textract's status page first. To keep documents moving during an outage, send the same files to Extend: sign up at dashboard.extend.ai, export EXTEND_API_KEY, and call client.parse or client.extract with the same file URL. New accounts get 10,000 free credits with no contract or sales call, and Extend publishes its own status at status.extend.ai.

### Can I use Extend as a fallback for AWS Textract?

Yes. Keep AWS Textract as your primary path and route a request to Extend when it fails, times out, or returns low-confidence output. Textract returns Blocks that your code assembles; Extend returns Markdown chunks and, with Extract, one JSON object per document, so a fallback usually replaces assembly code rather than adapting it. Score both paths on the same Extend evaluation set so you know the fallback meets your bar before you need it.

### AWS Textract is slow or timing out on large documents. What are my options?

Use Extend's async run endpoints: create_and_poll while you test, or webhooks in production, instead of holding a connection open. Synchronous calls time out after five minutes, and batch requests accept up to 1,000 files each. For mixed batches, the parse_auto engine sends simple pages through the faster Light engine and only complex pages through Performance.

### AWS Textract is returning wrong or incomplete results. Is there a more accurate alternative?

On RealDoc-Bench, Extend Parse 2.0 scored 95.7% field-level document Q&A accuracy against 70.5% for AWS Textract, a 25.2-point lead, with tables, form regions, checkboxes, and handwriting returned as typed blocks. With citations enabled, every extracted value points to its page and region, so you can see exactly where a wrong value came from.

### Is Extend more accurate than AWS Textract?

On RealDoc-Bench, Extend Parse 2.0 scored 95.7% field-level document Q&A accuracy against 70.5% for AWS Textract. Run both on your own documents before deciding.

### AWS Textract is getting expensive. How does Extend pricing work?

Extend publishes per-page pricing on a credit system: Parse costs $5 per 1,000 pages on Light and $20 per 1,000 pages on Performance on pay-as-you-go, at $0.01 per credit after 10,000 free credits, with no contract, monthly minimum, or platform fee. The parse_auto engine bills each page by its complexity, so clean pages stay cheap.

### Does Extend keep my documents if I switch from AWS Textract?

Not if you don't want it to. Zero data retention can be enabled on every plan, including pay-as-you-go, and AI subprocessors operate under contractual zero-retention and no-training terms. Extend supports SOC 2 Type II, HIPAA with BAAs, GDPR, and EU processing.

### Can I run Extend in my own cloud?

Yes. Extend runs as managed cloud in US or EU regions, as BYOC inside your own cloud account and VPC, or as a hybrid deployment.

### When should I consider migrating from AWS Textract to Extend?

Consider Extend when accuracy on complex documents, traceable output, or production review starts to limit your pipeline. Extend Parse 2.0 scored 95.7% on RealDoc-Bench against 70.5% for AWS Textract, and Extend returns assembled Markdown and schema-defined JSON instead of a block graph your code rebuilds. Extend is self-serve, so you can test it on your own documents the same day with 10,000 free credits.

### Can a coding agent migrate my AWS Textract integration for me?

Yes. Connect the Extend MCP server to Claude Code, Cursor, Codex, or VS Code, or install the extend-api context file with npx skills add extend-hq/extend-agent-plugin --skill extend-api, then ask the agent to replace each call using the concept map on this page.

### What replaces Textract's block output in Extend?

Extend Parse returns output.chunks, each with Markdown content and typed blocks for text, tables, figures, and form regions, so you no longer rebuild tables and key-value pairs from CELL and KEY_VALUE_SET blocks. For specific fields, Extract returns one JSON object shaped like your schema.

### Do I still need S3 and SNS with Extend?

No. Pass a public or presigned URL, or upload the file to Extend and use its file ID. For long documents and volume, use the async run endpoints with webhooks instead of SNS topics.

## Related

- [Extend vs. AWS Textract](https://www.extend.ai/compare/extend-vs-aws-textract.md)
- [Best AWS Textract alternatives](https://www.extend.ai/resources/aws-textract-when-to-use-alternative.md)
- [Extend docs](https://docs.extend.ai/)

## Other guides

- [Migrate from Reducto to Extend](https://www.extend.ai/migrate/reducto.md)
- [Migrate from LlamaParse to Extend](https://www.extend.ai/migrate/llamaparse.md)
- [Migrate from Google Cloud Document AI to Extend](https://www.extend.ai/migrate/google-document-ai.md)
- [Migrate from Unstructured to Extend](https://www.extend.ai/migrate/unstructured.md)
