# PDF OCR & Image to Text: Scanned PDFs to Text & Markdown (`actorfactory/pdf-ocr-text`) Actor

Extract text or Markdown from PDFs, scans, photos, Word, PowerPoint, Excel and EPUB files for LLM and RAG. Reads the PDF text layer first and runs OCR only on scanned pages and images, in 49 languages. One row per page, slide, sheet or chunk with token counts, plus each document's full text.

- **URL**: https://apify.com/actorfactory/pdf-ocr-text.md
- **Developed by:** [Actor Factory](https://apify.com/actorfactory) (community)
- **Categories:** AI, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 ocr page or images

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## PDF OCR & Image to Text: Scanned PDFs to Text & Markdown

This **PDF OCR** and **image to text** actor extracts text from **PDFs, scanned documents, photos and screenshots**, and converts **Word, PowerPoint, Excel and EPUB files to text or Markdown**, in one run. Give it file URLs. For each PDF page it reads the **text layer** directly when there is one (exact and cheap) and runs **Tesseract OCR** only on pages that are scanned images. Images (PNG, JPEG, WebP, GIF, BMP, TIFF) are always OCR'd. You get **one row per page, slide, sheet or chapter** with the text, word and **token counts**, OCR confidence and document metadata, plus each document's **full text as one file**. Switch on **PDF to Markdown** (headings, lists, tables) and **RAG chunks** with heading paths for LLM, RAG and vector-search pipelines. **49 OCR languages**, including German, French, Spanish, Arabic, Hindi, Chinese, Japanese and Korean. No API key and no external OCR or AI service: everything runs inside the actor.

### What OCR and document data you get

| Field | Description |
|---|---|
| `url` | The file URL you gave |
| `file_name`, `file_type`, `file_size_bytes` | File name (from the URL or download headers), detected type (`pdf`, `png`, `jpeg`, `docx`, `pptx`, `xlsx`, `epub`, `csv`, `txt`, `md`, `html`, ...) and size |
| `page`, `page_count` | PDF page number (1-based) and pages in the file; for other documents the slide, sheet or chapter number and how many were read (1 for images) |
| `section` | Slide title, sheet name or chapter title; for chunks, the heading path such as `Methods > Data` |
| `method` | `text-layer` (read from the PDF), `ocr` (recognised by Tesseract), `document` (Word, PowerPoint, Excel, EPUB, text or web page converted), `mixed` (a chunk spanning text-layer and OCR pages) or `none` (file could not be read) |
| `text_format` | `text` or `markdown` |
| `text` | The page, section or chunk text: plain text with blank lines between paragraphs, or Markdown |
| `char_count`, `word_count`, `token_count` | Size of the text; tokens counted with OpenAI's o200k_base tokenizer (GPT-4o and later) |
| `ocr_confidence` | Tesseract's mean word confidence, 0 to 100 (OCR rows only) |
| `languages` | OCR languages used for the page |
| `width_px`, `height_px` | Size of the image that was OCR'd |
| `title`, `author`, `created_at` | Document metadata (PDF, Office, EPUB or web page), when the file has it |
| `page_end`, `chunk_index`, `chunk_count` | For chunks: last page covered, chunk number and chunks in the document |
| `status` | `ok` (text found), `empty` (blank page) or `error` |
| `error` | Why a file or page could not be read (download failed, password-protected PDF, unsupported file type, ...) |
| `full_text_url` | Link to the whole document's text as one file (with **Save each document's full text**) |
| `scraped_at` | When the file was processed (ISO 8601) |

### Which files can it read?

- **PDF:** digital PDFs (text layer) and scanned PDFs (OCR), page by page.
- **Images:** PNG, JPEG, WebP, GIF, BMP, TIFF, read with OCR.
- **Word (DOCX):** headings, paragraphs, lists, tables and links, as one row per document.
- **PowerPoint (PPTX):** one row per slide with the slide title, text, bullet lists, tables and speaker notes. Hidden slides are skipped.
- **Excel (XLSX):** one row per sheet as a table, with dates and the stored values of formulas. Very large sheets are split into parts.
- **EPUB e-books:** one row per chapter in reading order, with chapter titles from the table of contents.
- **CSV, TXT and Markdown** files.
- **Web pages (HTML)**, only when **Convert web pages** is on: the main content of the page (Mozilla Readability), one page per URL.

