Document to text: Word, Excel, PowerPoint, PDF
Convert a document to text or Markdown: Word (.docx) with headings, lists and tables, Excel (.xlsx) sheet by sheet, PowerPoint (.pptx) slide by slide, a PDF's text, and scanned PDFs or images (PNG, JPEG, WebP) by OCR. Give a public file's URL, or send the file in a POST body (10 MB; images 3 MB). Old .doc/.xls/.ppt and password-protected files fail uncharged. Use to read attachments, scans and spreadsheets into an agent, RAG or a workflow.
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. One of: markdown, text. |
maxChars | integer | Maximum characters of text returned (1000-200000, default 50000) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/document/text?url=https%3A%2F%2Fcalibre-ebook.com%2Fdownloads%2Fdemos%2Fdemo.docx"
Or one of your 3 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/document/text?url=https%3A%2F%2Fcalibre-ebook.com%2Fdownloads%2Fdemos%2Fdemo.docx&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.
Example result
{
"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."
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is document_text, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp