Aurelix

Tools › AI and RAG

PDF to Markdown OCR & Table Extraction

Convert PDF and DOCX links into clean Markdown, tables as JSON rows and RAG-ready chunks for $0.30 per 1,000 pages, no login, with OCR for scans.

For RAG pipelines and document workflows. Priced per page, so a 10-page PDF costs $0.003; scanned pages are read with OCR automatically at $8 per 1,000 OCR pages.

$0.30 per 1,000 pages ($0.25 on paid Apify plans)

At a glance

What the PDF to Markdown OCR & Table Extraction does

Input
PDF or DOCX links (up to 50 MB each)
Per page
Markdown, tables as JSON rows, text chunks, word count, OCR flag
OCR
Tesseract for scanned pages: English, French, Spanish, German
Output
13 fields per page; JSON, CSV, Excel, API
Automate
Schedules, webhooks, Zapier, Make, n8n, Google Sheets, MCP for AI agents

Who it is for

  • AI developers loading reports, manuals and papers into a RAG pipeline
  • Analysts pulling tables out of statistical releases and annual reports
  • Teams digitising scanned letters and forms with OCR
  • AI agents that need a document's text and tables through MCP

Output

What you get

  • url, file_name, file_type (pdf or docx), title, page, pages_total
  • markdown: the page as Markdown
  • tables: [{index, rows}] with each table as rows of cells
  • chunks: the page split for embeddings; word_count
  • ocr: true when the page was read by OCR; source_url and scraped_at

Example

Input and output

Input

{
  "urls": [
    "https://arxiv.org/pdf/1706.03762",
    "https://www.bls.gov/news.release/pdf/empsit.pdf"
  ],
  "maxPagesPerDocument": 50,
  "chunkSize": 1500
}

One output record

{
  "url": "https://calibre-ebook.com/downloads/demos/demo.docx",
  "file_name": "demo.docx",
  "file_type": "docx",
  "title": "DOCX Demo",
  "page": 1,
  "pages_total": 4,
  "markdown": "# Demonstration of DOCX support in calibre\n\nThis document demonstrates the ability of the calibre DOCX Input plugin to convert the various typographic…",
  "tables": [
    {
      "index": 0,
      "rows": [
        [
          "ITEM",
          "NEEDED"
        ],
        [
          "Books",
          "1"
        ],
        [
          "Pens",
          "3"
        ],
        "… 3 more"
      ]
    }
  ],
  "chunks": [
    "# Demonstration of DOCX support in calibre\n\nThis document demonstrates the ability of the calibre DOCX Input plugin to convert the various typographic…",
    "formatting\n\nYou can do crazy things with paragraphs, if the urge strikes you. For instance this paragraph is right aligned and has a right border. It has…"
  ],
  "word_count": 513,
  "ocr": false,
  "source_url": "https://calibre-ebook.com/downloads/demos/demo.docx",
  "scraped_at": "2026-11-04T19:25:43Z"
}

From a real run of this tool; long text and lists shortened here.

How to use it

Three steps

  1. Paste one or more PDF or DOCX links, e.g. https://arxiv.org/pdf/1706.03762.
  2. Optionally limit the pages per document, choose the OCR language for scans and set the chunk size.
  3. Click Start, then download JSON, CSV or Excel, or send the pages to your vector database, LangChain, LlamaIndex, Zapier, Make or n8n through the API.

API

Call it from Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("aurelix/pdf-to-markdown").call(run_input={'urls': ['https://arxiv.org/pdf/1706.03762',
          'https://www.bls.gov/news.release/pdf/empsit.pdf'],
 'maxPagesPerDocument': 50,
 'chunkSize': 1500})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

pip install apify-client. The same input works from the Apify console, a schedule, Make, n8n, Zapier or an AI agent through the Apify MCP server.

Pricing

Pay per result

Per 1,000 pages, free plan$0.30
Per 1,000 pages, paid plans$0.25
Ocr page result, per 1,000, free plan$8.00
Ocr page result, per 1,000, paid plans$5.60
Start fee per run$0.001

Live prices from the Apify Store; no subscription and no platform usage billed on top. See the Store page.

Honest limits

