Image and PDF OCR to Text
Pricing
from $3.00 / 1,000 results
Image and PDF OCR to Text
Reads the text in images and PDF pages from public URLs with OCR. Returns the text, a confidence score and every line with its position. Pay per image or PDF page read. Failed files are listed, not charged.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Derek Derringer
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share
What it does
This Actor reads the text in images and PDF pages with OCR (optical character recognition). Give it the web address of one file or a list of them. For each image, and for each page of each PDF, you get the text, one line per line, plus a confidence score from 0 to 1 and every line with its own score and its position on the page.
It reads PNG, JPEG, GIF, BMP, TIFF and WebP images, and PDFs, including scanned PDFs with no text layer. The file type is read from the file itself, not from its name.
It reads each site's robots.txt before anything else and obeys it. It never logs in, never sends a cookie and never tries to get past a CAPTCHA.
How to use it
- Open the Actor in Apify Console.
- Put one web address per line in Image or PDF URLs. Files you upload in Console work too.
- Set Maximum pages per PDF if your PDFs are long.
- Click Start.
- When the run ends, open the Output tab. The Text view shows the text and confidence for each image or page. Export as CSV, JSON or Excel.
Input
| Field | What it does | Default | Limits |
|---|---|---|---|
Image or PDF URLs (fileUrls) | The files to read, one address per line. | None. Prefilled with one public sample image | http and https only. Duplicates are removed |
Maximum files (maxFiles) | The most files this run reads. | 50 | 1 to 1,000 |
Maximum pages per PDF (maxPdfPages) | The most pages read from each PDF, from page 1. | 10 | 1 to 200 |
Maximum file size (maxFileSizeMb) | Larger files are not downloaded. | 20 MB | 1 to 50 MB |
Download timeout (requestTimeoutSecs) | How long a server may take to start answering. The whole download may take up to four times this. | 30 seconds | 5 to 120 seconds |
Output
One dataset item per image, and one per PDF page read:
| Field | What it holds |
|---|---|
sourceUrl, finalUrl | The address you gave, and where the file came from after any redirects |
fileType | application/pdf, image/png, image/jpeg, image/gif, image/bmp, image/tiff or image/webp |
pageNumber, pageCount | The PDF page from 1, and the pages in the PDF. For an image, empty and 1 |
text | All the text read, one line per line, top to bottom |
confidence | 0 to 1: the average line score, weighted by line length. Empty when no text was found |
textFound, lineCount, characterCount | Whether any text was found, and how much |
lines | Every line: its text, its confidence, and its box as four [x, y] corners in pixels |
imageWidth, imageHeight | The size of the image that was read |
ocrMs, processedAt | How long the OCR took, and when |
note | Set when only the first frame of an animated or multi-page image was read |
Example row from a local test run, a two-line PNG:
{"fileType": "image/png", "pageNumber": null, "pageCount": 1, "text": "Invoice 2026 for Daddy D Prints\nTotal due: 42.50 USD", "confidence": 0.9998, "textFound": true, "lineCount": 2}
An image or page with no readable text still gives a row, with textFound false and an empty text.
How the text is read
The OCR engine is RapidOCR on ONNX Runtime, with the PP-OCRv6 small models that ship inside the package. Nothing is downloaded while the Actor runs, and your files are not sent anywhere else. PDF pages are drawn at up to 144 dpi and then read like images. Text is found on the image scaled to at most 1,280 pixels on its longest side, which keeps a run inside 512 MB; ordinary 10 to 11 point document text on a full page reads correctly at that size. The models are trained mainly on Chinese and English printed text. Handwriting and very small print read less reliably, and the confidence score shows it.
Pricing
This Actor is priced per event, with two charges:
- Actor start: Apify's automatic start event, $0.0001 per start (one event per GB of run memory, minimum one).
- Page read: one charge for each image or PDF page written to the dataset.
Price per image or PDF page: $3.00 per 1,000, which is $0.003 each.
These are never charged: files that could not be downloaded (robots.txt blocks, timeouts, errors, 401, 403, 429, login and CAPTCHA pages), files that are not an image or a PDF, damaged files, files over the size limit, PDF pages past Maximum pages per PDF, and the REPORT and SKIPPED records.
If you set a maximum cost for the run and it is reached, the Actor reads no more pages, lists the rest in SKIPPED as spending_limit_reached, and ends the run without an error.
Records
| Record | What it holds |
|---|---|
| REPORT | Why the run stopped, the settings used, files and pages read, file types, average confidence, pages with no text, skipped by reason, robots.txt results and requests per site |
| SKIPPED | Every file or PDF page that was not read, with the reason |
Rules it follows
- robots.txt is read first on every site, including every site a redirect leads to, and obeyed.
- One request at a time to any one site, with the site's Crawl-delay. A Crawl-delay over 30 seconds skips the site.
- On Apify, private and local network addresses are refused.
- There is no cookie, header, login, proxy or user agent input. The user agent starts with
image-pdf-ocr-text/0.1.
Your responsibility
You are responsible for having the right to read the files you give this Actor and for following each website's terms of use. The text read from a file is yours to handle; the Actor keeps it only in your run's storage.
Limits
| Limit | Value |
|---|---|
| Files per run | 1 to 1,000 |
| Pages per PDF | 1 to 200 |
| File size | 1 to 50 MB |
| Image size | Up to 100 million pixels; larger images are scaled down to 4,000 pixels on the longest side before reading |
| Password-protected or damaged PDFs | Skipped, listed in SKIPPED |
| Memory | 512 MB by default |