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.

Try it free Plans from $9 a month Sample answer (JSON)

No account to create. Failed calls are never charged.

One request

curl -H "Authorization: Bearer $API_KEY" \
  "https://agent-data-tools.revmesh2074.workers.dev/document/text?url=https%3A%2F%2Fcalibre-ebook.com%2Fdownloads%2Fdemos%2Fdemo.docx"

Python

import os, requests

r = requests.get(
    "https://agent-data-tools.revmesh2074.workers.dev/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://agent-data-tools.revmesh2074.workers.dev/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."
}

Try it on your own input

Absolute public http(s) URL of the file (or send the file in a POST body instead)

Uses one of your 3 free calls. Nothing is charged, and a call that fails is not counted.

Pricing

One API key, paid by card through Stripe. $0.005 per successful call with a key; failed calls cost nothing.

$9 a month3,000 documents each monthStart plan
$19 a month8,000 documents each monthStart plan
$1 once200 documentsBuy
$5 once1,000 documentsBuy
$20 once4,400 documentsBuy
$100 once25,000 documentsBuy

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

NameTypeDescription
url (required)stringAbsolute public http(s) URL of the file (or send the file in a POST body instead)
formatstringmarkdown (default: headings, lists and tables kept) or text
maxCharsintegerMaximum characters of text returned (1000-200000, default 50000)

What it does not do

Also on the same key

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://agent-data-tools.revmesh2074.workers.dev/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.