What it does not do

  • Multi-column layouts (papers, forms) are read line by line across the page, so columns can interleave.
  • Tables without ruling lines are kept as text rows, not split into cells; merged cells come back as repeated or empty cells.
  • OCR quality depends on the scan; handwriting is not supported, and OCR runs at about 3 to 10 seconds a page.
  • Images, charts and formulas are not described; only their horizontal text labels come through (rotated or vertical text is skipped).
  • Files over 50 MB, password-protected PDFs, legacy .doc and other formats are skipped without charge.
  • Documents are read from the first page up to 'Max pages per document' (300 by default).
  • A document stops after 5 blank scanned pages in a row (blank pages are never charged), so scans with long blank runs end early.

FAQ

Questions buyers ask

How much does the PDF to Markdown OCR & Table Extraction cost?

$0.30 per 1,000 pages ($0.25 on paid Apify plans), billed through your Apify account; you pay only for results. Apify's free plan includes $5 of credit a month, enough for about 16,666 pages.

How does per-page pricing compare with per-PDF pricing?

You pay $0.30 per 1,000 pages ($0.25 on paid plans) plus $0.001 per run, so a 10-page PDF costs $0.003. Scanned pages cost $8 per 1,000 OCR pages instead.

Which files are supported?

PDF (any version, text or scanned) and Word DOCX. The type is detected from the file's content, so download links without a .pdf ending work. Legacy .doc, PowerPoint and Excel files are not supported.

How are scanned PDFs handled?

Each page is checked for a text layer. A page with almost no text and an image is rendered at 200 dpi and read by Tesseract OCR in the language you choose. Scans that already carry a hidden OCR text layer (common for library scans) use that layer as is.

How good is table extraction?

Tables drawn with lines are returned as Markdown tables and JSON rows. Tables laid out with spaces only, common in statistical releases, are kept as one row per line in the Markdown but are not split into cells.

What is a page for a DOCX file?

Word files have no fixed pages, so they are split on paragraph boundaries into page-equivalents of about 3,000 characters, each charged as one page.

Does it respect robots.txt?

Yes. Each download, including every redirect hop, is checked against the site's robots.txt; a robots.txt that answers with a server error counts as disallowed.

Can I use it from an AI assistant?

Yes. Give 'urls' and optionally 'maxPagesPerDocument'. It works through Apify's MCP server and API.

Is this legal?

It reads only public data any logged-out visitor can see: the documents you link (convert only documents you have the right to use). It goes at a polite pace, respects robots.txt, never logs in and never solves CAPTCHAs. It returns each page's text and tables as the document published them; copyright stays with the owner, and any personal data inside a document is your responsibility. To have a record removed, open an issue on this Actor's Issues tab; if a site owner formally asks us to stop, this Actor will stop. You are responsible for using the data lawfully, incl. anti-spam and privacy laws; this is not legal advice.

What am I charged when a link fails?

Nothing for that link. URLs that return an HTTP error, are blocked by robots.txt, are over 50 MB or are not a PDF or DOCX produce no row and no charge. A run where every link fails costs only the $0.001 start fee, and its status message names up to 3 failed URLs with the reason.

Are blank pages charged?

No. A page with no text, even after OCR, is skipped for free and counted as an empty page in the status message. A document stops after 5 blank scanned pages in a row, so a long blank scan does not keep the run busy.

Does it retry a failed download?

No. A link that answers with an error such as HTTP 429 or 500 is reported as failed and not charged; run it again later. A host that does not answer at all is given up on after 5 seconds.

Can I convert only pages 10 to 20?

Not directly. Max pages per document reads from the first page, so set it to 20 and keep the rows where page is 10 or more. You pay for every page returned.

How are the chunks made?

Each page's Markdown is split on paragraph and then sentence boundaries into chunks of at most chunkSize characters (2,000 by default, up to 20,000), with 200 characters of overlap between chunks. Set chunkSize to 0 to get the whole page as one chunk.

In what order are documents processed?

One at a time, in the order of the urls list, and each document from its first page. The same URL listed twice is downloaded once. If the run approaches its timeout, it stops cleanly and keeps the pages already returned.

How do I know which pages were read by OCR?

The ocr field is true on those pages, and the status message gives the count. OCR pages are charged as OCR pages at $8 per 1,000 instead of the text-page price, never both.

How do I export pages to Google Sheets?

Download the run's results as CSV or Excel and open them in Google Sheets, or add Apify's Google Sheets integration to the run or a schedule so every run's results land in a sheet.

Guides

Tutorials using this tool

Related

Related tools

Try the PDF to Markdown OCR & Table Extraction

Open it on the Apify Store, paste the example input above and click Start. Results download as CSV, Excel or JSON.