PDF to Text & OCR – Scanned PDF, Image & Screenshot to Text avatar

PDF to Text & OCR – Scanned PDF, Image & Screenshot to Text

Pricing

from $4.00 / 1,000 ocr pages

Go to Apify Store
PDF to Text & OCR – Scanned PDF, Image & Screenshot to Text

PDF to Text & OCR – Scanned PDF, Image & Screenshot to Text

PDF to text and image to text in one Actor. Reads a PDF's own text when it has one and runs OCR only on scanned pages, images and screenshots, so you pay OCR prices only where needed. Text per page plus one text file per document.

Pricing

from $4.00 / 1,000 ocr pages

Rating

0.0

(0)

Developer

Mohit Sawhney

Mohit Sawhney

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 hours ago

Last modified

Categories

Share

What it does

PDF & Image OCR gets the text out of PDFs, scanned documents and photos of text.

  • Digital PDFs (made by Word, Google Docs, invoices from software): the text is read directly from the file. Exact, fast and cheap.
  • Scanned PDFs and images (scans, phone photos, screenshots, faxes): the text is read with OCR.
  • Mixed PDFs: each page is handled the right way on its own, so you only pay OCR prices for pages that need it.

You get the text of every page, plus one text file with the whole document.

Common uses: making scanned archives searchable, feeding documents to an AI model or a RAG pipeline, pulling text from invoices, receipts, forms and letters, and indexing PDFs on a website.

How much it costs

You pay per page:

  • Text-layer page: a PDF page that already contains text.
  • OCR page: a scanned page or an image.

See the Pricing tab for current prices. Files that fail are not charged. Set "Most pages per file" to cap long documents.

Input

FieldWhat it means
File linksDirect links to PDFs or images (PNG, JPG, WebP, TIFF, BMP, GIF). Multi-page TIFFs work too.
When to use OCRAuto (recommended) uses the PDF's own text where it has one. Always runs OCR on every page.
Include line positionsAdds each OCR'd line with its confidence and bounding box, for layout or highlighting.
Most pages per fileSafety cap. Default 200.
Scan resolution for OCR2 suits most documents. Use 3 for very small print.

Example:

{
"fileUrls": ["https://example.com/scanned-contract.pdf"],
"ocrMode": "auto"
}

Output

One row per page:

{
"fileUrl": "https://example.com/scanned-contract.pdf",
"page": 2,
"method": "ocr",
"text": "This Agreement is made on ...",
"characters": 2381,
"confidence": 0.962,
"fileTextUrl": "https://api.apify.com/v2/key-value-stores/.../records/file-001.txt",
"error": null
}

method is text-layer or ocr. confidence is the average OCR confidence (0 to 1) and is empty for text-layer pages. fileTextUrl links to the whole document as one text file.

Use it as an API

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("mvisiondigital/pdf-image-ocr").call(run_input={
"fileUrls": ["https://example.com/scanned-contract.pdf"],
})
for page in client.dataset(run["defaultDatasetId"]).iterate_items():
print(page["page"], page["text"][:80])

Good to know

  • OCR works best on English and other Latin-script text, and on Chinese.
  • Handwriting is recognised poorly; printed text works best.
  • Password-protected PDFs are not supported.
  • Files up to 500 MB.