Go to example tasks

Convert PDFs to Markdown for RAG and LLMs

Turns PDF links into clean Markdown and plain text with headings, lists and ruled tables kept, ready for RAG pipelines, vector databases and LLM prompts. Pages with a text layer are read directly; scanned pages are OCR'd automatically. This example converts the IRS W-9 form.

Try for free
PDF & Image OCR to Text and Markdown
PDF & Image OCR to Text and Markdownklarto/pdf-ocr-markdown
File
Status
Markdown
Plain text
Text
Number
Boolean
List
Object

Input

File URLs(required):https://www.irs.gov/pub/irs-pdf/fw9.pdf
OCR mode:auto

Output fields

File
Status
Markdown
Plain text

How it works

Sign up on Apify or log in

The PDF & Image OCR to Text and Markdown Actor is ready to run with the inputs already set for "Convert PDFs to Markdown for RAG and LLMs". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "Convert PDFs to Markdown for RAG and LLMs" task

The PDF & Image OCR to Text and Markdown Actor will start running based on the input automatically. You can also change all the input fields, like file urls and OCR mode, to match your specific use case.

Receive the "Convert PDFs to Markdown for RAG and LLMs" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as file, status, markdown, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "Convert PDFs to Markdown for RAG and LLMs" task via API.

Image

Integrate "Convert PDFs to Markdown for RAG and LLMs" into your workflow

Connect "Convert PDFs to Markdown for RAG and LLMs" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay

Frequently asked questions

The PDF to Markdown task returns one item per file with the Markdown text, plain text, page counts, OCR languages and a status. A run summary is saved as the OUTPUT record in the run's key-value store.

Yes. The PDF to Markdown task reads the text layer where there is one and runs Tesseract OCR only on pages without usable text, so mixed PDFs work in one run.

Converting a PDF to Markdown costs $0.001 per page read from the text layer and $0.005 per OCR page. Blank and failed pages are free. Apify adds a start event of $0.0001 per run at 2 GB.

The PDF to Markdown task accepts up to 1,000 direct file links per run, including Dropbox and Google Drive share links that are converted to direct downloads.