PDF to Word API: convert a PDF to an editable DOCX
Updated 2026-11-10
Use when an agent must convert a PDF to Word (.docx) for editing. Add output=url for a 24 h link.
From an MCP client, add https://tanod.dev/mcp and call convert_pdf_to_word; calls are paid per use with x402, no key or signup.
This endpoint converts a PDF (base64, upload or URL) to DOCX with LibreOffice in a sandbox and returns the file as base64. The example converts a one-page test PDF.
Request
curl -s -X POST https://tanod.dev/v1/pdf/to-docx \
-H 'content-type: application/json' \
-d '{"url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"}'Response
{
"operation": "pdf-to-docx",
"input_bytes": 13264,
"input_pages": 1,
"converted_pages": 1,
"pages_without_text": [],
"warnings": [],
"fidelity_note": "LibreOffice imports the PDF as drawing objects and text boxes, so the Word file looks like the PDF but is not reflowable text: each line of text is its own positioned text box, tables are not rebuilt as Word tables and links are not kept. Fidelity varies, and complex layouts, multi-column pages, forms and heavy vector graphics may convert poorly. A scanned page (an image with no text layer) stays an image: run OCR first (/v1/pdf/ocr).",
"output_bytes": 5007,
"file": {
"name": "converted.docx",
"content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"bytes": 5007,
"data_base64": "UEsDBBQACAgIAMysSF0A... (base64, 5007 bytes)"
}
}Limits and caveats
- Fidelity varies: LibreOffice imports a PDF as drawing objects, one positioned text box per line. Tables are not rebuilt as Word tables, links are not kept, and scanned pages stay images (run OCR first). Good for extracting and editing text, not for pixel-perfect documents.
- Up to 50 pages per call (use
pagesto pick a range of a longer PDF; inputs up to 500 pages); output capped at 15 MB; a very dense page can exceed the CPU limit and returns 422 pdf_too_complex, which is never charged. - Conversion runs in a child process with no network, a throwaway profile, CPU, memory and 50-second wall-clock limits; the PDF is sanitised first (JavaScript, launch actions and non-web links removed).
- Over HTTP 2 calls per IP per UTC day are free with the header
X-Tanod-Free: 1, for a PDF sent inline as base64 of at most 1 MB (one pool with document to Markdown and PDF compress); a PDF sent byurlis always paid.
Add "output": "url" to the request and the file is stored for 24 hours and returned as a link (url, expires_at, sha256) instead of base64, which keeps it out of your context window. The price is the same. How the links work.
Price and free allowance
USD 0.01 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. Over HTTP 2 calls per IP per UTC day are free with the header X-Tanod-Free: 1, for a PDF sent inline as base64 of at most 1 MB (one pool with document to Markdown and PDF compress). MCP tool: convert_pdf_to_word at https://tanod.dev/mcp (or the focused text server at https://tanod.dev/mcp/text), with no free tier over ordinary MCP. No signup and no API key.
To pay by card, run the same conversion as an Apify actor, tanod/pdf-to-word-converter, billed through your Apify account at USD 0.03 per converted document (failed files are free); give it a list of file URLs and get the converted files back in the run's storage.
Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/docs?via=pdf-to-word-api as a custom connector (steps), then ask in plain words, for example "Convert this PDF to a Word document." Eligible Claude.ai connectors use a shared daily docs allowance; ordinary MCP calls are paid. Outside that allowance, a call needs an x402 payment, which these clients can make.
Updated 2026-11-10. Related guides: Document to Markdown API, PDF OCR API, PDF to text API. All guides, or back to tanod.dev.