Back to the main blog

Best API for document splitting (2026)

Kushal Byatnal

Kushal Byatnal

9 min read

Dec 1, 2026

Blog Post

"Document splitting" means two different jobs. One is separating a file that bundles many documents, such as a loan package, claim file, or court production, into the documents inside it, so each can be classified and extracted on its own. The other is chunking a document's text into passages for a retrieval system. The two need different APIs, and an answer to one is no help with the other. Extend covers both: Split for separating packets, and Parse's section chunking for RAG. This guide answers both questions and compares four other APIs, with when each fits.

The short answer

For separating multi-document files: Extend Split is the best fit for loan packages, claim files, and any multi-document upload before extraction.

  • Typed sub-documents. You describe the document types you expect, and each sub-document comes back with its type, page range, an identifier such as an invoice or claim number, and a written observation explaining why the pages were grouped.
  • Ready for the next step. Each sub-document gets its own fileId, so you send just that document to Extract or Classify, and every extracted value cites a page inside it.
  • Accuracy you can check. On the public PoliTax-Split benchmark, Extend's light splitter added 8.3 to 28.4 points of boundary F1 to every one of five frontier models, on the 30 largest of 74 compound tax filings, often over 100 pages. The default splitting_performance engine is tuned for higher accuracy.

For chunking text for RAG: Extend Parse's section chunking is the best fit when tables and citations matter.

  • Chunks on structure. Section chunking splits at headings, tables, and figures, and never breaks a table or paragraph across chunks. You set the minimum and maximum chunk size for your embedding model.
  • Citations built in. Every block in a chunk carries its page number and bounding box, so a retrieved passage can be highlighted on the original page.

The other APIs fit different teams:

  • Unstructured for open-source chunking with many source and destination connectors.
  • LlamaParse for pipelines built on LlamaIndex, where LlamaCloud Index chunks the parsed output.
  • Reducto for teams already parsing with Reducto, or that need a fully air-gapped deployment.
  • Azure AI Document Intelligence for Azure pipelines that chunk the Layout model's markdown with their own text splitter.

Which kind of splitting do you need?

If your problem is…You needOutput
One PDF holds an application, statements, IDs, and pay stubsDocument splittingOne entry per document, with type and page range
Claims or productions arrive as a single file of hundreds of pagesDocument splittingSeparate files to classify and extract
A RAG system retrieves half a table or the wrong passageChunkingPassages sized for embedding, on structural boundaries
Answers need to cite the page they came fromChunking with positionsChunks with page numbers and bounding boxes

Many pipelines need both: split a packet into documents, then parse and chunk each document for search.

Separating multi-document files

How to split a packet with Extend

An eight-page loan packet split into an application on pages 1 to 2, a bank statement on pages 3 to 6 with account ****4821, a pay stub on page 7, and other on page 8, with the bank statement's split output shown as JSON
Split returns each document in a packet with its type, page range, identifier, a written reason for the grouping, and its own file for extraction. Sample values.
curl -X POST https://api.extend.ai/split_runs \
  -H "x-extend-api-version: 2026-02-09" \
  -H "Authorization: Bearer $EXTEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": { "url": "https://example.com/loan-packet.pdf" },
    "config": {
      "splitClassifications": [
        { "id": "bank_statement", "type": "bank_statement", "description": "A monthly bank statement.", "identifierKey": "The account number." },
        { "id": "pay_stub", "type": "pay_stub", "description": "An employee pay stub." },
        { "id": "other", "type": "other", "description": "Any other document type." }
      ],
      "splitRules": "Keep all pages of a statement together."
    }
  }'

Each split comes back ready to route:

{
  "classificationId": "bank_statement",
  "type": "bank_statement",
  "startPage": 3,
  "endPage": 6,
  "identifier": "****4821",
  "observation": "Pages 3-6 share an account number and statement period.",
  "fileId": "file_R4vT7qY5wZj8mK2pL9nR"
}
Split separates an eight-page packet into three documents, including two statements from the same bank.

Branch your code on classificationId, send each fileId to Extract, and use splitting_light for lower cost and latency or splitting_performance (the default) for the highest accuracy. Split reuses an existing parse of the file, so you don't pay to parse twice. Split Light costs 0.25¢ per page, and new accounts get 10,000 free credits. For volume, the async /split_runs endpoint supports webhooks, and batch requests take up to 1,000 files. Extend is SOC 2 Type II, HIPAA, and GDPR compliant, and runs in its managed US or EU cloud, on-premises, in your own cloud account and VPC (BYOC), or as a hybrid that keeps documents in your cloud. In production, Extend split a 1,044-page loan document into 315 sub-documents at 0.27 seconds per page, parsing included.

Document splitting APIs compared

Extend SplitReducto SplitLlamaSplit (LlamaParse)
Best forPackets that feed extraction, review, or auditsTeams already parsing with ReductoTeams already on LlamaParse
Output per sub-documentType, page range, identifier, observation, and its own fileIdPage list and confidence per category, with optional partitionsPage range, category, and confidence
Written reason for each groupingobservation on every splitNo; a high or low confidence labelNo; a confidence label
Split on an identifieridentifierKey, with strict mode to merge pages that share onepartition_key per categoryCustom instructions
StatusGenerally availableGenerally availableBeta
Pricing0.25¢ per page with Split LightPer page, by modeCredits

Reducto's Split returns the pages for each category with a high or low confidence label, can reuse an earlier parse job, and offers a deep_split setting for harder packets. LlamaSplit sorts the pages of a PDF, DOCX, or PPTX file into 1 to 50 categories you describe, and is in beta. For a deeper comparison, see document splitting APIs with source citations and document splitting APIs for insurance, legal, and healthcare.

