PDF to Markdown & Text Converter for AI avatar

PDF to Markdown & Text Converter for AI

Pricing

Pay per event

Go to Apify Store
PDF to Markdown & Text Converter for AI

PDF to Markdown & Text Converter for AI

Convert PDFs to clean Markdown or plain text for LLMs, RAG and search: headings, lists and tables kept, headers and page numbers removed, two-column layouts in order. Scanned PDFs are read with OCR (English, Japanese). Pay per page.

Pricing

Pay per event

Rating

0.0

(0)

Developer

OHS Data

OHS Data

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Share

Turn PDFs into clean Markdown or plain text that LLMs, RAG pipelines and search indexes can use right away.

  • Headings become #, ## and ### lines, based on font size
  • Ruled tables become Markdown tables (or tab-separated text)
  • Lists stay lists, and lines wrapped by the PDF are joined back into paragraphs (hyphenated words too)
  • Running headers, footers and page numbers that repeat on most pages are removed
  • Two-column layouts (papers, magazines) are read column by column, not across
  • Japanese and other CJK text is joined without stray spaces
  • Scanned PDFs are read with OCR (English, Japanese or both), page by page, only where a page has no text layer
  • One row per page option, with page numbers, for RAG chunking and citations
  • Runs inside the Actor: no third-party API, no subscription, your PDFs are not sent anywhere else

Typical uses: feeding documents to ChatGPT, Claude or other LLMs, building RAG knowledge bases, indexing reports and manuals for search, and document pipelines run by AI agents.

Input

{
"pdfUrls": ["https://example.com/annual-report.pdf"],
"outputFormat": "markdown",
"splitPages": false,
"removeHeadersFooters": true,
"includeTables": true,
"ocr": true,
"ocrLanguage": "eng",
"maxPages": 0
}

PDFs must be direct links, up to 100 MB each. Use maxPages to convert only the first pages.

Output

One row per PDF (or one per page with splitPages):

fieldexamplemeaning
content# Annual Report\n\n## Highlights…the Markdown or text
contentUrlhttps://api.apify.com/v2/key-value-stores/…/records/00000-….mdthe same content as a file
titleAnnual Report 2025title from the PDF's metadata
pageCount / pagesConverted42 / 42pages in the PDF and pages converted
ocrPages[7, 8]scanned pages that were read with OCR
pagesWithoutText[]pages where no text was found, even with OCR
pageNumber3with splitPages only
chargedPages / chargedOcrPages40 / 2pages billed as text pages and as OCR pages
errornullwhy a PDF could not be converted

Very long documents (over 2 million characters) are returned only through contentUrl.

Pricing

You pay per converted page with text, about $1 per 1,000 pages, with no per-document or start fee. Scanned pages read with OCR are billed per page at the OCR price shown on the Pricing tab. Pages where no text is found and PDFs that fail to download or open are free, and the run stops before it would go over your spending limit.

FAQ

Does it do OCR on scanned PDFs? Yes. Pages that are only images are read with Tesseract OCR in the language you pick. Pages that already have text are never OCR'd, so a normal PDF costs the same as before. OCR works best on straight, clean scans; for large scanned documents, give the run 4 GB of memory to make OCR about four times faster. Turn ocr off to skip scanned pages for free.

Are tables without lines detected? Tables drawn with ruling lines are converted to Markdown tables. Tables laid out with spaces only come out as text lines.

Are my PDFs stored anywhere? Results are saved only in your own run's storage, which follows your Apify data retention settings.

Can I process any file? Only process images and documents you own or have permission to use. The Actor does not check rights for you.

How do I call it from code or an AI agent? Use the Apify API or the Apify MCP server with the input shown above; each dataset row contains the converted content.

Credits

Built with pdfplumber and pdfminer.six (both MIT), pypdfium2 (Apache-2.0 / BSD-3-Clause) and Tesseract OCR with its language models (Apache-2.0). Not affiliated with their authors. The sample PDF in the input form was made for this Actor.