Migrate · AWS Textract to Extend
Migrate from AWS Textract to Extend
Replace Textract's block graph with Markdown chunks and schema-shaped JSON, and delete your assembly code.
View as MarkdownFive steps
- 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
Concept map
- 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 AnalyzeExpenseclient.extract(config={'schema': ...})
- Define the fields you need once in a JSON Schema instead of per-query questions or preset outputs.
- Async document analysis jobsRun endpoints with create_and_poll or webhooks
- No S3 staging or SNS topics: pass a URL or an uploaded file ID.
- Block Confidence scoresPer-field confidence and citations
- Route low-confidence values to a built-in human review step.
- S3Object or Bytes inputFile URL or file ID
- Upload once with client.files.upload and reuse the ID.
- IAM credentialsEXTEND_API_KEY
- One API key per workspace; SSO/SAML and RBAC on Enterprise.
Get an API key
Sign up, then export your key as EXTEND_API_KEY. You start with 10,000 free credits.
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) 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 blocksAdd · Extend (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) 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) 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 citationsReplace async jobs with runs and webhooks
Use runs and webhooks instead of jobs, SNS, and paging.
Remove · AWS Textract (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 NextTokenAdd · Extend (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", )Run both side by side
Compare both on 50 to 100 of your documents, and save them as an evaluation set.
Scale with async
Use async runs with webhooks, or batches of up to 1,000 files.
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.
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.
CLI
Run any processor from your terminal.
curl -fsSL https://extend.ai/install.sh | sh
extend setup
extend parse invoice.pdf > invoice.mdMCP server
Let your coding agent call Extend.
claude mcp add --transport http extend https://mcp.extend.ai/mcpAgent quickstart
Give your agent current Extend docs.
npx skills add extend-hq/extend-agent-plugin --skill extend-apiFAQ
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.
