Document Ocr Scraper avatar

Document Ocr Scraper

Pricing

from $9.00 / 1,000 results

Go to Apify Store
Document Ocr Scraper

Document Ocr Scraper

OCR for PDFs and images that returns per-block confidence scores and coordinates, reads native PDF text layers instantly, and tells you which pages were doubtful instead of failing silently.

Pricing

from $9.00 / 1,000 results

Rating

0.0

(0)

Developer

Gorav Agarwal

Gorav Agarwal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

17 hours ago

Last modified

Categories

Share

OCR Document Text Extractor is an Apify Actor that reads text out of images and PDFs and returns it as structured JSON: the plain text of each page, plus every individual text block with a confidence score and pixel coordinates.

It is built for the job that starts where a web crawler stops. Website Content Crawler and similar Actors will happily download a PDF, a scanned invoice or a screenshot and hand you a file URL — but the text inside those files stays locked up. Point this Actor at those URLs and you get the contents.

Everything runs inside the Actor. The PP-OCR detection and recognition models ship in the Docker image and execute on ONNX Runtime on the CPU. There is no API key, no OpenAI or Google Vision account, no external OCR endpoint, and no rate limit that belongs to somebody else. Your documents are not sent anywhere.

Main features

  • Images and PDFs — PNG, JPEG, WebP, BMP, TIFF and PDF. Multi-page PDFs are split into pages automatically.
  • Per-block confidence and coordinates — every detected line comes back with a confidence from 0 to 1 and a bounding box in page pixels, so you can filter doubtful reads instead of trusting everything equally.
  • Native PDF text layers read directly — a PDF exported from Word or LaTeX already contains exact text. Those pages are read straight out of the file: no OCR, no transcription errors, and roughly 100× faster. Pages without a usable text layer fall through to OCR. Each result says which path it took.
  • 14 scripts — Latin, Simplified and Traditional Chinese, Japanese, Korean, Cyrillic, East Slavic, Greek, Arabic, Devanagari, Tamil, Telugu and Thai.
  • Two speed tiers — roughly 1 second or roughly 4 seconds per A4 page, on the same multilingual architecture.
  • Nothing fails silently — unreadable documents go to a separate errors dataset with an error code, a plain-English explanation and a suggested fix. Pages where no text was found carry an explicit warning field.
  • Deterministic — the same file produces the same output every time. There is no site to crawl, no JavaScript to render, no anti-bot to defeat and no CAPTCHA to fail.
  • No authentication, anywhere — the Actor accepts public URLs only, and there is nowhere to put a credential.

How does it work?

  1. Download. Each URL is fetched over plain HTTP. The file type is decided from its magic bytes, not from a Content-Type header that hosts frequently get wrong.
  2. Split into pages. An image is one page. A PDF is opened with PDFium, and each page is checked for a real text layer before anything is rasterised.
  3. Read. Pages with a text layer are read from the file. Everything else is rendered at your chosen DPI and passed through text detection, angle classification and text recognition.
  4. Shape. Blocks are sorted into reading order — top to bottom, then left to right within each visual line — and written to the dataset.

The input settings are grouped to match those stages.

Reading the document

The Script / language setting is worth one moment of thought. The automatic model covers Latin alphabets, Simplified Chinese and Japanese. It does not cover Cyrillic, Arabic, Devanagari, Greek, Thai, Korean or Traditional Chinese, and for those it returns empty text rather than a wrong guess. Pick the matching script and the Actor loads a model trained on it.

Image clean-up before OCR defaults to Deskew, and it earns its place. A page rotated by even 5–15° — as every phone photo and fed-through-a-scanner document is — wrecks recognition while the model stays falsely confident about the garbage it produces. Measured on a document rotated by a known angle, text similarity to the upright reading recovered from 0.37–0.66 up to 0.95–1.00 once deskewed; the reading order, which a tilt scrambles into interleaved labels and values, comes back correct too. It is a no-op on pages that are already straight, so it costs almost nothing to leave on, and the angle it applied is reported per page in skewCorrectionDeg. Deskew + enhance additionally runs local contrast (CLAHE) for faded or unevenly-lit scans. Choose None to feed the image through untouched.

Use the PDF text layer when there is one is on by default and is the single biggest thing separating a cheap run from an expensive one. PDF render DPI defaults to 200, which suits most scans; raise it to 300 for small print or poor faxes.

Output

Page mode gives one row per page with the full text and a nested blocks array — the right shape for feeding an LLM, a RAG pipeline or a vector database. Block mode flattens to one row per detected line, which is easier to sort by confidence or open in a spreadsheet.

