#1 pure-code local parser on ParseBench

The document engine
for AI applications.

Parse PDF, DOCX, XLSX, PPTX, HTML, email and scanned images into structured, AI-native JSON — with built-in OCR, a real image per page, and retrieval-ready RAG chunks. Works like a compiler, not a text extractor.

Zero dependenciesBuilt-in OCRDeterministic output
request · curl
curl -s -F "file=@q3-report.docx" \
  http://localhost:8080/v1/parse
structured JSON
response · application/json
{
  "document": {
    "id": "324b1b83a80680d9",
    "source_format": "docx",
    "metadata": { "title": "Q3 Report", "page_count": 1 },
    "pages": [
      {
        "number": 1,
        "blocks": [
          {
            "id": "p1-b0",
            "type": "heading",
            "level": 1,
            "reading_order": 0,
            "confidence": 1,
            "text": "Q3 Report"
          },
          {
            "id": "p1-b1",
            "type": "paragraph",
            "text": "Revenue grew 18% this quarter.",
            "spans": [
              { "text": "Revenue grew " },
              { "text": "18%", "style": { "bold": true } },
              { "text": " this quarter." }
            ]
          }
        ]
      }
    ]
  },
  "markdown": "# Q3 Report\n\nRevenue grew **18%** this quarter.",
  "metadata": { "title": "Q3 Report", "page_count": 1 }
}

One endpoint · every format · content-based detection

PDFborn-digital + scanned
DOCXWord
XLSXExcel
PPTXPowerPoint
HTMLweb pages
EMLemail
PNGimages
JPEGphotos
GIFimages
PDFborn-digital + scanned
DOCXWord
XLSXExcel
PPTXPowerPoint
HTMLweb pages
EMLemail
PNGimages
JPEGphotos
GIFimages
#1
pure-code local parser on ParseBench
0
ML models, GPUs or cloud calls
9+
document formats, one endpoint
100%
deterministic, byte-identical output
Why Cognita

Not a text extractor. A document compiler.

Every format is lowered into one common Intermediate Representation — headings, paragraphs, tables, lists, images, reading order, bounding boxes, confidence — and every output is rendered from that IR.

Any document, one API

Born-digital PDF, DOCX, XLSX, PPTX, HTML and email — plus scanned PDFs and photos. Format detection is content-based, so misnamed files just work.

OCR built in

A zero-dependency pure-Go engine out of the box, and it auto-upgrades to Tesseract for production-grade scans the moment the binary is installed.

Pixel-faithful images

Every page as an actual raster, and every embedded image extracted the way viewers show it — JPEGs byte-for-byte, alpha-masked cutouts composited with real transparency.

RAG chunks that respect structure

Chunks never split mid-block, carry heading breadcrumbs, and cite the exact pages and block IDs they came from — so answers ground back to the source.

Dependency-free engine

The whole engine — every format, OCR, layout, rendering — is pure standard library. The PDF parser is written from first principles. No PDF library in sight.

Deterministic output

Identical input produces byte-identical output. Deterministic IDs (p2-b7 = page 2, reading order 7) give you stable references. No model in the loop unless you add one.

ParseBench

The strongest pure-code, fully-local parser

No models. No GPUs. No cloud calls. Byte-identical output on every run — and it still tops the leaderboard among local, code-only parsers.

ParserOverallTablesChartsContentFormattingGrounding
🏆Cognita38.8🥇35.18.6🥇69.7🥇50.0🥇30.5🥇
PyMuPDF4LLM30.936.7🥇1.660.944.610.7
MarkItDown18.615.82.064.50.99.9
PyMuPDF (text)16.00.00.068.31.010.9
pypdf14.90.00.062.50.910.9

ParseBench — ~2,078 human-verified pages from real enterprise documents, scored by fully deterministic, rule-based evaluation. No LLM judge. Run: July 5, 2026.

How does it compare to ML-model and cloud-API systems?

Heavier classes for perspective — these ship neural layout models or run in the cloud. Where Cognita punches above its weight: semantic formatting 50.0 beats Docling's ML pipeline (1.0) and is within two points of Azure; charts 8.6 lead both classic cloud IDP APIs.

ParserClassOverallTablesContentGrounding
Azure Doc Intelligencecloud API59.686.084.973.8
Docling-modelslocal + ML50.766.466.966.1
AWS Textractcloud API47.984.674.870.4
How it works

One pipeline. Every arrow is an interface.

Format parsers lower documents into positioned primitives; OCR fills in scanned text; a shared layout engine recovers structure; everything lands in the IR; exporters, the chunker, the renderer and the store consume only the IR.

1
Parse

Format-specific parsers lower each document into positioned primitives. The PDF one is built from first principles.

2
OCR

Any page with no native text but a page-covering raster is recognized automatically — words flow into the same pipeline.

3
Layout

A shared engine recovers headings, lists, tables, columns and reading order from the positioned primitives.

4
IR

Everything lands in one common Intermediate Representation — blocks with IDs, order, confidence, styles and boxes.

5
Render

Exporters, the chunker, the page renderer and the store all consume only the IR. Send a file, get structure.

the IR in 60 seconds
Document { id, source_format, metadata, pages }
  Page  { number, width, height, unit, blocks, images? }
    Block { id, type, page, bbox?, reading_order,
            confidence, level?, text, spans, style?,
            children?, table?, image?, image_ref? }
      Span { text, style?, link? }
    PageImage { id, block_id, name, mime, width,
                height, bbox?, alt_text?, data }

Structure you can trust

  • Deterministic IDsp2-b7 = page 2, reading order 7. Same input, byte-identical output, stable references.
  • Honest confidenceExplicit structure (DOCX) reports 1.0; layout and OCR heuristics report what they actually know.
  • Geometry survivesPDF and scan blocks keep bounding boxes, so answers can be highlighted on the page image.
Block types
headingparagraphtableimagelistlist_itemquotecodeheaderfootercaptionpage_number
API reference

Upload a file. Get everything back.

Send multipart/form-data with a file field, or the raw file bytes as the request body — both work on every parsing endpoint. Errors are uniform JSON with HTTP status codes.

POST/v1/parsefile → IR + Markdown + text + metadata + page images
POST/v1/chunkfile or IR JSON → structure-aware RAG chunks
POST/v1/exportIR JSON → re-rendered markdown / html / text / json
POST/v1/documentsparse and store; returns the document summary
GET/v1/documents/{id}full IR of a stored document
GET/v1/documents/{id}/chunkschunk a stored document on demand
GET/v1/documents/{id}/pages/{n}/imageone page as an image
GET/health · /versionliveness · version + supported formats

Shape the response

Pick exactly the fields you need — smaller responses, no wasted bytes.

# Markdown only — smallest useful response
?include=markdown
# Full IR without megabytes of base64
?include=document&image_data=omit

Authentication

When auth is on (the default), every route but /health and the console needs a key. Pass it as X-API-Key. Keys are provisioned by an operator — there's deliberately no issue endpoint.

Open it in the playground

Send a file, get structure.

Drop any document into the playground and watch it become AI-native JSON, Markdown, RAG chunks and page images — instantly.

Backend's taking a nap

The server is hosted on a free tier that ran out of credits — for obvious reasons (solo dev, $0 budget). The frontend is fully real; the backend just clocked out. Ping Rahul and it'll be back up.