# PDF Text Extractor & PDF to Markdown: Tables, OCR, RAG (`bigkerm/document-to-markdown-tables-ocr`) Actor

PDF text extractor and PDF to Markdown converter for LLMs: clean Markdown, tables as CSV, RAG chunks with page numbers, and OCR for scanned pages. Also Word, PowerPoint, Excel, HTML, EPUB and images. A 10-page text PDF costs about $0.008. Failed files are not charged.

- **URL**: https://apify.com/bigkerm/document-to-markdown-tables-ocr.md
- **Developed by:** [Kerm Labs](https://apify.com/bigkerm) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

PDF text extractor and PDF to Markdown converter built for LLMs and RAG. Paste a link (public Google Drive, Dropbox and arXiv links work) or upload a file and get clean Markdown, tables as CSV, and RAG chunks with page numbers. Scanned pages are read with OCR automatically. One dataset record per document, plus full Markdown, text, CSV and JSON Lines files in the key-value store.

**Quick start:** 1) Paste a document link or upload a file. 2) Click Start. 3) Read the Markdown in the dataset, or download the .md, CSV and JSON Lines files from the key-value store.

**Typical cost:** 10-page text PDF: $0.008. 10-page scan: $0.043. Plus a $0.0001 run start fee. Lower prices on paid Apify plans. Failed downloads and unsupported files are not charged.

| In one run | |
|---|---|
| Clean Markdown with headings, lists and paragraphs | Yes |
| Tables as rows, Markdown and CSV (scanned tables come out as text) | Yes |
| RAG chunks with heading path and page numbers | Yes |
| OCR for scanned pages in 7 languages | Yes |
| Running headers and footers removed (documents of 3+ pages) | Yes |
| Word, PowerPoint, Excel, HTML, EPUB and images too | Yes |

**What you get from one run**

- Clean Markdown with real structure: a title, section headings and sub-headings (numbered sections like "3.2.1" nest correctly), lists, and paragraphs split where the document splits them (first-line indents, 1.5 and double spacing included). Hyphenated words and paragraphs cut by a page break are joined again. Running headers, footers and page numbers are removed, also when left and right pages differ.
- Sideways pages (a landscape table on a portrait sheet) are turned and read as text, not sent to OCR.
- Real tables: ruled and borderless tables in PDFs, plus DOCX, PPTX, XLSX, HTML and CSV tables, as rows, as a GitHub Markdown table in place inside the text, and as a CSV file each.
- RAG chunks: token-sized chunks that break at paragraphs, lists and tables, carry a heading path and page numbers, and overlap. Also saved as one JSON Lines file per document, ready to import.
- Automatic OCR (Tesseract) only for scanned pages. Blank pages and pages with just a few words are not sent to OCR, and a scan lying on its side or upside down is turned upright first. English, Spanish, French, German, Portuguese, Italian, Dutch.
- Share links work: public Google Drive, Google Docs, Sheets and Slides, Dropbox, GitHub and arXiv links are turned into direct downloads.
- Per-page Markdown, metadata (title, author, created, modified, producer), word counts and warnings.
- Honest billing: failed downloads, unsupported files, too-large files, encrypted files without a password, blank pages and pages you skip are never charged. A link that returns a web page (login, error or viewer page) where a document was expected fails with a clear message and is not charged.

### Who it is for

AI agents (it works through the Apify MCP server), RAG and search pipelines, and data teams that need tables out of reports, filings, invoices and manuals without flattening them to text.

### Supported files

PDF, DOCX, PPTX, XLSX, XLS, HTML, CSV, JSON, EPUB, TXT, Markdown, and images (PNG, JPG, TIFF, always read with OCR). The type is detected from the content, not the file name. Legacy .doc and .ppt files and other formats come back as status `unsupported` (not charged): save them as .docx, .xlsx or .pptx first.

### Input

