Unstructured Compatibility
AILANG Parse has a drop-in compatible endpoint at POST /general/v0/general. It accepts the same multipart file upload as the Unstructured API, so an existing Unstructured client only needs the new URL and your API key.
curl
# Same request format as Unstructured API (add your API key)
curl -X POST https://docparse.ailang.sunholo.com/general/v0/general \
-F "files=@report.docx" \
-F "apiKey=dp_YOUR_KEY" \
-H "Accept: application/json"
Python — before and after
# Before: Unstructured
from unstructured.partition.auto import partition
elements = partition(filename="report.docx")
# After: AILANG Parse (same API surface)
import requests
resp = requests.post(
"https://docparse.ailang.sunholo.com/general/v0/general",
files={"files": open("report.docx", "rb")},
data={"apiKey": "dp_YOUR_KEY"},
)
elements = resp.json()
The response follows the Unstructured element schema: each element has a type, text and metadata field. For Office formats (DOCX, PPTX, XLSX), AILANG Parse also extracts structure that Unstructured misses: track changes, merged cells, text boxes, comments, and headers/footers.
With Docling
Docling is strong at PDF layout analysis with its DocLayNet model. AILANG Parse is strong at Office files, which it parses without AI. Use both and route by file type:
- DOCX, PPTX, XLSX, ODT, ODP, ODS, CSV, HTML, Markdown, EPUB, EML, TEX, RTF → AILANG Parse (free, fast, deterministic)
- PDF, scanned images → Docling (layout analysis, table detection)
Python routing example
import requests
from pathlib import Path
AILANG_PARSE_URL = "https://docparse.ailang.sunholo.com"
OFFICE_EXTS = {".docx", ".pptx", ".xlsx", ".odt", ".odp", ".ods",
".csv", ".html", ".md", ".epub"}
def parse_document(filepath: str) -> dict:
ext = Path(filepath).suffix.lower()
if ext in OFFICE_EXTS:
# AILANG Parse: deterministic, no per-page billing, full structural fidelity
# Upload field must be "filepath"; authenticate with your API key
resp = requests.post(
f"{AILANG_PARSE_URL}/api/v1/parse",
files={"filepath": open(filepath, "rb")},
data={"apiKey": "dp_YOUR_KEY"},
)
return resp.json()
elif ext in {".pdf", ".png", ".jpg", ".jpeg", ".tiff"}:
# Docling: layout-aware PDF and image parsing
from docling.document_converter import DocumentConverter
converter = DocumentConverter()
result = converter.convert(filepath)
return result.document.export_to_dict()
else:
raise ValueError(f"Unsupported format: {ext}")
You get structured Office parsing from AILANG Parse and layout-aware PDF parsing from Docling.
With LlamaParse
LlamaParse is a cloud parser built on LLMs. It is strong on PDFs, but every file costs API credits. AILANG Parse handles Office formats locally for free, so you keep your LlamaParse budget for the PDFs that need an LLM.
- Office formats → AILANG Parse (free, local, deterministic, no per-page bill)
- PDFs → LlamaParse (cloud, LLM-powered, paid per page)
Python routing example
import requests
from pathlib import Path
AILANG_PARSE_URL = "https://docparse.ailang.sunholo.com"
OFFICE_EXTS = {".docx", ".pptx", ".xlsx", ".odt", ".odp", ".ods",
".csv", ".html", ".md", ".epub"}
def parse_document(filepath: str) -> dict:
ext = Path(filepath).suffix.lower()
if ext in OFFICE_EXTS:
# AILANG Parse: free, local, deterministic
# Upload field must be "filepath"; authenticate with your API key
resp = requests.post(
f"{AILANG_PARSE_URL}/api/v1/parse",
files={"filepath": open(filepath, "rb")},
data={"apiKey": "dp_YOUR_KEY"},
)
return resp.json()
elif ext == ".pdf":
# LlamaParse: cloud LLM-powered PDF parsing
from llama_parse import LlamaParse
parser = LlamaParse(result_type="markdown")
documents = parser.load_data(filepath)
return {"text": documents[0].text, "metadata": documents[0].metadata}
else:
raise ValueError(f"Unsupported format: {ext}")
This keeps your PDF pipeline as it is and adds structured Office parsing at no extra cost.
Claude Code Skill
AILANG Parse is also a Claude Code skill, so you can parse documents while you code. Install it with two commands inside Claude Code. The first adds the marketplace, the second installs the plugin:
# Run both inside Claude Code
/plugin marketplace add sunholo-data/docparse-skill
/plugin install ailang-parse@ailang-parse-marketplace
Claude Code can then parse Office documents, extract tables and convert between formats while you work.
See the Claude Code Skill guide for setup, usage examples and supported commands.
REST API
AILANG Parse has a REST API. AI agents can learn it on their own: the capability manifest describes every endpoint, with its error codes, its cost and whether a request can be replayed.
Key Endpoints
| Endpoint | Method | Description |
|---|---|---|
| /api/v1/parse | POST | Parse a document (file upload) |
| /api/v1/capabilities | GET | Capability manifest — formats, limits, costs |
| /api/v1/formats | GET | Supported parse and generate formats |
| /api/v1/health | GET | Health check with version info |
| /api/v1/estimate | POST | Cost and latency estimate before parsing |
| /general/v0/general | POST | Unstructured API compatibility endpoint |
# Health check
curl https://docparse.ailang.sunholo.com/api/v1/health
# List supported formats
curl https://docparse.ailang.sunholo.com/api/v1/formats
# Parse a document (upload field is "filepath", API key required)
curl -X POST https://docparse.ailang.sunholo.com/api/v1/parse \
-F "filepath=@report.docx" \
-F "apiKey=dp_YOUR_KEY"
# Capability manifest (agent discovery)
curl https://docparse.ailang.sunholo.com/api/v1/capabilities
See the API Reference for every endpoint, authentication and the OpenAPI spec.
Self-Hosting
Prefer containers? Build and run AILANG Parse with Docker to process batches from the command line:
# Build the image
git clone https://github.com/sunholo-data/ailang-parse.git
cd ailang-parse
docker build -t docparse .
# Parse a file (mount your documents 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 image runs the command-line parser. For a REST API, use the hosted API with the Python, JS or Go SDKs. See the Run Locally guide for every way to install.
Frequently Asked Questions
How do I improve DOCX parsing in my Unstructured pipeline?
Route Office formats through AILANG Parse while keeping Unstructured for PDFs. AILANG Parse has a compatible API, so you can switch the endpoint for Office files with a one-line change. Your pipeline keeps the structure of DOCX, PPTX and XLSX files and still uses Unstructured's ML-based PDF parsing for scanned documents.
Is AILANG Parse an alternative to Unstructured?
For Office formats, yes. AILANG Parse scores higher on structural fidelity (95.0% vs 67.6% on OfficeDocBench). For PDFs and scanned documents, Unstructured's ML pipeline is still excellent. We recommend using both: AILANG Parse for Office formats, Unstructured for PDFs.
Can I use AILANG Parse instead of LlamaParse for Office documents?
Yes. Cloud-based parsers upload Office files to an API and bill per page. AILANG Parse parses Office files locally with no AI calls and no per-page billing. Use AILANG Parse for Office formats, cloud parsers for PDFs.
Does AILANG Parse work with LangChain and LlamaIndex?
Yes. The REST API and MCP server fit into a LangChain or LlamaIndex pipeline. Use AILANG Parse as a custom document loader, or add it as a tool in your agent chain. The /api/v1/tools endpoint serves tool definitions in Claude, OpenAI and MCP formats, so agents can find the tools themselves.