PDF to Text & OCR – PDF & Image Text Extraction (Erdnal) avatar

PDF to Text & OCR – PDF & Image Text Extraction (Erdnal)

Pricing

from $0.40 / 1,000 page credits

Go to Apify Store
PDF to Text & OCR – PDF & Image Text Extraction (Erdnal)

PDF to Text & OCR – PDF & Image Text Extraction (Erdnal)

PDF to text and OCR: extract text from PDFs, scanned PDFs and JPEG/PNG images (image to text) by URL, page by page, as JSON, text or Markdown. Optional invoice to JSON. EU-hosted, documents not kept. Pay per page.

Pricing

from $0.40 / 1,000 page credits

Rating

0.0

(0)

Developer

Erdnal

Erdnal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

PDF to Text & OCR – PDF & Image Text Extraction (Erdnal Documents)

Extract the text of PDF files and JPEG/PNG images from their URLs. Text-based PDFs are read directly from their text layer (fast and exact); scanned pages and images go through OCR (Tesseract). You get the full text and the text of each page, with an OCR confidence score. You pay only for documents that were extracted successfully.

What it does

  • Input: public URLs of PDF, JPEG or PNG files, up to 500 per run (for example links collected by a scraper, or an export of invoices, reports or forms).
  • Smart mode: in auto mode, each PDF page is read from its text layer when it has one, and only pages without usable text (scans) are sent to OCR. That is cheaper and more accurate than OCR on every page.
  • OCR languages: English, French, German, Spanish, Italian, Portuguese, Dutch (up to 3 per run).
  • Output: one dataset row per document with the full text, the number of pages, how many needed OCR, the lowest OCR confidence and, optionally, the text of each page.
  • Privacy: documents are processed by the Erdnal Documents API, hosted in the European Union, only to produce the result. Erdnal does not keep the documents or the extracted text after the response.
  • Safe input handling: the real file type is checked, each document is processed in an isolated, resource-limited process, and password-protected PDFs are refused.

Example: the sample invoice (2 pages: one with a text layer, one scanned) gives the invoice lines from page 1 without OCR, and the payment terms from page 2 by OCR.

Invoice & Receipt to JSON

Set What to extract (extract) to Invoice data to turn invoices and receipts (PDF, scan or photo) into accounting data instead of text. Each dataset row then has an invoice object:

{
"document_type": "invoice",
"invoice_number": "INV-2026-0042",
"invoice_date": "2026-11-01",
"supplier_name": "Demo Supplier Ltd",
"customer_name": "Fictitious Customer",
"currency": "EUR",
"total": 324.0,
"tax_lines": [],
"line_items": [{"description": "Web hosting, 12 months", "quantity": 1, "unit_price": null, "amount": 180.0}]
}

All fields: document type, number, invoice and due dates, supplier name, VAT number and address, customer name and VAT number, currency, subtotal, tax total, tax lines, total and line items. Missing fields are null. The text is read from the PDF text layer or by OCR, then structured by an AI model (Anthropic): in this mode only, the extracted text is sent to Anthropic; nothing is stored. Cost: the text extraction plus 5 credits per page (first 5 pages by default).

Use cases

  • Document pipelines: turn PDF reports, invoices or forms into text for search, indexing or an LLM.
  • Scanned archives: OCR scanned PDFs and photos of documents to make them searchable.
  • Scraping workflows: chain it after a scraper that collects PDF links.
  • RAG and AI agents: get clean page-by-page text before chunking and embedding.

How to use

  1. Paste the document URLs into Document URLs (one per line).
  2. Keep Extraction mode on auto, and choose the OCR languages of your documents.
  3. Click Start. When the run ends, open the Output tab.

Input example:

{
"documentUrls": ["https://api.erdnal.com/v1/documents/samples/demo-invoice.pdf"],
"mode": "auto",
"languages": ["eng"],
"pages": "1-5"
}
FieldDescriptionDefault
documentUrlsPublic https:// URLs of PDF, JPEG or PNG files (1 to 500)—
modeauto (text layer, OCR for scanned pages), text (never OCR), ocr (OCR every page)auto
languages1 to 3 of eng, fra, deu, spa, ita, por, nldeng, fra
pagesPages to extract, e.g. 1-3,7all pages
includePagesAdd the text and details of each pageon