Example

Running with an empty URL list OCRs the bundled sample document, so you can see the output shape before you commit anything. One page of that result:

{
"url": "https://example.com/delivery-note.png",
"fileName": "delivery-note.png",
"documentType": "image",
"pageNumber": 1,
"pageCount": 1,
"textSource": "ocr",
"text": "NORTHWIND SUPPLY CO.\nDelivery note DN-2026-10842\nIssued\n21 September 2026\n...",
"blockCount": 42,
"charCount": 552,
"wordCount": 87,
"meanConfidence": 0.9958,
"minConfidence": 0.9425,
"lowConfidenceBlockCount": 0,
"pageWidth": 900,
"pageHeight": 620,
"blocks": [
{
"index": 0,
"text": "NORTHWIND SUPPLY CO.",
"confidence": 0.9645,
"bbox": { "x": 37, "y": 35, "width": 434, "height": 33 }
}
],
"engine": "PP-OCR (RapidOCR / ONNX Runtime)",
"quality": "balanced",
"ocrLanguage": "auto",
"processingMs": 1391,
"extractedAt": "2026-09-21T01:20:14.521892Z"
}

meanConfidence is the field to watch. A clean printed page scores around 0.99. The 1776 Declaration of Independence, in period handwriting, scores 0.87 with 32 of its 103 blocks below 0.85 — the text is still largely readable, and the numbers tell you not to trust it unreviewed. That signal is the point.

Use it with other Actors

Run Website Content Crawler with saveContentTypes set to application/* or image/*, take the key-value-store URLs it produces, and feed them straight into Document URLs here. The crawler gets you to the documents; this Actor gets you into them.

The output is already in the shape that retrieval pipelines want: one row per page, plain text in text, and provenance (fileName, pageNumber, pageCount) to attach as metadata for citations.

How much does it cost?

The Actor is billed per result, so a page that fails costs nothing.

Beyond that you pay Apify platform usage. One compute unit is 1 GB of memory for 1 hour. On measured runs at the balanced tier, a full A4 page of dense print takes roughly 4–10 seconds of CPU, a small image around 1–3 seconds, and a PDF page read from its text layer is effectively free — well under 50 milliseconds. So the cheapest thing you can do is leave the text-layer option on, and the second cheapest is to use the fast tier when your documents are clean, large print.

Apify's free plan includes $5 of credit a month, which is plenty for testing and low-volume use.

Troubleshooting

  • If a page comes back with empty text and a warning, the page may genuinely be blank or a photograph. For PDFs, try raising PDF render DPI to 300. Otherwise lower Minimum confidence to 0.3 and inspect what comes back.
  • If the text is present but jumbled, or high-confidence yet wrong, the page is probably tilted. Leave Image clean-up on Deskew (the default); check skewCorrectionDeg in the result to see the angle it corrected. For a badly rotated phone photo, deskew handles up to about 20°.
  • If the text is garbled or empty for a non-Latin script, set Script / language explicitly. The automatic model returns nothing for Cyrillic, Arabic, Devanagari, Greek, Thai and Korean by design.
  • If coordinates do not line up with your own copy of the image, remember they are in the coordinate space of the page as the Actor saw it: for PDFs that is the rendered bitmap at your chosen DPI, reported in pageWidth/pageHeight. Turn on Save rendered page images to get the exact image back and check against it.
  • If a document is rejected with HTTP_STATUS_403, the host is probably blocking datacenter IPs. Enable Apify Proxy in the input.
  • If quality is disappointing on a phone photo, OCR accuracy depends mostly on resolution and focus. Text smaller than about 20 pixels tall rarely reads well at any setting.
  • Every failure is recorded in the errors dataset with a code, an explanation and advice — check there first.

What this Actor does not do

It returns text, coordinates and confidence. It does not parse invoices into fields, extract named entities, classify documents, or fill a schema — you get faithful text and geometry, and the structuring is yours to do. It also does not handle handwriting well; the models are trained on printed text.

It is a general document and image text-extraction tool. It is not intended for, and should not be used to build, identity-document scanning pipelines.

Yes, for documents you are entitled to read. This Actor only fetches public URLs you supply and never accepts credentials, so it cannot reach anything behind a login. You are responsible for having the right to process the documents you submit, and for whatever personal data those documents happen to contain.

Licensing

The Actor is MIT-licensed. It uses RapidOCR (Apache-2.0), the PaddleOCR PP-OCR models (Apache-2.0), ONNX Runtime (MIT) and PDFium via pypdfium2 (BSD-3-Clause) — all of which permit commercial use and redistribution inside a container image.