Document (PDF, DOCX, XLSX, CSV) to Markdown
doc_markdownMarkdown of a document at a public URL, up to 10 MB: PDF (page count, title, created and modified dates from its metadata), DOCX, ODT, XLSX/XLS, ODS, Numbers (sheet names), CSV, XML or HTML; plain text is returned as served. Returns file name, MIME type, size, Markdown, word count, token estimate and truncation flag. Images are not converted. Conversion: Cloudflare Workers AI toMarkdown; fetch via validated redirects, DNS checks via Cloudflare DoH. Price: $0.005 per successful call, paid in USDC with x402 v2; failed calls and calls that match nothing are not charged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "doc_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | http or https URL of a PDF, DOCX, ODT, XLSX, XLS, ODS, Numbers, CSV, XML or HTML file (at most 10 MB). Default ports only; credentials, IP addresses, localhost and private or single-label names are rejected. | |
| max_chars | No | Maximum characters of Markdown returned, 1000 to 100000. Default 20000. Longer output is cut at a line boundary and flagged truncated. |