PDF to Markdown API: Parse Any Document
A PDF, Word, HTML or text file you already have, as markdown.
Parse reads a document you already have and returns its text as markdown. It takes the file itself, not a link. For a document that lives at a URL, Scrape reads PDFs and web pages the same way, and your agent can call the parse tool on the MCP server.
/v1/parse
Request
Send one file as multipart/form-data, in a field named file. There is no JSON body.
import requestswith open('report.pdf', 'rb') as f: r = requests.post( 'https://api.snoopscan.com/v1/parse', headers={'Authorization': 'Bearer sk_YOUR_KEY'}, files={'file': f}, )print(r.json()['data']['markdown'])
import { readFile } from 'node:fs/promises';const form = new FormData();form.append('file', new Blob([await readFile('report.pdf')]), 'report.pdf');const r = await fetch('https://api.snoopscan.com/v1/parse', { method: 'POST', headers: { Authorization: 'Bearer sk_YOUR_KEY' }, body: form,});console.log((await r.json()).data.markdown);
curl -X POST https://api.snoopscan.com/v1/parse \ -H 'Authorization: Bearer sk_YOUR_KEY' \ -F 'file=@report.pdf'
What it reads
| Kind | Files | How it is read |
|---|---|---|
pdf | .pdf | Page by page. |
docx | .docx | By paragraph and table. |
html | .html, .htm | With the converter the Scrape endpoint uses. |
text | .txt, .md, .markdown | Passed through. |
Any other file type is refused with INVALID_REQUEST, as is an empty file or one over the size limit. See Errors.
Response
{ "success": true, "data": { "markdown": "# Quarterly report\n\n…", "pages": 12, "kind": "pdf", "filename": "report.pdf", "cost": { "pdf_pages": 12, "credits": 2 } }}
Billing
Pages are the unit. A PDF counts its real pages. A Word or HTML file counts one page for every 3,000 characters, rounded up, so a long Word document is not billed as one page. The rate is 1 credit for every 10 pages, or part of 10. A failed request is not charged. See Credits for every rate.
SDKs
The Python and JavaScript clients have a parse method that takes a file path, bytes or a URL, and sends the upload for you.