The file type is detected from the file's bytes, so links without an extension work too.

### How to extract text from a PDF, image or Word file

| Input | Description |
|---|---|
| `fileUrls` | Direct links to the files, one per line. Public links only: S3, Google Cloud Storage, Dropbox `?dl=1` links, Apify key-value store records, your own website |
| `outputFormat` | `text` (default) or `markdown` |
| `languages` | OCR language(s) of your documents (default English, up to 5). The PDF text layer and other documents are read in any language |
| `ocrMode` | `auto` (default): text layer when the page has one, OCR otherwise. `always`: OCR every page. `never`: text layer only |
| `pageRange` | Pages to read from each PDF, e.g. `1-3, 5, 10-`. Empty means all pages |
| `maxPagesPerFile` | Stop reading a PDF after this many pages, or a document after this many slides, sheets or chapters (default 200) |
| `chunkSize` | `0` (default) for one row per page or section; e.g. `512` for RAG chunks of up to 512 tokens (64 to 8,192) |
| `chunkOverlap` | Tokens repeated from the previous chunk when a section is split for size (default 50) |
| `convertWebPages` | Convert links that return a web page instead of a file (default off: such links give a free error row) |
| `dpi` | Rendering resolution for scanned PDF pages (default 200; 300 for very small print) |
| `saveFullText` | Save each document's text as one file and link it in `full_text_url` (default on, free) |
| `maxPages` | Total cap on charged pages, images and documents across all files |

```json
{
    "fileUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://upload.wikimedia.org/wikipedia/commons/d/d3/Farm_broadcasters_letter_%28IA_CAT82764458246%29.pdf",
        "https://raw.githubusercontent.com/apache/poi/trunk/test-data/slideshow/SampleShow.pptx"
    ],
    "languages": ["eng"],
    "ocrMode": "auto",
    "outputFormat": "markdown",
    "maxPages": 100
}
```

### PDF to Markdown and RAG chunks for LLMs

With `outputFormat: markdown`:

- **PDF pages** get `#` headings from font sizes (up to three levels, measured against the document's body text), bullet and numbered lists, and paragraphs joined across line breaks with hyphenated words repaired. Running headers, footers and page numbers that repeat on most pages are removed.
- **Scanned pages and images** get joined paragraphs and lists from the OCR text.
- **Word, PowerPoint, Excel and EPUB** files keep their headings, lists, links and tables as Markdown tables.

With `chunkSize` set (for example 512), each document becomes **chunks of at most that many tokens** instead of pages. Chunks break at headings first, then at paragraphs, then at sentences, and long tables repeat their header row. Each chunk carries its heading path in `section`, the pages it covers in `page` and `page_end`, and its `token_count`, ready to embed and load into Pinecone, Qdrant, Weaviate, pgvector or any vector store. Token counts use OpenAI's o200k_base tokenizer; other models' tokenizers give similar counts.

### Output example

A scanned image read with OCR (plain text):

```json
{
    "url": "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "file_name": "testocr.png",
    "file_type": "png",
    "file_size_bytes": 23359,
    "page": 1,
    "page_end": null,
    "page_count": 1,
    "section": null,
    "method": "ocr",
    "text_format": "text",
    "text": "This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format.\n\nThe quick brown dog jumped over the\nlazy fox. The quick brown dog jumped\nover the lazy fox. ...",
    "char_count": 285,
    "word_count": 60,
    "token_count": 73,
    "ocr_confidence": 94,
    "languages": ["eng"],
    "width_px": 640,
    "height_px": 480,
    "title": null,
    "author": null,
    "created_at": null,
    "chunk_index": null,
    "chunk_count": null,
    "status": "ok",
    "error": null,
    "full_text_url": "https://api.apify.com/v2/key-value-stores/.../records/text-0001-testocr?signature=...",
    "scraped_at": "2026-11-16T06:40:03.405Z"
}
```

A RAG chunk of a Word file (Markdown, `chunkSize: 300`):

```json
{
    "url": "https://assets.publishing.service.gov.uk/media/65f1a247981227a772f6136e/request-flexible-working-docx-form.docx",
    "file_name": "request-flexible-working-docx-form.docx",
    "file_type": "docx",
    "page": 1,
    "page_end": 1,
    "page_count": 1,
    "section": "The right to request flexible working > Form FW(A): Flexible working application form > Note to the employer",
    "method": "document",
    "text_format": "markdown",
    "text": "### Note to the employer\n\nThis is a formal application made under the legal right to apply for flexible working ...",
    "token_count": 137,
    "created_at": "2024-03-13T12:54:00.000Z",
    "chunk_index": 2,
    "chunk_count": 6,
    "status": "ok"
}
```

The **Pages and sections** view in the Output tab shows one row per page or section, **RAG chunks** shows the chunk columns, and **Text only** shows the text and the full-text links. The run's `OUTPUT` record has totals (files read, pages from the text layer, pages OCR'd, documents converted, chunks, blank pages, errors).