Output example

{
"index": 0,
"documentUrl": "https://api.erdnal.com/v1/documents/samples/demo-invoice.pdf",
"ok": true,
"inputType": "pdf",
"pagesTotal": 2,
"pagesProcessed": 2,
"ocrPages": 1,
"text": "INVOICE INV-2026-0042 (SAMPLE)\nDemo Supplier Ltd, ...\n\nPAYMENT TERMS (scanned page)\n...",
"chars": 496,
"minConfidence": 0.962,
"pages": [
{"page": 1, "method": "text", "text": "INVOICE INV-2026-0042 (SAMPLE) ...", "chars": 305, "confidence": null},
{"page": 2, "method": "ocr", "text": "PAYMENT TERMS (scanned page) ...", "chars": 191, "confidence": 0.962}
],
"creditsCharged": 5,
"errorCode": null
}

A failed document has ok: false, creditsCharged: 0 and an errorCode, and the run goes on with the next one.

Pricing

Pay per event: $0.0005 per credit. Apify Store discounts apply to paid Apify plans: 10 % off on Bronze, 15 % on Silver, 20 % on Gold and above.

PageCreditsPrice
Page read from the PDF text layer1$0.0005
Page read by OCR (scanned PDF page, image)4$0.002
Invoice data (extract: invoice), per page, on top of the text+5+$0.0025

A tiny start fee ($0.00005) is charged per run. Failed documents are free (unreachable URL, unsupported or password-protected file, too many pages). The Actor respects your maximum cost per run: each document is refused before OCR if it would cost more than your remaining budget.

Limits

  • 20 MB per file, 200 pages per document (use pages for longer documents);
  • 5 OCR pages per document: for a longer scanned PDF, split it with pages (1-5, 6-10, …) in several URLs or runs;
  • OCR takes about 3 to 4 seconds per page.

FAQ

Is this OCR good enough for my documents? It works well on text PDFs, clean scans (also small fonts, two columns, slightly skewed pages) and gridded tables. It is weaker on photos of documents taken with a phone (perspective, shadows) and does not read handwriting. Check minConfidence: below about 0.8, review the text.

Does it extract invoice fields? Yes: set extract to invoice (see above). A one-page invoice costs about $0.003 to $0.0045 (text or OCR plus the invoice data). Generic tables are returned as text in reading order.

Why did a document fail? Each failed document has an errorCode:

  • document_url_unreachable / document_url_timeout: the host could not be reached or returned an error;
  • document_url_forbidden: only public https:// URLs on port 443 are accepted;
  • document_url_redirect: more than 3 redirects;
  • unsupported_format: not a PDF, JPEG or PNG file;
  • pdf_encrypted: password-protected PDF;
  • too_many_pages / too_many_ocr_pages: use pages to extract a smaller range;
  • max_credits_exceeded: the document costs more than your remaining budget for this run;
  • file_too_large / image_too_large: 20 MB per file, 25 megapixels per image.

Use it from AI agents (MCP)

AI agents can run this Actor through the Apify MCP server (Claude, Cursor, VS Code, GitHub Copilot, Codex). Add this server URL to your MCP client and sign in with your Apify account when asked:

https://mcp.apify.com?tools=erdnal_api/erdnal-documents-text-extraction

The agent sees the input and output schemas, runs the Actor and reads the results; runs are billed per event, like a normal run.

Integrations

  • API: start runs and read results with the Apify API or the Apify clients for JavaScript and Python.
  • Make, Zapier, n8n: run the Actor from these tools and send the text to a database, a spreadsheet or an AI step.
  • Webhooks: call your own endpoint when a run finishes.

More from Erdnal

Support

support@erdnal.com — include the requestId of the document concerned.