# PDF to Text & Tables Extractor - Markdown + OCR, $0.40/1K (`plotpointtech/pdf-text-markdown-tables-extractor`) Actor

Convert PDFs to clean text, Markdown and tables (rows + CSV) with metadata. Scanned pages are read with OCR in 28 languages. Paste links or upload a file. $0.40 per 1,000 pages, OCR pages $8 per 1,000.

- **URL**: https://apify.com/plotpointtech/pdf-text-markdown-tables-extractor.md
- **Developed by:** [Plot Point Technologies](https://apify.com/plotpointtech) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 pages

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 to Text & Tables Extractor: Markdown + OCR

**Give this tool links to PDF files, or upload a PDF, and get clean, structured content for each document:** the full text, a Markdown version with headings, lists and tables, every table as rows of cells and as CSV, and the document's metadata. Scanned pages without a text layer are read automatically with OCR (Tesseract) in 28 languages. **$0.40 per 1,000 pages; OCR pages $8 per 1,000.**

### What can this PDF extractor do?

- **PDF to text:** full plain text of every page.
- **PDF to Markdown:** headings (from font sizes), bullet and numbered lists, paragraphs and Markdown tables, ready for LLMs and RAG.
- **PDF tables to CSV:** each table as rows of cells plus a CSV string, with ruled-line or text-alignment detection.
- **OCR scanned PDFs** automatically (only pages without text, or every page if you choose) in English, German, French, Spanish, Chinese, Japanese, Arabic and 21 more languages.
- **Per-page output** for citations by page number.
- **Metadata:** title, author, subject, keywords, creator, producer, dates, page count, language and word count.
- **Process in bulk** from many links or an uploaded file, with page ranges, page caps and size and time limits.

### What data do you get?

| Field | Description |
|---|---|
| `url`, `finalUrl`, `fileName` | The document |
| `title`, `author`, `createdAt`, `modifiedAt`, `metadata` | Document metadata |
| `totalPages`, `pagesProcessed`, `processedPageNumbers`, `complete`, `stoppedEarly` | What was processed |
| `ocrUsed`, `ocrPages` | Whether OCR was needed and on how many pages |
| `language`, `wordCount`, `characterCount`, `fileSizeBytes` | Content stats |
| `text`, `markdown` | Full text and Markdown |
| `tables`, `tableCount` | Tables as `{page, rows, rowCount, columnCount, csv}` |
| `pages` | Optional per-page text and Markdown |
| `warnings`, `processingSecs` | Notes and timing |

### Who uses it?

- **AI and RAG builders** turning PDFs into Markdown or text before chunking and embedding.
- **Analysts and researchers** pulling tables from statistics releases, annual reports and filings into spreadsheets.
- **Operations and legal teams** searching or archiving contracts, forms, invoices and scanned letters.
- **Developers** who want "PDF in, JSON out" without running their own OCR servers.

### How to use it

1. Click **Try for free** (or **Start**).
2. Paste **PDF URLs**, or **upload a PDF**.
3. Optionally set a **Page range** (`1-5, 8, 10-`), **OCR languages** and table detection.
4. Run it and download JSON for Markdown and tables, or open the Documents view.
5. Call it from the API, Make, Zapier or n8n to process new PDFs as they arrive.

### Input example

```json
{
  "startUrls": [
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    }
  ],
  "pageRange": "1-6",
  "ocrMode": "auto",
  "ocrLanguages": [
    "eng"
  ],
  "extractTables": true,
  "includeMarkdown": true
}
```

### Output example

```json
{
  "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
  "finalUrl": null,
  "fileName": "fw9.pdf",
  "title": "Form W-9 (Rev. March 2024)",
  "author": "SE:W:CAR:MP",
  "createdAt": "2024-03-06T08:18:13-05:00",
  "modifiedAt": "2024-03-06T08:18:13-05:00",
  "totalPages": 6,
  "pagesProcessed": 6,
  "processedPageNumbers": [
    1,
    2,
    3
  ],
  "ocrUsed": false,
  "ocrPages": 0,
  "language": "en",
  "wordCount": 6511,
  "characterCount": 37876,
  "fileSizeBytes": 140815,
  "tableCount": 1,
  "text": "Form W-9\n\n(Rev. March 2024)\nDepartment of the Treasury\nInternal Revenue Service\nBefore you begin. For guidance related to the purpose of Form W-9, see Purpose of Form, below.\n\nRequest for Taxpayer\nIdentification Number a...",
  "markdown": "Form  W-9\n\n(Rev. March 2024) Department of the Treasury Internal Revenue Service Before you begin. For guidance related to the purpose of Form W-9, see Purpose of Form, below.\n\n# Request for Taxpayer Identification Numbe...",
  "tables": [
    {
      "page": 3,
      "rows": [
        [
          "IF the entity/individual on line 1 is a(n) . . .",
          "THEN check the box for . . ."
        ],
        [
          "• Corporation",
          "Corporation."
        ],
        [
          "• Individual or • Sole proprietorship",
          "Individual/sole proprietor."
        ]
      ],
      "rowCount": 6,
      "columnCount": 2,
      "csv": "IF the entity/individual on line 1 is a(n) . . .,THEN check the box for . . .\r\n• Corporation,Corporation.\r\n• Individual or • Sole proprietorship,Individual/sole proprietor.\r\n• LLC classified as a partnership for U.S. fed..."
    }
  ],
  "metadata": {
    "title": "Form W-9 (Rev. March 2024)",
    "author": "SE:W:CAR:MP",
    "subject": "Request for Taxpayer Identification Number and Certification",
    "keywords": "Fillable",
    "creator": "Designer 6.5",
    "producer": "Designer 6.5",
    "createdAt": "2024-03-06T08:18:13-05:00",
    "modifiedAt": "2024-03-06T08:18:13-05:00"
  },
  "complete": true,
  "stoppedEarly": null,
  "warnings": null,
  "processingSecs": 1.7
}
```

### How much does it cost?

You pay per page processed, so short documents cost very little:

| Event | Price | Per 1,000 |
|---|---|---|
| Page with a text layer | $0.0004 | **$0.40** |
| Scanned page read with OCR | $0.008 | $8 |
| Run start (per GB of memory) | $0.001 | |

Examples: a 6-page form costs about $0.0034; a 40-page report about $0.017; 1,000 text pages $0.40; a 100-page scanned archive about $0.80. Failed downloads, non-PDF files, password-protected PDFs and pages outside your range are not charged.

**Volume discounts on higher Apify plans.** The prices above are for the Apify Free plan. On paid plans the per-result price drops automatically: about 15% lower on Bronze, 25% lower on Silver and 38% lower on Gold and above.

### Use it via API, Make, Zapier, n8n or an AI agent

**Apify API.** Start a run and get the results back in one HTTP request (replace `YOUR_API_TOKEN` with the token from Apify Console > Settings > Integrations):

```bash
curl -X POST "https://api.apify.com/v2/acts/plotpointtech~pdf-text-markdown-tables-extractor/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": [{"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"}], "pageRange": "1-6", "ocrMode": "auto", "ocrLanguages": ["eng"], "extractTables": true, "includeMarkdown": true}'
```

For longer jobs, start the run asynchronously and read the dataset when it finishes. Official `apify-client` libraries exist for Python and JavaScript; the **API** tab on this page has ready-made code.

**No-code automation.** Connect the tool to **Make, Zapier, n8n, Google Sheets, Slack, Airtable** or any webhook with Apify integrations, and use **Schedules** in Apify Console to run it hourly, daily or weekly.

**AI agents (MCP).** Give Claude, ChatGPT, Cursor, VS Code or any MCP-compatible agent direct access to this tool through the hosted Apify MCP server. Add this server URL to your client:

```
https://mcp.apify.com?tools=plotpointtech/pdf-text-markdown-tables-extractor
```

The agent can then call the tool with the same input fields shown above and read the results.

### FAQ

**Is it legal to extract text from PDFs?**
Yes, for documents you are allowed to access and use. The tool downloads exactly the URLs you provide (or your upload) and does not log in anywhere. Respect copyright and confidentiality of the documents you process.

**Does it work on scanned PDFs?**
Yes. Pages without a text layer are OCR'd automatically. Quality depends on the scan; low-resolution or skewed scans give weaker results, and tables on scanned pages are returned as paragraphs.

**How fast is it?**
Text pages typically take well under a second each. OCR takes roughly 5 to 25 seconds per page; for large scanned archives, run with 4 GB of memory.

**Are password-protected PDFs supported?**
PDFs with an opening password are not. PDFs that only restrict printing or copying usually work.

**Is the Markdown good enough for RAG?**
It works well for reports, papers and statistics releases. Heavily designed brochures may lose some structure; multi-column layouts are read column by column.

### Related tools from Plot Point Technologies

- [Image OCR - Image to Text in Bulk, Tesseract & AI Vision](https://apify.com/plotpointtech/image-to-text-ocr-bulk): text from images in bulk, with AI mode for receipts and handwriting.
- [Website to Markdown Crawler for AI, LLM & RAG - $1/1K](https://apify.com/plotpointtech/website-to-markdown-crawler): any website as clean Markdown for LLMs and RAG.
- [AI Web Scraper - Extract Any Website to JSON in Plain English](https://apify.com/plotpointtech/ai-page-extractor): describe the fields you want and get JSON from any web page.

Plot Point Technologies is not affiliated with Adobe, the Tesseract project, or the publishers of any PDF you process.

***

If this tool saved you time, we would be grateful for a short review on this page; it helps other people find it. If something did not work as expected, please open an issue on the **Issues** tab and we will look into it quickly.

# Actor input Schema

## `startUrls` (type: `array`):

Direct links to PDF files. You can paste many at once or upload a text file with one URL per line. Links that fail to download or are not PDFs are skipped and not charged.

## `uploadedPdf` (type: `string`):

Upload a PDF from your computer. It is stored in your Apify key-value store and processed together with any URLs above.

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

Optional. Which pages to process in every PDF, e.g. 1-5, 8, 10- (page 10 to the end). Leave empty for all pages.

## `maxPagesPerPdf` (type: `integer`):

Stop after this many pages in each PDF (after applying the page range). Keeps costs predictable for very large files. 0 = no limit.

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

Auto reads only pages that have no text layer (scans, photographed pages) with OCR. Always runs OCR on every page (slower, use for PDFs whose text layer is garbled). Off never runs OCR; scanned pages then come back empty.

## `ocrLanguages` (type: `array`):

Languages printed in your scanned documents. Pick one or a few; adding many slows OCR down and can reduce accuracy.

## `extractTables` (type: `boolean`):

Detect tables and return each as rows of cells plus a CSV string. They also appear as Markdown tables in the Markdown output.

## `tableStrategy` (type: `string`):

Auto first looks for tables drawn with lines or cell borders and, on pages without any, for borderless tables whose columns are aligned numbers (typical of statistics releases). Ruled lines only is the most conservative. Text alignment only suits PDFs whose tables have no borders at all.

## `includeText` (type: `boolean`):

Full plain text of the processed pages.

## `includeMarkdown` (type: `boolean`):

Markdown version with headings, lists, paragraphs and tables, ready for LLMs and RAG.

## `includePages` (type: `boolean`):

Add a list with the text and Markdown of each page separately (useful for citations by page number).

## `maxFileSizeMb` (type: `integer`):

Larger files are skipped.

## `timeoutPerPdfSecs` (type: `integer`):

Processing stops after this many seconds for one PDF; pages done so far are still returned and marked incomplete.

## `maxConcurrency` (type: `integer`):

How many PDFs to download in parallel. PDFs are then processed one after another, which is fastest for this kind of work.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    }
  ],
  "maxPagesPerPdf": 300,
  "ocrMode": "auto",
  "ocrLanguages": [
    "eng"
  ],
  "extractTables": true,
  "tableStrategy": "auto",
  "includeText": true,
  "includeMarkdown": true,
  "includePages": false,
  "maxFileSizeMb": 100,
  "timeoutPerPdfSecs": 900,
  "maxConcurrency": 3
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("plotpointtech/pdf-text-markdown-tables-extractor").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 = { "startUrls": [{ "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf" }] }

# Run the Actor and wait for it to finish
run = client.actor("plotpointtech/pdf-text-markdown-tables-extractor").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 '{
  "startUrls": [
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    }
  ]
}' |
apify call plotpointtech/pdf-text-markdown-tables-extractor --silent --output-dataset

```

## MCP server setup

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

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/TqB5p4vPBHH31Swlu/builds/99O6HktpsjCrZ4wMb/openapi.json
