https://txtfetch.com/how-it-works/
One endpoint, five stages, zero parsers on your side.
Everything between “here's a file” and “here's its text” is txtfetch's job. This is what happens in the milliseconds in between.
fetch
Ingest
POST the bytes directly (multipart or base64), or pass a URL. txtfetch fetches the document server-side. This works well for links your users paste and files already sitting on a CDN.
detect
Detect
Content-type sniffing on the actual bytes, not the file extension. A .pdf that's really a scanned TIFF in a trench coat still comes out as text.
extract
Extract
Apache Tika parses the document structurally. It reads body text, tables, slide notes, email bodies, and attachments, then normalizes the result to clean UTF-8 plain text.
ocr
OCR fallback
Some pages have no text layer: scans, faxes, screenshots, photographed receipts. Tesseract OCR takes over automatically. You don't opt in; it's just what happens when pixels arrive.
respond
Respond & forget
You get JSON with the extracted text and basic metadata. The document itself is processed in memory and discarded. We meter requests but never store content.
under-the-hood
Boring technology, deliberately.
txtfetch doesn't reinvent extraction. It operationalizes the best open-source tools ever built for the job. Apache Tika has spent two decades learning every format's dialects and corruptions. See exactly what it parses, checked against the build we run. Tesseract is the OCR engine everything else is measured against. Both tools are free to run yourself. See what that build and its runtime limits actually involve. We run them serverless, keep them patched, scale them to your traffic, and wrap them in an API you can integrate in five minutes.
Your documents stay yours: processed in memory, never written to storage, never used for anything but your response.
Tika's structural recovery holds up well on Office docs, HTML, and email. Hard PDFs are different: multi-column layouts, scans, wide tables. That's where a premium VLM tier closes a real accuracy gap. See the measured numbers on the benchmarks page.
New to the vocabulary? The PDF text layer and OCR entries in the glossary of extraction terms explain both in plain language.
Stop parsing. Start shipping.
Create an account and get an API key in minutes. The free Hobby plan needs no card.
Get started →