### How much does PDF OCR cost?

Pay per event, only for pages and documents that produced text:

- **$4.00 per 1,000 OCR pages or images** (`ocr-page`): a scanned PDF page or an image read by OCR.
- **$0.20 per 1,000 text-layer pages** (`text-page`): a PDF page whose text was read directly, so a 50-page digital PDF costs $0.01.
- **$2.00 per 1,000 documents** (`document`): one Word, PowerPoint, Excel, EPUB, CSV, text or web page file converted, whatever its length.
- A tiny start fee per run. **Markdown, token counts and chunks cost nothing extra**: you pay per page or document, never per chunk. **Blank pages, failed downloads and unreadable files are free.** Volume discounts apply on higher Apify plans.

Examples: 1,000 scanned invoices (one page each) cost about $4. A 300-page digital report costs $0.06, as text or as Markdown chunks. 1,000 Word or PowerPoint files cost $2. With `ocrMode: auto`, you only pay the OCR price for pages that really need OCR. Use `maxPages` to cap the cost of a run.

### Use cases

- Turn scanned contracts, letters, invoices and receipts into searchable text
- Convert PDFs, Word files, slide decks and spreadsheets into Markdown chunks for RAG, vector search and LLM fine-tuning
- Read text from screenshots, photos of documents and scanned forms
- Bulk-extract text from report archives, court filings, public records and research papers
- Count tokens per page or document before sending files to an LLM
- Check which PDFs in a collection are scans without a text layer (`method: ocr`)

### Limits & notes

- **Accuracy:** Tesseract reads printed text well (typically 90 to 98% of words on clean scans at 200 dpi). Handwriting, very low-resolution photos, heavy noise and rotated pages (sideways or upside down) give poor results. Tables in PDFs and scans come out as text lines, not cells (tables in Word, PowerPoint and Excel files keep their cells).
- **PDF Markdown is rebuilt from font sizes and positions:** headings, lists and paragraphs are reliable on reports, papers and books; complex layouts (forms, multi-column magazines, figures with labels) can mix text from neighbouring blocks.
- **Speed:** a text-layer page or a document takes a fraction of a second; an OCR page takes about 3 to 20 seconds depending on how much text it has. With more memory the actor runs more OCR workers in parallel (one per 4 GB, up to 4).
- **Files:** up to 200 MB each. Password-protected PDFs and encrypted Office files cannot be read. Old binary formats (.doc, .ppt, .xls), OpenDocument (.odt, .ods, .odp) and RTF are not supported: save them as DOCX, PPTX, XLSX or PDF. Images inside Word and PowerPoint files are not OCR'd. Excel sheets are read up to 10,000 rows and 200 columns each.
- **Links must return the file itself.** A web page (such as a PDF viewer) gives a free error row with a hint, unless **Convert web pages** is on.
- **Only the files you list are downloaded.** The actor does not crawl. It obeys each host's `robots.txt` (token `PdfOcrText`), paces requests per host and identifies itself with one fixed user agent. Only process files you have the right to use.
- Files are processed in memory and are not kept. The text is stored only in your own run's dataset and key-value store.
- Languages other than English are downloaded once per run from the official tesseract.js language packages. Picking several languages makes OCR slower; pick only the ones in your documents.

