Document to Markdown API and MCP for AI agents
TollNode gives Claude, Cursor or any AI agent a PDF, Word file, slide deck or scanned page as clean Markdown, with tables kept and OCR on scans, from $0.007 per document.
Ask in plain words, like 'turn this paper into Markdown and summarize the method', and get the text back.
No subscription · Sign-up optional · From $0.007 per call · Charged only when it works · No Datalab account needed
Convert this PDF to Markdown: arxiv.org/pdf/1706.03762, first page only
TollNode · Datalab · 1$0.007 · 1 document
| Result | Detail |
|---|---|
| Pages read | 1 |
| First heading | Attention Is All You Need |
| Format | Markdown with layout kept |
Real result.
What your agent gets from a document
The Markdown
Document to Markdown API for PDFs
Text, headings and tables, in order.
- Pages
- 1
- First heading
- # Attention Is All You Need
- Format
- Markdown
You get
- markdown: the document as Markdown
- pages: how many pages were read
- tables: kept as tables
- layout: headings and lists kept
- OCR: scanned pages are read as images
- from $0.007
Input and price
Send a link; pick how many pages to read.
- File
- https://arxiv.org/pdf/1706.03762
- max_pages
- 1
- Default
- 5 pages
You get
- file: public link to a PDF, Word, slide or image file
- max_pages: most pages to read; sets the price
- options: 1, 5, 20 or 50 pages
- force_ocr: read every page as an image
- default: 5 pages
Every result is structured JSON your agent can sort, filter, summarize or turn into a spreadsheet.
What people ask their AI to do with it
Researchers
Read a paper in context
“Turn this arXiv PDF into Markdown and summarize the method in five bullets”
up to 5 pages
Cost today$0.028
Lawyers
Review a contract
“Convert this contract to Markdown and list every termination clause”
up to 20 pages
Cost today$0.109
Analysts
Pull tables from reports
“Extract the tables from this annual report PDF”
up to 20 pages
Cost today$0.109
Students
Study notes
“Turn this slide deck into Markdown notes”
up to 5 pages
Cost today$0.028
Operations teams
Digitize scans
“Read this scanned invoice with OCR”
up to 1 page
Cost today$0.007
AI engineers
Feed a knowledge base
“Convert these 3 PDFs to Markdown for my index”
3 × up to 20 pages
Cost today$0.327
Use it as a Document to Markdown MCP server in Claude, Cursor or Codex
Connect once. Then just ask.
Paste this into Claude Code, Cursor or Codex. It connects TollNode and gives your agent a small wallet. Add a few dollars of USDC and you're done.
npx agentcash add https://tollnode.comCopy for your AI agent
Paste this into your agent so it knows what this node does and how to call it.
You can use TollNode's Document to Markdown node. Call POST https://tollnode.com/api/v1/nodes/document-to-markdown with file (required), force_ocr (optional), max_pages (optional). The price depends on max_pages (1, 5, 20, 50; default 5) and is charged only when a result is returned. Over MCP, call the "document-to-markdown" tool; use list_models to see prices. Return results as tables when I ask for lists.Price
from $0.0054
per page
One call: from $0.007 per document
The price depends on the max_pages you choose. If you don't choose, you get up to 5 pages.
| up to 1 page | $0.007 per document |
| up to 5 pagesdefault | $0.028 per document |
| up to 20 pages | $0.109 per document |
| up to 50 pages | $0.271 per document |
Charged only when a call returns a result. Failed or empty calls cost $0.
Document to Markdown data without a scraper
No subscription, no credit packs
Pay per clip: $0.007 up to 1 pages, $0.028 up to 5 pages, $0.109 up to 20 pages.
No document service account, no OCR setup, no files to upload
Your agent calls TollNode. You never set up billing or request access with anyone else.
Only charged when it works
If a call returns nothing or fails, it costs nothing.
One connection, much more
The same setup also gives your agent Google search, YouTube, Maps, images and video, so one prompt can chain them.
FAQ
- Is this the official Datalab API?
- No. TollNode is an independent service. It gives your agent document conversion through its own API and MCP server, priced by the page limit you choose.
- Can I use it as a Document to Markdown MCP server in Claude?
- Yes. Add https://tollnode.com/mcp in Claude Code, Claude Desktop or Cursor, and the "document-to-markdown" tool appears with its fields and price.
- Which files work?
- A public https link to a .pdf, .doc, .docx, .ppt, .pptx or image file.
- What does max_pages do?
- It sets the most pages to read and the price: 1, 5, 20 or 50. The default is 5.
- Does it read scans?
- Yes. Scanned pages are read with OCR. Set force_ocr to read every page as an image when a scan has a bad text layer.
- Do I need a Datalab account?
- No. Your agent calls TollNode, and you never log in to Datalab or share cookies.
- What if nothing comes back?
- You're not charged. TollNode only collects payment when a usable result is returned, and your agent can try a different input.
Works well with
Ready in a minute
Connect your AIFor developers: endpoint, inputs and an example response
POST https://tollnode.com/api/v1/nodes/document-to-markdown
Input
| Field | Type | Notes |
|---|---|---|
| file* | string | Public URL of a .pdf, .doc, .docx, .ppt, .pptx or image file (https). Or send the file inline as a base64 data: URI (up to 4.5 MB) |
| force_ocr | boolean | Read every page as an image (for scans with a bad text layer), default false |
| max_pages | enum | Most pages to read; sets the price. Default 5 (1, 5, 20, 50) |
Example response
{
"pages": 1,
"markdown": "# Attention Is All You Need\n\n## Abstract\n\nThe dominant sequence transduction models are based on…"
}Also described in the OpenAPI file and llms.txt. Setup for every app: Agents & MCP.