PDF & Image OCR: scanned documents to text, Markdown and tables avatar

PDF & Image OCR: scanned documents to text, Markdown and tables

Pricing

from $4.00 / 1,000 scanned page ocrs

Go to Apify Store
PDF & Image OCR: scanned documents to text, Markdown and tables

PDF & Image OCR: scanned documents to text, Markdown and tables

Pricing

from $4.00 / 1,000 scanned page ocrs

Rating

0.0

(0)

Developer

Faiz Agasa

Faiz Agasa

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Features

Limited permissions

Share

Turn scanned PDFs, phone photos and screenshots into clean text and Markdown, with simple tables detected. Paste file URLs; the Actor uses a PDF's own text layer where it exists (exact and cheap) and runs OCR only on pages that have none. English and Indonesian work out of the box, plus the other Latin-script languages. No API key, no browser, no login.

What you get

One dataset row per file you submit, always, including when something went wrong (status tells you what happened):

FieldMeaning
url, fileType, sizeBytesthe file as submitted; pdf or image (detected from the file contents)
statusok, partial, no_text_found, error, skipped
pageCount, pagesProcessedpages in the file / pages actually read
pagesOcred, pagesWithTextLayerhow each page was read
text, markdownall processed pages; pages are separated by <!-- page N --> in Markdown
tables[{page, rows: [[cell, ...], ...]}] for tables found in the page layout
pagesper page: source, chars, confidence, charged; with perPage also its text/Markdown
confidencemean OCR confidence 0-1 over OCR'd pages (null if no page needed OCR)
errorCode, errormachine code and plain explanation when status is not ok

errorCode values: not_found, access_denied (login or bot block), unreachable, timeout, too_large, too_many_redirects, blocked_address, invalid_url, http_error, unsupported_content (e.g. an HTML page), password_protected, corrupt_file, page_errors, no_text_found, max_pages, spending_limit, free_plan_limit, internal_error.

Use cases

  • Document and RAG pipelines: turn scanned contracts, reports and invoices into Markdown chunks (perPage: true) for search or LLM input.
  • Back-office automation: pull amounts and line items out of scanned invoices and statements via tables.
  • Archives and digitisation: make old scans searchable; Indonesian and other Latin-script documents are supported.
  • AI agents and MCP: one call returns text or Markdown for any PDF or image URL, with explicit status and error codes an agent can act on.

Input

{
"urls": [
"https://example.com/scanned-invoice.pdf",
"https://example.com/receipt-photo.jpg"
],
"languages": ["en", "id"],
"outputFormat": "both",
"ocrMode": "auto",
"quality": "accurate",
"maxPages": 50,
"perPage": false
}
  • urls (required): direct http(s) links to PDF, PNG, JPEG, WebP or TIFF files. The type is detected from the file's bytes, not the URL or Content-Type. Max 50 MB per file.
  • languages (default ["en"]): en, id (Indonesian), ms, es, fr, de, pt, it, nl, tr, vi, pl, ro, sv, da, fi, no, cs, hu, sk, sl, hr, tl, sw, ch (Chinese), japan. One multilingual model reads all of them at once, so this field is validated and logged rather than switching models. Unknown codes are ignored with a warning.
  • outputFormat (default both): text, markdown or both.
  • ocrMode (default auto): auto = text layer where a page has one, OCR otherwise; always = OCR every page (for PDFs with a broken or hidden text layer).
  • quality (default accurate): accurate = larger model, about 4-7 s per page; fast = small model, noticeably quicker, with more merged words and misreads on hard scans. Same price.
  • maxPages (default 50): first N pages of each PDF (or frames of a multi-page TIFF). A longer file comes back as partial with errorCode: "max_pages".
  • perPage (default false): add each page's text/Markdown to pages.

Output example

{
"url": "https://example.com/mixed.pdf",
"status": "ok",
"fileType": "pdf",
"sizeBytes": 1245693,
"pageCount": 3,
"pagesProcessed": 3,
"pagesOcred": 2,
"pagesWithTextLayer": 1,
"text": "Quarterly Maintenance Report\n\nThis report summarizes ...",
"markdown": "<!-- page 1 -->\n\n# Quarterly Maintenance Report\n\nThis report summarizes ...\n\n<!-- page 2 -->\n\n## Cost Summary\n\n| Item | Qty | Unit price | Total |\n|---|---|---|---|\n| Air filter | 12 | 15.50 | 186.00 |\n...",
"tables": [{"page": 2, "rows": [["Item", "Qty", "Unit price", "Total"], ["Air filter", "12", "15.50", "186.00"]]}],
"pages": [
{"page": 1, "source": "text-layer", "chars": 444, "confidence": null, "charged": "page-text-layer"},
{"page": 2, "source": "ocr", "chars": 247, "confidence": 0.997, "charged": "page-ocr"}
],
"confidence": 0.9961,
"errorCode": null,
"error": null,
"processedAt": "2026-11-14T08:41:07Z"
}

Pricing

Pay per page, for pages that contain text:

EventPriceWhat it is
page-text-layer$0.002a PDF page whose embedded text was extracted (no OCR)
page-ocr$0.004a scanned PDF page or an image read with OCR

Pages where no text is found are not charged, and neither are files that fail to download or open. Set the run's maximum cost to cap spend: the Actor stops cleanly at the limit, marks the file partial (or later files skipped) and keeps everything read so far.

Free Apify plan: runs are limited to the first 5 pages in total (later files come back skipped, the cut file partial with free_plan_limit). Paid plans have no page cap other than maxPages.

Speed

Measured on one CPU thread (the share a default 4 GB Apify run gets), clean self-rendered A4 pages at 200 dpi: about 1 s per page with fast and 4-7 s per page with accurate (the range is the same machine quiet and busy). PDF pages that have a text layer take milliseconds. Memory: about 0.8 GB (fast) to 1.6 GB (accurate) peak; the Actor defaults to 4 GB.

Limits and notes

  • Not guaranteed: handwriting, heavy stamps and stains, very low-resolution or blurry photos. The Actor returns what the OCR model reads together with a confidence; check confidence (below roughly 0.85, look at the text).
  • Layout is simple. Headings (by relative text size), paragraphs, bullet lists and tables whose columns line up are detected. Merged cells, tables without clear column gaps and multi-line cells are not. Multi-column pages and forms (newspapers, tax forms) are read row by row across the columns, so the text of neighbouring columns can interleave; they are not reordered into reading flow. Two prose columns are not mistaken for a table.
  • Rotated pages (90 or 270 degrees) are not auto-rotated; upright text and small skew are handled. Photos are rotated by their EXIF orientation.
  • Only public files reachable with a plain GET. Links that need a login, cookies or a captcha come back as access_denied or unsupported_content (HTML page). No crawling: each URL is fetched once, with up to 5 redirects, a 90 s limit and a 50 MB size limit. URLs pointing at private or internal network addresses are refused.
  • PDFs with a password come back as password_protected. Files that are not PDF/PNG/JPEG/WebP/TIFF (including GIF and HTML) come back as unsupported_content.
  • A PDF page counts as having a text layer when it has at least 20 characters of embedded text, or any text at all and no image on the page. A scanned PDF that already carries an OCR text layer is therefore read from that layer (use ocrMode: "always" to OCR it fresh).
  • Tiny runs cost the same per page, but each run has fixed platform overhead; batching many files in one run is cheaper for you and for us.

Is this allowed?

The Actor downloads only the file URLs you provide, one plain GET each, and does not crawl, log in or bypass access controls. You are responsible for having the right to process the documents you submit. Files are processed in memory during the run and are not stored by the Actor beyond the run's dataset.