Every format, one endpoint.
txtfetch detects the real type from the bytes, not the extension, and hands it to Apache Tika. Drop a file below and watch txtfetch fingerprint it from the bytes, or search the full list.
Drop a file below to see what txtfetch detects — runs in your browser, nothing is uploaded.
PDF, Office docs, images, email, and more — the file never leaves this page.
The exact API call for :
curl -X POST https://api.txtfetch.com/v1/extract \
-H "Authorization: Bearer $TXTFETCH_KEY" \
-F file=@__FILENAME__import os
import requests
with open("__FILENAME__", "rb") as f:
r = requests.post(
"https://api.txtfetch.com/v1/extract",
headers={"Authorization": f"Bearer {os.environ['TXTFETCH_KEY']}"},
files={"file": f},
)
print(r.json()["extracted_text"])import { readFile } from "node:fs/promises";
const file = new Blob([await readFile("__FILENAME__")]);
const form = new FormData();
form.append("file", file, "__FILENAME__");
const res = await fetch("https://api.txtfetch.com/v1/extract", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TXTFETCH_KEY}` },
body: form,
});
const { extracted_text } = await res.json();
console.log(extracted_text);package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
type extractResponse struct {
Status string `json:"status"`
ExtractedText string `json:"extracted_text"`
}
func main() {
f, err := os.Open("__FILENAME__")
if err != nil {
panic(err)
}
defer f.Close()
var body bytes.Buffer
writer := multipart.NewWriter(&body)
part, err := writer.CreateFormFile("file", "__FILENAME__")
if err != nil {
panic(err)
}
if _, err := io.Copy(part, f); err != nil {
panic(err)
}
writer.Close()
req, err := http.NewRequest("POST", "https://api.txtfetch.com/v1/extract", &body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("TXTFETCH_KEY"))
req.Header.Set("Content-Type", writer.FormDataContentType())
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result extractResponse
if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result.ExtractedText)
}PDF & documents
.pdfPortable Document Format.rtfRich Text Format.txtPlain text.mdMarkdown.texLaTeX source.logLog file.wpdWordPerfect document
Microsoft Office (modern)
.docxWord document.dotxWord template.xlsxExcel workbook.xlsmExcel workbook (macro-enabled).pptxPowerPoint presentation.pptmPowerPoint presentation (macro-enabled).potxPowerPoint template
Microsoft Office (legacy)
.docWord 97-2003 document.xlsExcel 97-2003 workbook.pptPowerPoint 97-2003 presentation.pubPublisher document.vsdVisio drawing.oneOneNote notebook.msgOutlook message
Deep dive: extract text from legacy .doc, .xls and .ppt files →
OpenDocument
.odtOpenDocument text.odsOpenDocument spreadsheet.odpOpenDocument presentation.odgOpenDocument graphics.ottOpenDocument text template.fodtFlat OpenDocument text
Apple iWork
.pagesPages document.numbersNumbers spreadsheet.keyKeynote presentation
Email & messaging
.emlEmail message.msgOutlook message.mboxMailbox archive.pstOutlook data file.ostOutlook offline data file.vcfvCard contact
eBooks
.epubEPUB ebook.fb2FictionBook.mobiMobipocket ebook.azw3Kindle ebook
Web & markup
.htmlHTML page.htmHTML page.xhtmlXHTML page.xmlXML document.rssRSS feed.atomAtom feed
Data & structured
.csvComma-separated values.tsvTab-separated values.jsonJSON document.yamlYAML document
Images (OCR via Tesseract)
No text layer? Tesseract OCR reads the pixels automatically — same request, same response.
.pngPNG image.jpgJPEG image.jpegJPEG image.tiffTIFF image.bmpBitmap image.gifGIF image.webpWebP image.jp2JPEG 2000 image
Archives (recursed)
Contained files are extracted and their text pulled out too, not just filenames.
.zipZIP archive.tarTar archive.gzGzip archive.7z7-Zip archive
Audio & video (metadata only)
Tika reads embedded metadata and tags here — title, artist, duration, codec — not spoken words. txtfetch does not transcribe audio or video.
.mp3MP3 audio (ID3 tags).wavWAV audio (metadata).mp4MP4 video (metadata).movQuickTime video (metadata)
not-listed
txtfetch detects types from the bytes and rides on Apache Tika's full 1,000+ format library — it very likely handles it even if it's not on this page. Tell us what you're working with and we'll confirm.
Ask us →under-the-hood
Every format above goes through the same pipeline: detect the real type, extract structurally with Apache Tika, fall back to Tesseract OCR when there's no text layer, and return clean JSON. See how it works end to end.
Stop parsing. Start shipping.
Create an account and get an API key in minutes — the free Hobby plan needs no card.
Get started →