> Source: https://txtfetch.com/how-it-works > Plain-text twin — every page on txtfetch.com has one. https://txtfetch.com/text --- # 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. 1. 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. 2. 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. 3. 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. 4. 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. 5. 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](https://txtfetch.com/formats/coverage), 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](https://txtfetch.com/compare/self-hosted-tika). 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](https://txtfetch.com/benchmarks). New to the vocabulary? The [PDF text layer](https://txtfetch.com/glossary/text-layer) and [OCR](https://txtfetch.com/glossary/ocr) entries in the [glossary of extraction terms](https://txtfetch.com/glossary) 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 →](https://app.txtfetch.com/signup)