| Field | What it does |
|---|---|
| `urls` | Links to documents. Redirects are followed (up to 10). Public Google Drive, Google Docs/Sheets/Slides, Dropbox, GitHub and arXiv share links are turned into direct downloads. |
| `files` | Upload files in the input form instead of using a public link. |
| `outputs` | Any of `markdown`, `text`, `tables`, `pages`, `chunks`. Default markdown, tables, chunks. |
| `ocr` | `auto` (scanned pages only, default), `off`, `force`. |
| `ocrLanguages` | Default `["eng"]`. Fewer languages is faster and more accurate. |
| `pageRange` | For example `1-5, 8, 12-`. Applies to PDF pages, slides and sheets. |
| `maxPagesPerDocument` | Default 300, max 2000. Documents cut by it are `partial`. |
| `maxFileSizeMb` | Default 100, max 200. |
| `maxOcrPagesPerDocument` | Default 100. Scanned pages past the limit are left out (the document is `partial`); pages with a text layer still convert. |
| `chunkSize`, `chunkOverlap` | Tokens, default 800 and 100. |
| `password` | For encrypted PDFs (stored encrypted). |
| `maxConcurrency` | Default 3. |
| `timeoutPerDocumentSecs` | Default 300. Download plus conversion. |

```json
{
  "urls": ["https://arxiv.org/pdf/1706.03762"],
  "outputs": ["markdown", "tables", "chunks"],
  "pageRange": "1-6"
}
```

### Output

Each dataset item (trimmed from a real run on an arXiv paper, 15 pages):

```json
{
  "type": "document",
  "url": "https://arxiv.org/pdf/1706.03762",
  "fileName": "1706.03762",
  "fileType": "pdf",
  "status": "ok",
  "error": null,
  "pageCount": 15,
  "pagesProcessed": 15,
  "ocrPages": 0,
  "tableCount": 2,
  "wordCount": 6294,
  "metadata": {"title": null, "author": null, "created": "2024-04-10T21:11:43", "modified": "2024-04-10T21:11:43", "producer": "pdfTeX-1.40.25"},
  "tables": [{
    "page": 6, "index": 1, "csvKey": "TABLE-1-p6-1.csv",
    "rows": [["Self-Attention", "O ( n 2 · d )", "O (1)", "O (1)"], ["Recurrent", "O ( n · d 2 )", "O ( n )", "O ( n )"]],
    "markdown": "| Self-Attention | O ( n 2 · d ) | O (1) | O (1) |\n| --- | --- | --- | --- |\n| Recurrent | ..."
  }],
  "chunks": [{"id": "DOC-1-0", "index": 0, "pageStart": 1, "pageEnd": 2, "heading": null, "text": "...", "tokens": 715}],
  "files": {"markdownKey": "DOC-1-1706.03762.md", "textKey": null, "chunksKey": "CHUNKS-1.jsonl", "tablesCsvKeys": ["TABLE-1-p6-1.csv"]}
}
```

Other fields: `markdown`, `text`, `pages` (`page`, `markdown`, `ocr`), `warnings`. Fields you did not ask for in `outputs` are left out.

- `markdown` and `text` are cut at 1 MB inside the item. The full `.md` file is always in the key-value store, whatever `outputs` says (`DOC-<n>-<name>.md`), and `.txt` when you ask for `text`. If a whole item would pass 5 MB, `pages`, then `chunks`, then table rows are left out of the item (a warning says so) and stay in the key-value store files.
- The `OUTPUT` record lists every document with links to its files and which documents were skipped.
- Tokens are estimated as characters divided by 4, not counted with a model tokenizer. Treat chunk sizes as close, not exact.

### Use it from an AI agent

Call the Actor through the Apify MCP server with `urls` and the outputs you need. Use `outputs: ["markdown"]` for reading, add `"chunks"` for indexing and `"tables"` for data. Check `status` and `warnings` in each record: `partial` explains why in `error`.

MCP clients (Claude Desktop, Cursor, VS Code): connect `https://mcp.apify.com?tools=bigkerm/document-to-markdown-tables-ocr`, or run the server locally:

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--tools", "bigkerm/document-to-markdown-tables-ocr"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

### Use it from code: Python, JavaScript, LangChain, HTTP API