### Integrations and API

Run it from your own code with the [Apify API](https://docs.apify.com/api/v2) or the official Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("actorfactory/pdf-ocr-text").call(run_input={
    "fileUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    ],
    "outputFormat": "markdown",
    "chunkSize": 512,
    "maxPages": 10,
})
for chunk in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(chunk["file_name"], chunk["section"], chunk["token_count"], chunk["text"][:80])
```

- **Process files from your own storage:** upload files to an Apify key-value store (or S3) and pass their URLs; or call the actor from a webhook whenever a new document arrives.
- **Load chunks into a vector database** with Apify's Pinecone, Qdrant or Weaviate integrations, or with LangChain and LlamaIndex loaders for Apify datasets.
- **Schedule it** in Apify Console and send results to Google Sheets, Slack, email or a webhook, or connect it to Make, Zapier or n8n.
- **Use it from AI agents** (Claude, ChatGPT, Cursor) through the [Apify MCP server](https://mcp.apify.com), so an agent can read any PDF, scan or Office file by URL.
- **Export** results as JSON, CSV, Excel or HTML from the Output tab, or read them from the dataset API.

### Related Actors

- [Scholarly Works Search: Crossref, Europe PMC & arXiv Papers](https://apify.com/actorfactory/scholarly-works): find research papers and their open-access PDF links, then extract the text here
- [Sitemap URL Extractor](https://apify.com/actorfactory/sitemap-extractor): list every URL on a site, filter the PDF and Office links, then extract their text here
- [SEO Site Audit Crawler & Broken Link Checker](https://apify.com/actorfactory/seo-site-audit): crawl a website and its pages

### FAQ

**Does it OCR every page?** No, not in the default `auto` mode. Digital PDFs already contain their text, which is read directly and billed at the cheap text-layer price. OCR runs only on scanned pages, on pages whose text layer is garbled, and on scans that carry nothing but a stamp or page number as text. Set `ocrMode: always` to OCR every page anyway.

**Which languages are supported?** 49, including English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech, Russian, Ukrainian, Turkish, Greek, Arabic, Hebrew, Persian, Hindi, Bengali, Tamil, Thai, Vietnamese, Indonesian, Chinese (simplified and traditional), Japanese and Korean. Pick the languages of your documents in `languages`.

**Can it convert PDF, Word, PowerPoint and Excel files to Markdown?** Yes. Set **Output format** to Markdown. PDFs get headings, lists and joined paragraphs; Word, PowerPoint, Excel and EPUB files keep their headings, lists and tables. The price is the same as plain text.

**How are RAG chunks priced?** Chunks are free. You pay for the pages (PDF, OCR) or documents (Word, PowerPoint, Excel, EPUB, text, web page) that were read, whatever the chunk size.

**Can I read files that are not public?** Use any link the actor can download without logging in, such as an S3 pre-signed URL or a key-value store record URL. Files behind a login page cannot be read.

**What do I pay for blank pages or broken links?** Nothing. Blank pages come back as `status: empty`, failed files as `status: error` with the reason, and neither is charged.

**How do I get one text per document instead of per page?** Keep **Save each document's full text** on: every row links its document's whole text (plain text or Markdown) in `full_text_url`, and the files are listed in the run's key-value store.

**Does it crawl websites?** No. It reads the files and pages you list. To find PDF and Office links on a site first, use the Sitemap URL Extractor and pass the links here.

# Actor input Schema

## `fileUrls` (type: `array`):

Direct links to the files to read, one per line: PDF; images (PNG, JPEG, WebP, GIF, BMP, TIFF); Word (DOCX), PowerPoint (PPTX), Excel (XLSX), EPUB, CSV, TXT and Markdown. Public links only (S3, Google Cloud Storage, Dropbox ?dl=1 links, Apify key-value store records, your own website). A link that opens a web page instead of the file gives a free error row, unless Convert web pages is on. Example: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

## `outputFormat` (type: `string`):

text: plain text, lines and paragraphs kept (as before). markdown: PDF headings from font sizes, bullet and numbered lists, paragraphs joined across line breaks with hyphenation repaired, running headers, footers and page numbers removed; Word, PowerPoint, Excel and EPUB files keep their headings, lists and tables. Same price either way.

## `languages` (type: `array`):

Languages of the text, used by OCR (Tesseract). Pick the language(s) of your documents; up to 5. More languages make OCR slower. The PDF text layer is read in any language regardless of this setting.

## `ocrMode` (type: `string`):

auto (recommended): pages with a real text layer are read directly (fast, exact, cheap); scanned pages, pages whose text layer is garbled, and scans that only carry a stamp or page number as text are OCR'd. always: OCR every PDF page, e.g. when a scan's embedded text is poor. never: read only the text layer; images are skipped. Images always need OCR.

## `pageRange` (type: `string`):

Optional, PDFs only. Pages to read from each PDF, 1-based: single pages and ranges separated by commas, open-ended ranges allowed. Example: 1-3, 5, 10-. Leave empty for all pages (up to the per-file maximum).

## `maxPagesPerFile` (type: `integer`):

Stop reading a PDF after this many pages; for other documents, after this many slides, sheets or chapters.

## `chunkSize` (type: `integer`):

0 (default) = one row per page, slide, sheet or chapter. Set e.g. 512 to get one row per chunk instead: each document is split at headings, then paragraphs, then sentences into pieces of at most this many tokens (OpenAI o200k_base count), with the heading path in section and the page range in page and page_end. Allowed: 0 or 64-8192. Chunks are free: you still pay per page or document, never per chunk.

## `chunkOverlap` (type: `integer`):

Tokens repeated from the end of the previous chunk at the start of the next one when a section is split for size (at most half of the chunk size). Only used when the chunk size is set.

## `convertWebPages` (type: `boolean`):

Off (default): a link that returns a web page instead of a file gives a free error row, so a wrong viewer link is never charged. On: web pages are converted too: the main content (Mozilla Readability) as Markdown or text, charged as one document. Single pages only, no crawling; robots.txt is respected.

## `dpi` (type: `integer`):

Resolution at which scanned PDF pages are rendered for OCR. 200 suits normal print; use 300 for small print, 150 for large text. Higher is slower. Not used for images or text-layer pages.

## `saveFullText` (type: `boolean`):

Also save every file's text as one record in the run's key-value store (Markdown when the output format is Markdown) and link it in full_text_url on each row. Free.

## `maxPages` (type: `integer`):

Stop after this many charged PDF pages, images and documents across all files. You are charged per PDF page or image with text, and per converted Word, PowerPoint, Excel, EPUB, text or web document.

## Actor input object example

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "outputFormat": "text",
  "languages": [
    "eng"
  ],
  "ocrMode": "auto",
  "maxPagesPerFile": 200,
  "chunkSize": 0,
  "chunkOverlap": 50,
  "convertWebPages": false,
  "dpi": 200,
  "saveFullText": true,
  "maxPages": 10
}
```

# Actor output Schema

## `results` (type: `string`):

One row per PDF page, image, slide, sheet or chapter (or per chunk when chunking is on): text or Markdown, method, token count, confidence and status.

## `chunks` (type: `string`):

Chunk rows with heading path, page range and token count (when chunk size is set).

## `text` (type: `string`):

File, page or section and text, plus a link to each document's full text.

## `files` (type: `string`):

The run's key-value store: one text or Markdown record per document (text-0001-<name>), when Save full text is on.

## `summary` (type: `string`):

Counts (files, text-layer pages, OCR pages, documents, chunks, blank pages), stop reason and per-file errors (OUTPUT record).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fileUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
    ],
    "maxPages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("actorfactory/pdf-ocr-text").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "fileUrls": [
        "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
        "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    ],
    "maxPages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("actorfactory/pdf-ocr-text").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fileUrls": [
    "https://raw.githubusercontent.com/naptha/tesseract.js/master/tests/assets/images/testocr.png",
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "maxPages": 10
}' |
apify call actorfactory/pdf-ocr-text --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actorfactory/pdf-ocr-text"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gyQasKQlF432PyeWz/builds/Yg5lUdyMaQl6If770/openapi.json
