Document to text API
Turn Word, Excel, PowerPoint and PDF files, scans and photos into clean Markdown or plain text. Send the file or its URL; one request, no SDK.
- Word (.docx) with its headings, lists and tables kept as Markdown
- Excel (.xlsx) with each sheet as a table; PowerPoint (.pptx) slide by slide
- PDFs by their text layer; scanned PDFs and images (PNG, JPEG, WebP) by OCR
- Send the file itself in a POST body or give its public URL; up to 10 MB (images 3 MB)
No account to create. Failed calls are never charged.
One request
curl -H "Authorization: Bearer $API_KEY" \
"https://tools.funwords.eu/document/text?url=https%3A%2F%2Fcalibre-ebook.com%2Fdownloads%2Fdemos%2Fdemo.docx"
Python
import os, requests
r = requests.get(
"https://tools.funwords.eu/document/text",
params={
"url": "https://calibre-ebook.com/downloads/demos/demo.docx",
},
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json())
Node.js
const params = new URLSearchParams({
url: "https://calibre-ebook.com/downloads/demos/demo.docx",
});
const r = await fetch(`https://tools.funwords.eu/document/text?${params}`, {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());
The answer
{
"url": "https://calibre-ebook.com/downloads/demos/demo.docx",
"type": "docx",
"format": "markdown",
"chars": 1000,
"truncated": true,
"text": "# Demonstration of DOCX support in calibre\n\nThis document demonstrates the ability of the calibre DOCX Input plugin to convert the various typographic features in a Microsoft Word (2007 and newer) document."
}
Pricing
One API key, paid by card through Stripe. $0.005 per successful call with a key; failed calls cost nothing.
A plan adds its credits each month when the payment succeeds; unused credits stay, and you can cancel at any time. Packs never expire. After paying you get your key on the next page. The same key works on every tool in the catalog. Details: credits and plans.
Inputs
| Name | Type | Description |
|---|---|---|
url (required) | string | Absolute public http(s) URL of the file (or send the file in a POST body instead) |
format | string | markdown (default: headings, lists and tables kept) or text |
maxChars | integer | Maximum characters of text returned (1000-200000, default 50000) |
What it does not do
- Old .doc, .xls and .ppt files and password-protected files are refused and not charged.
- Excel cells hold the values the file stores: a formula's last result, and dates as Excel's day numbers.
- OCR reads at most three pages of a scanned PDF in one call, and is read by an AI model: check what matters.
Also on the same key
- Extract data from a document: invoice, receipt, contract fields as JSON · $0.03 a call
- PDF to text, PDF text extraction: extract the text of a PDF document from a URL, page by page · $0.002 a call
- Scrape website page to Markdown: page URL into clean Markdown or text for LLMs · $0.002 a call
Questions
Which file types does it read?
Word .docx, Excel .xlsx, PowerPoint .pptx, PDF, and PNG, JPEG and WebP images. The kind of file is read from the file itself, not from its name.
Does it OCR scanned files?
Yes. Images, and scanned PDFs whose pages are stored as JPEG images, are read by a vision model, up to three pages of a scan in one call.
Can I send a file instead of a URL?
Yes. POST the file as the request body, as a multipart form field named file, or as base64 in JSON.
Are my files stored?
No. A file sent in a request is held in memory for that request only. It is not stored, cached or logged.
Is there a subscription?
There is a monthly plan and there are one-off credit packs. Both give one API key; a plan adds credits each month and unused credits stay.
For AI agents
The same tool is on the MCP server https://tools.funwords.eu/mcp (the first 25 successful calls are free), and an agent with a wallet can pay per call in USDC: the tool URL answers 402 Payment Required with x402 and MPP terms. Reference: tool page · OpenAPI · docs for agents.