PeumeAPI

Web scraping

Parse File to Markdown

Convert a file at a URL (PDF, Office docs, images, code, data — 60+ formats) to clean Markdown, with optional OCR for scanned PDFs.

$0.003 per credit

Call it

curl https://api.peume.com/v1/call/parse-file-to-markdown \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "file_url": "your file url"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: parse-file-to-markdown.

Parameters

file_urlRequiredstring

Public https:// URL of the file to parse (up to 25MB — e.g. a presigned S3 link or a file-system byte link). fetches it server-side and relays the bytes to.

extensionstring

File-type hint (e.g. 'pdf', 'docx', 'xlsx') for when the URL or its Content-Type does not reveal the format.

ocrboolean

When true, detect and OCR images embedded in PDF pages (scanned documents). Off by default. Billed 1 credit plus 1 per page OCR recovers; holds 51 credits (see ocr_ran in the output).

includeLinksboolean

Preserve hyperlinks in the Markdown output. Default true.

includeImagesboolean

Include image references in the Markdown output. Default false.

shortenBase64Imagesboolean

Truncate inline base64 image payloads to keep the output small. Default true.

useMainContentOnlyboolean

Best-effort, HTML-like files only: ask to keep the main content and drop headers, footers, sidebars, and navigation. It is a heuristic, so some of that chrome can stay in the output. Default false.

includeNumberedPagesboolean

Start each PDF page in the Markdown with a `<!-- page N -->` line (N = the original 1-based page number). Default false. Such responses are never served from cache.

pdfobject

Parse only a page range of a PDF. With ocr: true, OCR runs (and bills) only inside the range, and the hold is 1 credit plus 1 per page of start..end.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.