Why Migrate
Unstructured vs AILANG Parse for Office documents. Both turn Word, Excel and PowerPoint files into elements for RAG. On the open OfficeDocBench, Unstructured returned tracked changes in 0 of 3 files that contain them and comments in 0 of 2 files; AILANG Parse returned them in every one. AILANG Parse accepts the same API requests, so you switch by changing the URL and the key. Overall it scores 95.0% and Unstructured 67.6%.
Unstructured reads 90.8% of the benchmark files. Counting the files it can’t read as zero, its score is 61.4%. AILANG Parse reads all of them.
Quick Migration
AILANG Parse accepts the same requests as Unstructured. Change the URL and the API key, and your existing code keeps working:
curl — One URL change
# Before: Unstructured
curl -X POST "https://api.unstructured.io/general/v0/general" \
-H "unstructured-api-key: $UNSTRUCTURED_KEY" \
-F "files=@report.docx"
# After: AILANG Parse (same endpoint, same field name, same header)
curl -X POST "https://docparse.ailang.sunholo.com/general/v0/general" \
-H "unstructured-api-key: $DOCPARSE_API_KEY" \
-F "files=@report.docx"
Python
# Before: Unstructured
resp = requests.post(
"https://api.unstructured.io/general/v0/general",
headers={"unstructured-api-key": UNSTRUCTURED_KEY},
files={"files": open("report.docx", "rb")}
)
# After: AILANG Parse (change URL and key — everything else stays the same)
resp = requests.post(
"https://docparse.ailang.sunholo.com/general/v0/general",
headers={"unstructured-api-key": DOCPARSE_API_KEY},
files={"files": open("report.docx", "rb")}
)
/general/v0/general endpoint accepts a multipart file upload (-F "files=@file.docx") or a JSON body ({"filepath": "sample_id"}). Pass your API key in the unstructured-api-key header or as an apiKey form field. The response has the same format, so existing Unstructured client code can read it.
Routing Pattern
If your pipeline handles mixed formats, send Office formats to AILANG Parse and PDFs to Unstructured. A file-extension check is all you need:
import requests
from pathlib import Path
AILANG_PARSE_URL = "https://docparse.ailang.sunholo.com"
UNSTRUCTURED_URL = "https://api.unstructured.io"
OFFICE_EXTENSIONS = {
".docx", ".pptx", ".xlsx",
".odt", ".odp", ".ods",
".csv", ".html", ".md", ".epub"
}
def parse_document(filepath: str) -> dict:
"""Route documents to the best parser for their format."""
ext = Path(filepath).suffix.lower()
if ext in OFFICE_EXTENSIONS:
# Deterministic structural parsing — no AI needed, no per-page billing
# Same endpoint format as Unstructured — just change the URL
resp = requests.post(
f"{AILANG_PARSE_URL}/general/v0/general",
headers={"unstructured-api-key": DOCPARSE_API_KEY},
files={"files": open(filepath, "rb")}
)
else:
# PDFs, scanned images — Unstructured ML pipeline
resp = requests.post(
f"{UNSTRUCTURED_URL}/general/v0/general",
headers={"unstructured-api-key": UNSTRUCTURED_KEY},
files={"files": open(filepath, "rb")}
)
return resp.json()
You keep the structure of your Office documents and still get ML-based extraction for PDFs and scans.
What You Gain
| What is kept | Unstructured | AILANG Parse |
|---|---|---|
| Tracked changes returned | 0 of 3 files | 3 of 3 files |
| Comments returned | 0 of 2 files | 2 of 2 files |
| Headers and footers returned | 1 of 2 files | 2 of 2 files |
| Text boxes returned | 0 of 1 files | 1 of 1 files |
| Speaker notes returned | 2 of 2 files | 2 of 3 files |
| Table cells: position, merges, formulas | 78.8% | 100.0% |
| List type and depth | 0.0% | 80.0% |
| Overall score, on the files it could read | 67.6% | 95.0% |
| Overall score, counting unreadable files as zero | 61.4% | 95.0% |
Measured on OfficeDocBench: how many of the test files containing each feature the parser returned it for, and the benchmark scores. Every figure is read from the published results.
Self-Hosting
Run AILANG Parse locally with Docker. Office formats need nothing else installed:
# Clone and build
git clone https://github.com/sunholo-data/ailang-parse.git
cd ailang-parse
docker build -t docparse .
# Parse a document (mount your files into /data)
docker run -v $(pwd):/data docparse /data/report.docx
# Parse with AI (pass your API key)
docker run -e GOOGLE_API_KEY="your-key" \
-v $(pwd):/data docparse --ai gemini-3.5-flash-lite /data/document.pdf
The Docker image includes every parser. Office parsing works straight away, with no configuration. Set the GOOGLE_API_KEY environment variable to turn on AI parsing of images and scanned PDFs.
For configuration options and AI model setup, see the Self-Host Guide.
Frequently Asked Questions
How do I migrate from Unstructured to AILANG Parse?
Change the URL from api.unstructured.io to docparse.ailang.sunholo.com and swap your API key. The /general/v0/general endpoint accepts the same multipart upload (-F "files=@file.docx") and the same unstructured-api-key header, and returns the same response format. See the Quick Migration section for curl and Python examples.
Is AILANG Parse a drop-in replacement for Unstructured?
For Office documents, yes. AILANG Parse has the same /general/v0/general endpoint, the same multipart upload format and the same unstructured-api-key header. Change the URL and API key, and your existing code keeps working. For PDFs and scanned documents, keep using Unstructured: its ML pipeline is built for those formats.
Can I use both Unstructured and AILANG Parse together?
Yes, and we recommend it. Send Office formats (DOCX, PPTX, XLSX, ODT, ODP, ODS, CSV, HTML, Markdown, EPUB, EML, TEX, RTF) to AILANG Parse, and send PDFs and scanned images to Unstructured, where its ML pipeline is strong. A file-extension check in your code is all you need. See the Routing Pattern section for a complete example.
What Office formats does AILANG Parse support that Unstructured doesn't parse well?
DOCX, PPTX, XLSX, ODT, ODP, ODS, CSV, HTML, Markdown and EPUB. AILANG Parse keeps their structure, including track changes, merged cells and comments.