PDF to Text & OCR – PDF & Image Text Extraction (Erdnal)
Pricing
from $0.40 / 1,000 page credits
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
5.0
(2)
Developer
Erdnal
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Features
Share
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
automode, 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 and a Markdown version (one
## Page Nsection per page, ready for an LLM or RAG chunking). - 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
- Paste the document URLs into Document URLs (one per line).
- Keep Extraction mode on
auto, and choose the OCR languages of your documents. - 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"}
| Field | Description | Default |
|---|---|---|
documentUrls | Public https:// URLs of PDF, JPEG or PNG files (1 to 500) | — |
mode | auto (text layer, OCR for scanned pages), text (never OCR), ocr (OCR every page) | auto |
languages | 1 to 3 of eng, fra, deu, spa, ita, por, nld | eng, fra |
pages | Pages to extract, e.g. 1-3,7 | all pages |
includePages | Add the text and details of each page | on |
includeMarkdown | Add a markdown field, one ## Page N section per page (same price) | off |
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.
| Page | Credits | Price |
|---|---|---|
| Page read from the PDF text layer | 1 | $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 |
Cost per 1,000 pages: $0.50 for text-layer pages, $2 for OCR pages, +$2.50 for invoice data. In auto
mode a typical digital PDF costs only the text-layer price; you pay OCR only for scanned pages.
A tiny start fee ($0.00005) is charged per run. The Actor respects your maximum cost per run: each document is refused before OCR if it would cost more than your remaining budget.
What is not charged:
- failed documents (unreachable URL, unsupported or password-protected file, too many pages);
- pages outside the range you set with
pages; - the page details and the Markdown output: same price as the plain text;
- no subscription and no monthly fee: you pay only for the pages extracted.
Who this is for
- For: developers and automation builders who need the text of PDFs, scans or document images by URL, in batches, with a predictable price per page; AI and RAG pipelines that need page-by-page text or Markdown.
- Not for: handwriting, photos of documents with strong perspective or shadows, complex table layout reconstruction (tables come back as text in reading order), or files that are not reachable by a public URL.
Limits
- 20 MB per file, 200 pages per document (use
pagesfor 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 publichttps://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: usepagesto 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.
Server mode: one HTTP request per document
No run to start and no dataset to read: send one request to the server URL shown in the Actor's Server tab, with your Apify token, and get the extracted text in the response.
curl -X POST "$SERVER_URL/extract" \-H "Authorization: Bearer $APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"documentUrl": "https://example.com/invoice.pdf", "includeMarkdown": true}'
GET /extract?documentUrl=... works too. Parameters: documentUrl (required), extract (text or invoice), mode, languages (e.g. eng,fra), pages, includePages, includeMarkdown, and maxCredits to refuse a document that would cost more. The response has the same fields as a dataset item. Same price per page as a run; you pay only for successful documents.
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
- Image Compression & WebP AVIF Converter: compress images and convert JPG/PNG to WebP or AVIF in bulk, with resizing and metadata removal.
- Ready-made tasks of this Actor: Invoice & Receipt to JSON, Scanned PDF to Text (OCR), Image to Text OCR, PDF to Markdown for LLM & RAG.
Support
support@erdnal.com — include the requestId of the document concerned.
If this Actor saved you time, an honest review on Apify helps other users find it. If something did not work, please write to us first: we read every message.