PDF to Text & OCR Extractor
Pricing
from $4.00 / 1,000 processed pdfs
PDF to Text & OCR Extractor
Extract text from PDF files and scanned PDFs. Reads the text layer when present and uses OCR for image-only pages. Output per page or per document as JSON, CSV or Excel.
Pricing
from $4.00 / 1,000 processed pdfs
Rating
0.0
(0)
Developer
PB
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Convert PDF to text from public URLs or uploaded files. Extract text from PDF pages with an embedded text layer, and use OCR for a scanned PDF. Choose automatic OCR, text only, or OCR for every page.
Input
Paste public PDF URLs, upload PDFs, or use both. The example URL is filled in for a first run.
{"pdfUrls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],"ocrMode": "auto","ocrLanguages": ["eng"],"maxPagesPerPdf": 20,"outputFormat": "page"}
uploadedFiles is an optional list of file uploads or public URLs. OCR languages are eng, deu, fra, spa, por, and tha. Auto runs OCR only when a page has no extracted text. It does not detect a poor or incomplete text layer. Use force for those pages. off returns the embedded text only.
Output
Each dataset item contains a source, page number, text, method, character count, and error. A failed PDF gets an error item and the Actor continues to the next PDF.
{"source":"https://example.com/file.pdf","pageNumber":1,"text":"Hello PDF","method":"text-layer","characterCount":9,"error":null}
Choose document to combine page texts in one item. Its pageNumber is null and its pages array retains page numbers and methods. Its method can be mixed.
Pricing
| Event | Price |
|---|---|
| PDF processed without OCR | $0.004 per PDF |
| OCR page | $0.010 per page |
| Start fee | $0 |
A PDF that uses OCR is charged only for OCR pages. Set a maximum total charge for a run in Apify. The Actor stops when it cannot charge the next event.
API
Replace OWNER and use an API token from your own account. Send the input as JSON:
curl 'https://api.apify.com/v2/acts/OWNER~pdf-to-text-ocr/runs?token=YOUR_TOKEN' \-H 'Content-Type: application/json' \-d '{"pdfUrls":["https://example.com/file.pdf"],"ocrMode":"auto"}'
Use the returned defaultDatasetId to fetch the results with the dataset items API.
MCP
After publication, connect to the Apify MCP server. Find the Actor with search-actors, then call call-actor with its Actor ID and the input above. Set maxTotalChargeUsd in callOptions. Read the returned dataset with get-dataset-items. Availability depends on the Actor being published with limited permissions.
Limits and FAQ
- Only public HTTP and HTTPS URLs are allowed. Private and loopback addresses are blocked, including redirects.
- Each PDF is limited to 50 MB and at most 100 pages. The default is 20 pages. Pages beyond the limit are not processed.
- Downloads time out after 60 seconds. OCR times out after 60 seconds per page. Very large pages are rejected for OCR.
- Password-protected, invalid, inaccessible, or unsupported PDFs produce an error item.
- OCR quality depends on the scan, language, and page. Text may need review.
- Can I use several languages? Yes. Select multiple OCR languages.
- Why is a page empty? It may contain no text, or OCR may not recognize it. Try
forceand check the selected languages. - Can I process private URLs? No. Upload a file through Apify or supply a public URL. The upload's returned URL must be accessible to the Actor.