# OCR scanned PDFs to text and Markdown

**Use case:** 

Reads scanned and image-only PDF pages with OCR and returns page-aware Markdown or plain text, keeping the text layer where a page has one. English by default; German, French, Spanish, Portuguese, Italian and Dutch available. Pay per event: $0.003 per PDF processed plus $0.006 per OCR page that returns at least 20 characters.

## Input

```json
{
  "pdfUrls": [
    {
      "url": "https://api.apify.com/v2/key-value-stores/3cHX2WBgHCKzk3vnX/records/ocr-sample-scanned-pdf"
    }
  ],
  "maxPdfs": 50,
  "maxPagesPerPdf": 200,
  "maxPdfBytes": 26214400,
  "includeTables": true,
  "outputFormat": "markdown",
  "ocrMode": "auto",
  "ocrLanguages": "eng",
  "maxOcrPages": 20,
  "timeoutSecs": 30
}
```

## Output

```json
{
  "url": {
    "label": "PDF URL",
    "format": "string"
  },
  "status": {
    "label": "HTTP",
    "format": "integer"
  },
  "pageCount": {
    "label": "Pages",
    "format": "integer"
  },
  "pagesProcessed": {
    "label": "Processed",
    "format": "integer"
  },
  "tables": {
    "label": "Tables",
    "format": "integer"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [PDF to Markdown & Text Extractor](https://apify.com/lintlab/pdf-to-markdown.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/lintlab/pdf-to-markdown.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/lintlab/pdf-to-markdown.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