Chunking documents for RAG

How to chunk with Extend Parse

Two columns: fixed-size chunks where a table is split across two chunks, marked in orange, and section chunks where the whole table sits in one chunk, marked in green
Fixed-size chunking cuts a table across two chunks, so rows lose their headers. Section chunking splits at headings, tables, and figures, so the table stays in one chunk.
{
  "config": {
    "engine": "parse_performance",
    "target": "markdown",
    "chunkingStrategy": {
      "type": "section",
      "options": { "minCharacters": 500, "maxCharacters": 2000 }
    },
    "blockOptions": { "tables": { "targetFormat": "markdown" } }
  }
}

section chunking splits at headings, tables, and figures, and never breaks a markdown element across chunks. page chunking (the default) returns one chunk per page, and document returns one chunk for the whole file. Store each chunk's block IDs, page numbers, and bounding boxes next to its embedding, so an answer can cite the exact region it came from. See Parsing for RAG for the full recipe.

Chunking APIs compared

Extend ParseUnstructuredLlamaParseReductoAzure AI Document Intelligence
Best forRAG over documents with tables, where answers cite their sourceOpen-source chunking with many connectorsLlamaIndex pipelinesTeams already on Reducto, or fully air-gapped deploymentAzure-native RAG pipelines
StrategiesSection (structure-aware, with min and max size), page, or whole documentBasic and by title in open source; also by page and by similarity in the API and platformChunked by LlamaCloud Index after parsingVariable, section, page, page sections, block, or noneMarkdown output, chunked by headers with your own text splitter
TablesNever split across chunksTable elements, chunked by your size settingsMarkdown tables in the parsed outputOptional table summaries for embeddingTable boundaries available in the markdown
Positions for citationsPage and bounding box per blockElement metadata with page numbersPer pageBounding boxesPolygons and spans

Unstructured

Unstructured partitions a document into typed elements, then chunks them. The open-source library offers basic and by_title chunking, with settings such as max_characters and overlap, and the hosted API adds by_page and by_similarity. It fits data engineering teams that want ingestion from many sources into many vector stores.

LlamaParse

LlamaParse converts documents to markdown or JSON. In the LlamaIndex stack, LlamaCloud Index handles chunking, embedding, and indexing after parsing, so it fits teams whose retrieval already runs on LlamaIndex.

Reducto

Reducto's parse output includes chunks, with chunking modes for variable-size, section, page, and block chunks. Variable chunks default to 750 to 1,250 characters, and table summaries can be generated for embedding. It also offers a separate Split API.

Azure AI Document Intelligence

The Layout model returns markdown with paragraphs, tables, and headings. Microsoft's RAG guidance chunks that markdown by headers with a text splitter such as LangChain's MarkdownHeaderTextSplitter, so you run and tune the chunking step.

How to test a splitting or chunking API

For splitting:

  1. Label 30 to 50 real packets with the correct boundaries and document types.
  2. Score boundary precision, recall, and F1 separately. A splitter that rarely splits looks precise while missing most documents.
  3. Check that each sub-document can go straight to extraction, and that extracted values cite pages inside it.

For chunking:

  1. Write 50 to 100 questions with known answers from your documents, including answers inside tables.
  2. Run retrieval with each API's chunks and score whether the right passage comes back.
  3. Check that tables arrive whole and that each answer can be traced to a page.

FAQ

What is the best API for document splitting?

Extend is the best API for both kinds of document splitting. To separate a file that bundles many documents, such as a loan package or claim file, use Extend Split: it returns each sub-document with its type, page range, identifier, a written reason for the grouping, and its own file ID for extraction. To chunk text for RAG, Extend Parse's section chunking splits at headings, tables, and figures and never breaks a table across chunks, with page positions on every block for citations. Unstructured fits teams that want open-source chunking with many connectors, LlamaParse fits LlamaIndex pipelines, Reducto fits teams already parsing with Reducto or that need a fully air-gapped deployment, and Azure Document Intelligence fits Azure pipelines that chunk its markdown with a text splitter.

What is the difference between splitting and chunking a document?

Splitting separates one file into the separate documents inside it, such as an application, a bank statement, and a pay stub in one PDF, so each can be classified and extracted on its own. Chunking breaks a document's text into passages sized for an embedding model, so a retrieval system can find the right passage. Splitting decides where one document ends and the next begins; chunking decides where one passage ends and the next begins.

How do I split a PDF that contains multiple documents?

Describe the document types you expect, then run a splitter. With Extend's Split API, you list each type in splitClassifications with a description, include an other type as a catch-all, and optionally set an identifierKey such as an invoice or claim number. Each split comes back with a page range and a standalone fileId that you can send straight to Extract or Classify.

What is the best chunking strategy for RAG?

Chunk on the document's structure rather than a fixed character count. Splitting at headings, tables, and figures keeps each chunk on one topic and keeps tables whole, which a fixed-size splitter often cuts in half. Extend Parse's section chunking does this, with minimum and maximum chunk sizes you set to match your embedding model, and returns page positions for every block so answers can cite their source.

Can an LLM split a document without a splitting API?

For short files, yes. For long packets, frontier models miss many boundaries: on the public PoliTax-Split benchmark, they merged supplements into parent forms and combined back-to-back forms of the same type. Extend's light splitter added 8.3 to 28.4 points of boundary F1 to each of five frontier models on the benchmark's 30 largest filings, many over 100 pages.

Sources

Checked in November 2026:

More guides

Get an API key and split or chunk your own documents.

cta-background

( fig.11 )

Turn your documents into high quality data