MCP + API · kestrel/pdf-to-markdown-pages

PDF to Markdown - Text, Scanned OCR & PDF转Markdown

Convert public PDF URLs to Markdown with page text extraction. Each nonempty page includes text, page number, extraction method, dimensions and download URL. Optional English/Chinese OCR for scanned pages without text. Free blank pages and ID/hash exclusions; page ranges. PDF转Markdown、扫描PDF识别。

Open Actor Download MCP config

Connect this tool

Add this URL as a remote MCP server in your client, then sign in to Apify. For a client-specific setup, use Apify's configurator.

https://mcp.apify.com?tools=call-actor,fetch-actor-details,kestrel/pdf-to-markdown-pages
Generic MCP client configuration
{
  "mcpServers": {
    "kestrel-pdf-to-markdown-pages": {
      "url": "https://mcp.apify.com?tools=call-actor,fetch-actor-details,kestrel/pdf-to-markdown-pages"
    }
  }
}

Understand the output before you run

Declared dataset fields and row types · Output locations and dataset links

Use the declared dataset schema for item fields; the output schema describes where results are stored. Optional fields may be null or absent. If an integration shows a sampled schema without an optional field, check this declaration, the Actor instructions and actual returned rows before concluding that the field is unsupported.

Inspect 16 declared output fields
FieldTypeMeaning
pageunspecifiedpage
total_pagesunspecifiedtotal pages
source_urlstringsource url
extractionstringText extraction method used for this page.
markdownunspecifiedmarkdown
charactersunspecifiedcharacters
widthunspecifiedwidth
heightunspecifiedheight
idstringid
content_hashstringcontent hash
fetched_atstringfetched at
download_urlunspecifieddownload url
artifact_keyunspecifiedartifact key
artifact_bytesunspecifiedartifact bytes
artifact_sha256unspecifiedartifact sha256
ocr_languagestringOCR language, only present for ocr_scanned_page extraction.

Start with a small sample

Use call-actor with the JSON below. The $0.25 run ceiling is separate from the Actor input and may stop the sample early. Change the target to match your request. This input validates against build 1.0.8; it is not a promise that the source has matching rows today.

{
  "actor": "kestrel/pdf-to-markdown-pages",
  "input": {
    "documentUrls": [
      "https://raw.githubusercontent.com/jsvine/pdfplumber/stable/examples/pdfs/background-checks.pdf"
    ],
    "startPage": 1,
    "maxPagesPerDocument": 3,
    "ocrMode": "disabled",
    "ocrLanguage": "eng",
    "maxResults": 3
  },
  "callOptions": {
    "maxTotalChargeUsd": 0.25,
    "timeout": 300
  },
  "waitSecs": 30
}

After completion, use get-dataset-items with storages.datasets.default.id. If still running, poll get-actor-run using the returned runId. Check status rows and errors before treating an empty dataset as no matches.

Call from Python, JavaScript or REST

Python SDK 3 example · JavaScript SDK 2 example · curl + jq example. Each uses this same small input, reads APIFY_TOKEN from your environment, sets a five-minute run timeout and exports all dataset row types as JSON Lines. The $0.25 run ceiling is separate from the Actor input and may stop the sample early. Inspect the run and source status before treating results as complete. Installation and usage.

Pricing and limits

Current listed event prices in USD. Some Actors charge for successful source checks even when no output rows match. The event descriptions below define those differences.

EventUSD eachWhat is charged
result$0.01One delivered nonempty PDF page: $10 per 1,000 rows. Row keys page, total_pages, source_url, extraction, markdown, characters, width. No start fee; compute and network included. Nested data and any documented file included. Empty extractions, duplicates, exclusions and failures without delivered rows are free. Invalid-syntax email, DNS NXDOMAIN and RDAP not-found diagnostic rows are billed where applicable. Stops at maxTotalChargeUsd (run option, not input); partial failures retain delivered row charges.

Contracts for agents

Public contract checked 2026-11-11. Active build: 1.0.8. Refresh live details before a large or recurring run.