**Python** (`pip install apify-client`): convert a PDF to Markdown and RAG chunks.

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("bigkerm/document-to-markdown-tables-ocr").call(
    run_input={"urls": ["https://arxiv.org/pdf/1706.03762"], "outputs": ["markdown", "chunks"]}
)
for doc in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(doc["status"], doc["url"], doc.get("wordCount"))
    print((doc.get("markdown") or "")[:500])
    for chunk in doc.get("chunks") or []:
        print(chunk["pageStart"], chunk["heading"], chunk["tokens"])
```

**LangChain** (`pip install langchain-apify`, token in `APIFY_TOKEN`): load each document as a LangChain `Document`.

```python
from langchain_apify import ApifyWrapper
from langchain_core.documents import Document

apify = ApifyWrapper()
loader = apify.call_actor(
    actor_id="bigkerm/document-to-markdown-tables-ocr",
    run_input={"urls": ["https://arxiv.org/pdf/1706.03762"], "outputs": ["markdown"]},
    dataset_mapping_function=lambda item: Document(
        page_content=item.get("markdown") or "", metadata={"source": item["url"]}
    ),
)
docs = loader.load()
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('bigkerm/document-to-markdown-tables-ocr').call({
    urls: ['https://arxiv.org/pdf/1706.03762'],
    outputs: ['markdown', 'tables'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].markdown.slice(0, 500));
```

**HTTP API**: one request that waits for the run (up to 5 minutes) and returns the dataset items.

```bash
curl -X POST "https://api.apify.com/v2/acts/bigkerm~document-to-markdown-tables-ocr/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"urls": ["https://arxiv.org/pdf/1706.03762"], "outputs": ["markdown"]}'
```

**No code (n8n, Make, Zapier):** add the Apify app, choose "Run Actor", enter `bigkerm/document-to-markdown-tables-ocr` and the input JSON, then read the dataset items. A common flow: new file in Google Drive or an email attachment, its public link to this Actor, the Markdown to Notion, a database or a vector store.

### Pricing

Pay per event:

- **Run start**: $0.00005 per GB of memory, so $0.0001 per run at the default 2 GB.
- **Document converted**: $0.003, once per document with status `ok` or `partial`.
- **Page converted**: $0.0005 per page with a text layer. Slides and sheets count as pages. Documents without fixed pages (DOCX, HTML, TXT, CSV, JSON, EPUB) are split into sections of about 500 words and each section counts as a page.
- **OCR page**: $0.004 per page that was read with OCR and produced text. An OCR page is not also charged as a converted page.

Never charged: download failures, HTTP errors, unsupported files, too-large files, encrypted files without the password, documents where no text was found, pages skipped by `pageRange` or by the limits, OCR pages that produced no text. Your maximum charge per run is respected: the run checks it before every document, stops cleanly, still saves what was converted (`partial`) and lists skipped documents in `OUTPUT`.

Example: a 10 page text PDF costs $0.003 + 10 x $0.0005 = $0.008, and a 10 page scan $0.003 + 10 x $0.004 = $0.043, plus the run start fee.

Volume discounts by Apify plan (per event, as listed in the Actor's pricing tab):

| Plan | Document converted | Page converted | OCR page |
|---|---|---|---|
| Free | $0.003 | $0.0005 | $0.004 |
| Starter (Bronze) | $0.0027 | $0.00045 | $0.0036 |
| Scale (Silver) | $0.0024 | $0.0004 | $0.0032 |
| Business (Gold) | $0.0021 | $0.00035 | $0.0028 |
| Enterprise (Platinum, Diamond) | $0.0021 | $0.00035 | $0.0028 |

### FAQ

**How do I convert a PDF to Markdown?** Paste the PDF link in "Document links" (or upload the file) and run. The dataset item has `markdown`, and the full `.md` file is in the key-value store.

**How do I extract tables from a PDF to CSV?** Keep `tables` in "What to return". Each table is saved as its own CSV file and as rows in the item. Ruled tables work best; scanned tables come out as text.

**How do I prepare PDFs for RAG?** Ask for `chunks`. You get token-sized chunks (default 800 tokens, 100 overlap) that break at paragraphs, carry a heading path and page numbers, plus one JSON Lines file per document ready to import.

**Does it handle scanned PDFs?** Yes. In `auto` mode a page that is an image with no text layer (or only a stamp or page number in the margin) is OCRed. A scan with an existing hidden text layer is read from that layer. Blank pages, title pages with a few words and covers with real text over a picture are read from the text layer, which is faster, cheaper and more accurate. A scan that is sideways or upside down is turned upright before reading.

**Headings?** PDFs carry no heading marks, so headings are worked out from font size, bold fonts and numbering: the biggest text at the top of page 1 is the title, numbered sections ("3", "3.2", "3.2.1") nest by their number, and bold run-in phrases, table of contents lines and page stamps are not headings. Unusual designs can still be misread.

**My link is a Google Drive or Dropbox share link.** Public share links from Google Drive, Google Docs, Sheets and Slides, Dropbox, GitHub and arXiv are rewritten to direct downloads. Private files need to be uploaded instead. If a link returns a web page where a document was expected (a login or error page), the document fails with a message and is not charged.

**Two-column papers?** Two-column pages are read left column first, then right. Full-width titles and captions split the page into bands. Complicated layouts (sidebars, text around figures) can come out in the wrong order.

**How good are the tables?** Ruled tables are usually good. Borderless tables are found by column gaps and can merge two close columns or split a wrapped header into extra rows. Cells with several lines of text are joined into one line. Scanned tables are read as text, not as tables.

**Is OCR accurate?** Tesseract is good on clean 300 dpi scans and weak on handwriting, stamps and faded typewriter text. Expect some misread words on old documents.

**Passwords?** Set `password` for PDFs that need one. It is stored encrypted and used for all documents in the run. Without it the document is `encrypted` and free.

**Is my file kept?** Files are downloaded to the run's temporary disk and deleted after conversion. Nothing is sent anywhere except the download itself. Office macros and scripts are never run.

**Can it convert web pages (HTML to Markdown)?** Yes. Paste the page link. The page's main content is converted (one `<main>` element when the page has it); navigation, headers, footers, sidebars, hidden elements and language menus are left out. JavaScript is not run, so pages built in the browser can come out empty.

**Can it read text from images (image to text)?** Yes. PNG, JPG and TIFF are always read with OCR and billed as OCR pages. An image where no text was found is not charged.

**How do I extract plain text from a PDF?** Set "What to return" to `text`. The dataset item has `text` and a `.txt` file is saved per document.

### Limits

- Max 2000 pages and 200 MB per document (defaults 300 and 100). Zip-based files that unpack to more than 400 MB or look like decompression bombs are refused. Images over 100 million pixels are refused.
- Private, loopback and cloud metadata addresses are blocked on every redirect.
- Documents run in a separate process killed at `timeoutPerDocumentSecs`. Pages finished before that are kept (`partial`).
- Memory: the default is 2048 MB. Each document that needs OCR can use about 500 MB, so lower `maxConcurrency` for large scanned jobs.
- Pictures and charts inside documents are not described. Headers and footers of DOCX files, footnotes and comments are not included.
- Page headers, footers and page numbers are removed only when 3 or more pages are converted (after `pageRange`).
- Pages that cannot be read are skipped with a warning and the document is `partial`; you are charged only for pages that produced text.
- A `pageRange` that starts after the last page (for example `12-` on 10 pages) selects no pages: the document is `failed` and not charged.
- Compressed downloads are unpacked only up to `maxFileSizeMb`.

### Ready-made examples

Open one, change the link, and click Start:
[PDF to Markdown](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/pdf-to-markdown),
[PDF to text](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/pdf-to-text),
[PDF table extractor (CSV)](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/pdf-table-extractor),
[OCR scanned PDF to text](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/ocr-scanned-pdf-to-text),
[image to text OCR](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/image-to-text-ocr),
[PDF to RAG chunks](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/pdf-to-rag-chunks),
[HTML to Markdown](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/html-to-markdown),
[Word DOCX to Markdown](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/word-docx-to-markdown),
[Excel XLSX to Markdown and CSV](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/excel-xlsx-to-markdown-csv),
[PowerPoint PPTX to Markdown](https://apify.com/bigkerm/document-to-markdown-tables-ocr/examples/powerpoint-pptx-to-markdown).

### More from Kerm Labs

[SEO Audit & Broken Link Checker with llms.txt Generator](https://apify.com/bigkerm/website-health-ai-readiness-audit): a 0-100 SEO score with fixes, verified broken links, an llms.txt draft and which AI crawlers your robots.txt blocks, for any website.

# Actor input Schema

## `urls` (type: `array`):

Links to PDF, DOCX, PPTX, XLSX, XLS, HTML, CSV, JSON, EPUB, TXT, Markdown or image (PNG, JPG, TIFF) files, one per line. Public Google Drive, Google Docs, Sheets and Slides, Dropbox, GitHub and arXiv share links are turned into direct downloads. Redirects are followed (up to 10). The file type is detected from the content, not the name. Private network addresses are blocked.

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

Optional. Upload files to a key-value store from this field instead of using a public link. Each upload becomes a link that is downloaded like the ones above.

## `outputs` (type: `array`):

markdown: whole document as Markdown. text: plain text. tables: every table as rows, Markdown and a CSV file. pages: Markdown per page. chunks: RAG-ready chunks. The full files are always saved in the key-value store as well.

## `ocr` (type: `string`):

auto: read only pages that have no usable text layer (scans). off: never OCR (scanned pages come back empty and are not charged). force: OCR every page, even those with text.

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

Languages of the scanned text. Using only the languages you need is faster and more accurate.

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

Only convert these pages (or slides, or sheets), for example 1-5, 8, 12-. Empty means all. Skipped pages are not charged. Does not apply to DOCX, HTML, TXT and other documents without fixed pages.

## `maxPagesPerDocument` (type: `integer`):

Pages beyond this are skipped (the document is then marked partial) and not charged.

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

Larger files are not downloaded fully and are not charged (status too-large).

## `maxOcrPagesPerDocument` (type: `integer`):

OCR is the slowest and most expensive step. After this many OCR pages the document stops and is marked partial.

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

Target size of each RAG chunk. Tokens are estimated as characters divided by 4. Chunks break at paragraph, list and table boundaries and start a new chunk at a heading once half full.

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

How much of the end of one chunk is repeated at the start of the next.

## `password` (type: `string`):

Password for encrypted PDFs. Stored encrypted. Used for every document in this run.

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

How many documents are converted in parallel. Each OCR document can use several hundred MB of memory.

## `timeoutPerDocumentSecs` (type: `integer`):

Download plus conversion. A document that runs out of time keeps the pages it finished and is marked partial.

## Actor input object example

```json
{
  "urls": [
    "https://arxiv.org/pdf/1706.03762"
  ],
  "outputs": [
    "markdown",
    "tables",
    "chunks"
  ],
  "ocr": "auto",
  "ocrLanguages": [
    "eng"
  ],
  "pageRange": "",
  "maxPagesPerDocument": 300,
  "maxFileSizeMb": 100,
  "maxOcrPagesPerDocument": 100,
  "chunkSize": 800,
  "chunkOverlap": 100,
  "maxConcurrency": 3,
  "timeoutPerDocumentSecs": 300
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

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

No description

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

No description

## `markdownFiles` (type: `string`):

No description

## `chunkFiles` (type: `string`):

No description

## `tableFiles` (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 = {
    "urls": [
        "https://arxiv.org/pdf/1706.03762"
    ],
    "outputs": [
        "markdown",
        "tables",
        "chunks"
    ],
    "ocrLanguages": [
        "eng"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigkerm/document-to-markdown-tables-ocr").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 = {
    "urls": ["https://arxiv.org/pdf/1706.03762"],
    "outputs": [
        "markdown",
        "tables",
        "chunks",
    ],
    "ocrLanguages": ["eng"],
}

# Run the Actor and wait for it to finish
run = client.actor("bigkerm/document-to-markdown-tables-ocr").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 '{
  "urls": [
    "https://arxiv.org/pdf/1706.03762"
  ],
  "outputs": [
    "markdown",
    "tables",
    "chunks"
  ],
  "ocrLanguages": [
    "eng"
  ]
}' |
apify call bigkerm/document-to-markdown-tables-ocr --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigkerm/document-to-markdown-tables-ocr"
        }
    }
}
```

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/VonrVKF9H4qFwkwHg/builds/1NlcoicVWQgsQ6EAn/openapi.json
