---
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 Unstructured to Extend"
description: "A developer guide to moving from Unstructured to Extend: how parse, extract, and jobs map, before-and-after Python code, and a side-by-side migration plan."
canonical: https://www.extend.ai/migrate/unstructured
---

# Migrate from Unstructured 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 · Unstructured to Extend

Keep your connectors and move parsing and extraction to Extend for cited, schema-shaped output.

[Get an API key](https://dashboard.extend.ai/) · [Extend vs. Unstructured](https://www.extend.ai/compare/extend-vs-unstructured.md)

[View as Markdown](https://www.extend.ai/migrate/unstructured.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:** parse.run, extract.run, jobs
- **SDK:** pip install extend-ai or npm install extend-ai
- **API key variable:** EXTEND_API_KEY
- **Output:** Markdown chunks and cited JSON

On this page:

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

## Concept map

| Unstructured | Extend | What to know |
| --- | --- | --- |
| `client.parse.run(input=...)` | `client.parse(file=...)` | Markdown chunks with typed blocks for text, tables, figures, and form regions. |
| `output='elements'` | `output.chunks[].blocks` | Each block carries its type, content, and position on the page. |
| `client.extract.run(parse_id=..., schema=...)` | `client.extract(file=..., config={'schema': ...})` | Extract parses for you; pass the same file and a JSON Schema. |
| `Jobs and wait_seconds` | `Run endpoints with create_and_poll or webhooks` | Batches of up to 1,000 files per request. |
| `UNSTRUCTURED_API_KEY` | `EXTEND_API_KEY` | Both SDKs read the key from the environment. |

## 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.

Keep your connectors and swap only processing.

### Parse a document

Get Markdown chunks with typed blocks.

Remove · Unstructured (Python):

```python
from unstructured_transform_client import TransformClient

with TransformClient(timeout_seconds=960) as client:  # reads UNSTRUCTURED_API_KEY
    result = client.parse.run(input="invoice.pdf")
```

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)
```

### Extract fields with a schema

Pass the file directly; no parse ID needed.

Remove · Unstructured (Python):

```python
with TransformClient(timeout_seconds=960) as client:
    job = client.extract.run(parse_id=parse_id, schema=schema)
```

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 job polling with runs and webhooks

Use webhooks in production, create_and_poll while testing.

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

- Citations and confidence on every value.
- Built-in review, Review Agent, and evals.
- Splitting and classification for mixed files.
- Self-serve pricing with 10,000 free credits.

### When to keep both

- Broad source-to-destination connectivity, open-source control, or RAG-oriented transformation is your main requirement.

## Agent prompt

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

Prompt:

```text
Migrate this codebase from Unstructured to Extend. Read the guide at https://www.extend.ai/migrate/unstructured.md, install the extend-ai SDK, and replace each Unstructured call using its concept map and code samples. Keep the Unstructured 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

### Unstructured is down. What should I do?

Check Unstructured'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 Unstructured?

Yes. Keep Unstructured as your primary path and route a request to Extend when it fails, times out, or returns low-confidence output. Unstructured returns Markdown or elements and Extend returns Markdown chunks with typed blocks, so a fallback can keep your connectors and swap only the processing step. Score both paths on the same Extend evaluation set so you know the fallback meets your bar before you need it.

### Unstructured 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.

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

No public same-run benchmark compares Extend and Unstructured. Extend Performance Parse scored 95.7% field-level document Q&A accuracy on RealDoc-Bench, an open benchmark of real-world regulated documents, so run both on your own documents and compare. With citations enabled, every extracted value points to its page and region, so you can see exactly where a wrong value came from.

### Is there a benchmark comparing Extend and Unstructured?

No public same-run benchmark compares the two products. Run both on the same set of your own documents and score the results before deciding.

### Unstructured 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 Unstructured?

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 Unstructured to Extend?

Consider Extend when accuracy on complex documents, traceable output, or production review starts to limit your pipeline. Extend returns cited, schema-defined output with per-field confidence, and includes human review, Review Agent, evaluation sets, splitting, and classification in one platform. 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 Unstructured 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.

### Can I keep my Unstructured connectors?

Yes. Many teams keep their ingestion connectors and replace only the document processing step. Pass Extend a file URL or upload the file to get a file ID, then call Parse or Extract.

### What replaces Unstructured elements in Extend?

Extend Parse returns output.chunks, each with Markdown content and typed blocks for text, tables, figures, and form regions, including each block's position on the page.

## Related

- [Extend vs. Unstructured](https://www.extend.ai/compare/extend-vs-unstructured.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 AWS Textract to Extend](https://www.extend.ai/migrate/aws-textract.md)
- [Migrate from Google Cloud Document AI to Extend](https://www.extend.ai/migrate/google-document-ai.md)
