PDF, DOCX & Image to Text and Markdown (OCR) avatar

PDF, DOCX & Image to Text and Markdown (OCR)

Pricing

from $1.46 / 1,000 ocr pages

Go to Apify Store
PDF, DOCX & Image to Text and Markdown (OCR)

PDF, DOCX & Image to Text and Markdown (OCR)

Turn PDFs, Word DOCX files and scanned images into clean text and Markdown, one row per page. Uses the PDF text layer when there is one and Tesseract OCR only when needed, so you pay the OCR price only for scanned pages.

Pricing

from $1.46 / 1,000 ocr pages

Rating

0.0

(0)

Developer

Brimfold Studio

Brimfold Studio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Security

Limited permissions

Share

Turn PDFs, Word documents and scanned images into clean text and Markdown. You get one row per page with the page text, a Markdown version, word and character counts and an OCR confidence score, plus one combined Markdown file per document. Good for RAG and LLM pipelines, search indexes, archive digitisation and data entry.

Only process documents you have the right to use. The Actor downloads the links you give it. Copyright and confidentiality stay with the document owner, and you are responsible for having the right to download, convert and store each document.

Why this one

  • Text layer first, OCR only when needed. For each PDF page the Actor reads the embedded text. Only pages with almost no text (scans) go to Tesseract OCR. Text-layer pages cost a quarter of the OCR price.
  • Markdown that keeps structure. DOCX headings become # headings, lists stay lists, bold and italic are kept and tables become Markdown tables. PDF and OCR pages become clean paragraphs with broken hyphenation repaired.
  • Per-page rows. Each row says how it was read (text-layer, ocr or docx), so you can filter low-confidence OCR pages.
  • Predictable cost. Hard caps on documents, pages per document and file size. Skipped files are never charged.
  • Permissive open-source stack only. No AGPL or GPL code (see Licences below).

Supported files

TypeHow it is readRows
PDFPDFium text layer per page; Tesseract OCR for pages without text (or every page with ocrMode: always)One per page, up to maxPagesPerDocument
DOCX (Word 2007+)python-docx: paragraphs, headings, lists, bold/italic, tables, in document orderOne per document
PNG, JPEG, TIFF (multi-page too), BMP, GIF, WebPTesseract OCROne per image frame

Legacy .doc, password-protected PDFs and other formats are skipped with a reason (unsupported-type, unreadable-document) and are not charged.

Input

FieldDefaultNotes
documentUrls2 public-domain sampleshttp/https links to the files
ocrModeautoauto = text layer first, OCR only pages without text. always = OCR every PDF page (use when the text layer is poor). never = text layer only; images are skipped
ocrLanguages["eng"]Up to 3 of eng, deu, fra, spa, ita, por, nld. Each extra language makes OCR slower
ocrDpi200100 to 400. 300 helps small print but is slower
maxPagesPerDocument100Later pages are not processed or charged
maxDocuments50Hard cap per run
maxFileSizeMb50Bigger files are skipped, checked while downloading
includeMarkdowntrueAdds markdown to each row; the combined .md file is always saved

Output

{
"url": "https://upload.wikimedia.org/wikipedia/commons/1/1b/Federal_Register-Vol74No33.pdf",
"fileName": "Federal_Register-Vol74No33.pdf",
"documentType": "pdf",
"pageNumber": 1,
"pageCount": 2,
"method": "text-layer",
"text": "Federal Register / Vol. 74, No. 33 / Friday, February 20, 2009 / Rules and Regulations ...",
"markdown": "Federal Register / Vol. 74, No. 33 / Friday, February 20, 2009 / Rules and Regulations ...",
"charCount": 6378,
"wordCount": 951,
"ocrConfidence": null,
"ocrLanguages": null,
"processingSecs": 0.01,
"markdownFileKey": "0001-Federal_Register-Vol74No33.pdf.md",
"markdownFileUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/0001-Federal_Register-Vol74No33.pdf.md",
"processedAt": "2026-11-02T19:56:52Z"
}

ocrConfidence is Tesseract's mean word confidence (0 to 100) for OCR pages. The RUN-SUMMARY record in the key-value store lists skipped links with reasons, OCR CPU and wall time per page, and the charge counts.

Pricing

Pay per event, no platform usage added:

EventPriceWhen
ocr-page$0.002 ($2 per 1,000)A page or image frame whose text came from OCR
text-page$0.0005 ($0.50 per 1,000)A PDF page read from its text layer, or one DOCX document
Actor start$0.00005Once per run

Examples: a 40-page digital PDF costs $0.02. A 40-page scan costs $0.08. 1,000 scanned pages cost $2. A page that OCR runs on is charged even if no text is found on it (the OCR work still runs). In auto mode a PDF that already has a poor text layer (for example from an old scanner) is read as text; use always for those.

Security, terms and rate limits

  • Private networks are blocked. Links that resolve to private, loopback, link-local, carrier-grade NAT, multicast or reserved addresses (for example 127.0.0.1, 10.x, 169.254.169.254, localhost) are refused, on every redirect hop too. The connection is pinned to the address that was checked.
  • robots.txt is respected (RFC 9309) with the user-agent token BrimfoldStudio-DocToText, including Crawl-delay (up to 30 s). Links blocked by robots.txt are skipped.
  • Polite fetching: at most 2 requests at a time per host with a short gap, retries with back-off on 429 and 5xx, Retry-After honoured.
  • No logins, cookies or captcha solving of any kind. Only use documents the site's terms let you download.
  • Files are downloaded to a temporary folder inside the run and deleted after conversion. Only the extracted text and Markdown are stored.

Licences

All processing libraries are permissively licensed. No PyMuPDF or other AGPL/GPL code is used.

ComponentUseLicence
pypdfium2PDF text layer and page renderingApache-2.0 or BSD-3-Clause
PDFium (bundled in pypdfium2)PDF engineBSD-3-Clause (Apache-2.0 parts)
Tesseract OCR 5 and its language data (Debian packages)OCRApache-2.0
LeptonicaImage library used by TesseractBSD-2-Clause style
pytesseractPython wrapper for TesseractApache-2.0
python-docxDOCX readingMIT
lxml (python-docx dependency)XMLBSD-3-Clause
PillowImagesMIT-CMU (HPND)
httpxDownloadsBSD-3-Clause
Apify SDK for PythonActor runtimeApache-2.0

FAQ

Is handwriting supported? Not well. Tesseract is built for printed text.

How fast is it? Measured on Apify at 1 GB: about 0.8 s per typical scanned page at 200 DPI and about 3.5 s per dense three-column page at 300 DPI. Text-layer pages take a few hundredths of a second. More memory does not make OCR faster (it runs one page at a time on one core), so 1 GB is the best value.

Can I get the whole document as one file? Yes. Each document's combined Markdown is in the run's key-value store under markdownFileKey. markdownFileUrl needs your API token unless you share the store.

Made by Brimfold Studio. Default samples: a US Federal Register issue (US government work, public domain, via Wikimedia Commons) and the Tesseract project's phototest.tif test image (Apache-2.0).