# PDF & Image to Markdown Converter (`scrapeverse/pdf-image-to-text`) Actor

Convert PDFs, scanned documents and images (PNG, JPG, WebP, TIFF) to clean Markdown with tables kept as real Markdown tables, plus headings, lists and two-column order. Bulk files by link, fast OCR for scans, $0.80 per 1,000 pages. Ready for LLM, RAG and n8n pipelines.

- **URL**: https://apify.com/scrapeverse/pdf-image-to-text.md
- **Developed by:** [ScrapeVerse](https://apify.com/scrapeverse) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.55 / 1,000 extracted 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

Convert **PDFs, scanned documents, and images to clean Markdown** with **tables kept as real Markdown tables**, plus headings, lists, and two-column reading order. Add file links or upload files and get one Markdown document per file, ready for an LLM, a RAG index, a wiki, or a spreadsheet.

**No setup, no OCR servers, $0.80 per 1,000 pages.** Text PDFs convert in milliseconds per page; scans and photos in about a second per page. Apify's $5 monthly free credit covers **6,250 pages a month**.

[![PDF & Image to Markdown Converter](https://apify.com/actor-badge?actor=scrapeverse/pdf-image-to-text)](https://apify.com/scrapeverse/pdf-image-to-text)

Try it on a single file first, free and without an account: [PDF to Markdown converter on scrapeverse.in](https://scrapeverse.in/tools/pdf-to-markdown?utm_source=apify_store\&utm_medium=referral\&utm_campaign=pdf_to_markdown-readme).

### 📊 Tables stay tables

Most PDF-to-text tools flatten a table into a stream of words. This Actor reads the page layout, finds the columns, and writes a Markdown table, so prices stay next to their items and totals stay next to their labels.

An invoice page like this:

```text
Item description          Quantity   Unit price   Total
Design and planning              1         $500    $500
Construction services            1        $1500   $1500
Installation                     2         $300    $600
```

comes out as:

```text
| Item description | Quantity | Unit price | Total |
| --- | --- | --- | --- |
| Design and planning | 1 | $500 | $500 |
| Construction services | 1 | $1500 | $1500 |
| Installation | 2 | $300 | $600 |
```

The same layout reading turns larger text into `#`, `##`, and `###` headings, bullets and numbers into lists, wrapped lines back into paragraphs, and two-column pages into the right reading order.

### What you get

| Field | What's in it |
| --- | --- |
| `markdown` | The whole file as Markdown, with `<!-- page N -->` markers between pages |
| `page_wise_markdown` | One Markdown string per page, when **Merge pages** is off |
| `page_count`, `pages_converted` | Pages in the file and pages converted in this run |
| `page_errors` | Pages that couldn't be read, with the reason (not billed) |
| `error` | Why a file failed or stopped early |

Supported files: PDF (text-based or scanned), PNG, JPG, WebP, TIFF, BMP, and GIF, up to 100 MB each.

### 📄 How to convert PDFs to Markdown

1. Open the **Input** tab.
2. In **📄 PDFs and images**, upload files or paste HTTPS links, one per line.
3. Leave **📑 Merge pages into one Markdown document** on for one document per file, or turn it off to get one Markdown string per page.
4. Optional: set **Max pages per file** to convert only the first pages of long PDFs.
5. Click **Start**. Each file appears in the **Output** tab as soon as it's done.

To cap spending on large batches, set **Maximum cost per run** in the run options. The Actor stops at the limit and keeps every page it already converted.

### 💲 How much does it cost to convert PDFs to Markdown?

You pay **$0.0008 per converted page or image ($0.80 per 1,000)**, plus a tiny start fee per run. Platform compute is included.

| Pages | Cost |
| --- | --- |
| 100 | $0.08 |
| 1,000 | $0.80 |
| 10,000 | $8.00 |
| 6,250 a month | Free with Apify's $5 monthly credit |

| You pay for | You don't pay for |
| --- | --- |
| Each page or image converted to Markdown | Files that fail to download or aren't supported |
| | Pages that can't be read (listed in `page_errors`) |
| | Pages after **Max pages per file** or the run's spending limit |

### ⚡ Speed

| Document | Typical time |
| --- | --- |
| PDF with its own text (reports, exports, ebooks) | 20 pages in under a second |
| Scanned page, photo, or screenshot | About 1 second per page |

Pages stream back as they finish, so a 500-page scanned archive doesn't block the next file. Live times vary with file size and load.

### Input example

```json
{
  "files": [
    "https://example.com/invoices/invoice-2026-11.pdf",
    "https://example.com/scans/contract-page-1.jpg"
  ],
  "mergePdfPageText": true,
  "maxPagesPerFile": 50
}
```

### Output example

```json
{
  "filename": "invoice-2026-11.pdf",
  "index": 0,
  "markdown": "# Invoice\n\n### ACME Company\n\n| Item description | Quantity | Unit price | Total |\n| --- | --- | --- | --- |\n| Design and planning | 1 | $500 | $500 |",
  "page_count": 1,
  "pages_converted": 1
}
```

Download results as JSON, CSV, Excel, or HTML from the **Output** tab, or read them through the API.

### Call it from your code or automations

**cURL (run and get results in one call):**

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/scrapeverse~pdf-image-to-text/run-sync-get-dataset-items?token=APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"files": ["https://example.com/report.pdf"]}'
```

Replace `APIFY_API_TOKEN` with your token from **Apify Console → Settings → API & Integrations**.

**n8n, Make, and Zapier:** add the Apify app or node, choose **Run Actor**, pick `scrapeverse/pdf-image-to-text`, and map your file links into `files`.

**Claude, Cursor, and other MCP clients:** add `https://mcp.apify.com/?tools=scrapeverse/pdf-image-to-text` as an MCP server, then ask the assistant to convert a PDF link to Markdown.

Step-by-step guide: [How to convert PDF to Markdown for free](https://scrapeverse.in/blog/convert-pdf-to-markdown-free?utm_source=apify_store\&utm_medium=referral\&utm_campaign=pdf_to_markdown-readme).

### 🔒 Privacy

Files are converted on ScrapeVerse's own servers, in memory, and discarded as soon as the Markdown is returned to your run. They are never stored, logged, or sent to an outside AI or OCR service. Results stay in your Apify account's storage, which you control. Details: [scrapeverse.in/privacy](https://scrapeverse.in/privacy?utm_source=apify_store\&utm_medium=referral\&utm_campaign=pdf_to_markdown-readme).

### FAQ

#### Does it work on scanned PDFs and phone photos?

Yes. Pages without embedded text are read with OCR, and photos are turned the right way up first. Sharp, well-lit images taken straight on work best. Handwriting isn't supported.

#### Which languages can it read?

Text embedded in a PDF is read in any language. Scans and images are read best in English, other Latin-script languages, and Chinese. Right-to-left scripts aren't supported yet.

#### What happens to images and charts inside a PDF?

They're skipped; the Actor returns the text around them and any text inside them that OCR can read.

#### How large can a file be?

Up to 100 MB and any number of pages. Long PDFs stream page by page; use **Max pages per file** to convert only the start.

#### I used this Actor when it returned plain text. What changed?

The output is now Markdown. The `text` field became `markdown`, and `page_wise_text` became `page_wise_markdown`. The PDF scan quality setting is no longer needed. The price per page went down.

#### Something went wrong. How do I get help?

Open an issue on the **Issues** tab or email support@scrapeverse.in. We reply within 24 hours on working days.

# Actor input Schema

## `files` (type: `array`):

Upload files or add HTTPS links: PDF, PNG, JPG, WebP, TIFF, BMP, or GIF, up to 100 MB each. Scanned pages and photos are read with OCR. Use the uploader on this run; key-value store links from other runs or accounts can't be read.

## `mergePdfPageText` (type: `boolean`):

On: one `markdown` field per file, with  markers between pages. Off: a `page_wise_markdown` list with one Markdown string per page, useful for page-level chunking in RAG pipelines.

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

Leave empty to convert every page. Set a number to convert only the first pages of long PDFs and cap the cost per file.

## `debugSecret` (type: `string`):

For maintainers only. Leave empty.

## Actor input object example

```json
{
  "files": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "mergePdfPageText": true,
  "debugSecret": ""
}
```

# Actor output Schema

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

No description

# 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 = {
    "files": [
        "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeverse/pdf-image-to-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 = { "files": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapeverse/pdf-image-to-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 '{
  "files": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ]
}' |
apify call scrapeverse/pdf-image-to-text --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeverse/pdf-image-to-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/DL0tu2rgF7EelIMCl/builds/PbefRbO6qQeKwfHgK/openapi.json
