{"name":"pdf-ocr-markdown","id":"sfoln/pdf-ocr-markdown","title":"PDF OCR to Markdown Converter","description":"Convert PDFs, scans and images to Markdown with Mistral OCR, tables and layout preserved. Born-digital PDF pages are read from their text layer for $1 per 1,000 pages; only scanned pages are OCR'd ($7 per 1,000). Per-page output.","version":"0.1","status":"ready","family":{"id":"documents-media-ai","name":"Documents & media","description":"PDF and office documents to Markdown or JSON, OCR, audio and podcast transcription, YouTube transcripts, summaries and video metadata.","actors":8},"categories":["AI","DEVELOPER_TOOLS","AUTOMATION"],"availability":"on_request","seoTitle":"PDF OCR to Markdown API – Scans, Images & Tables","seoDescription":"OCR scanned PDFs and images to Markdown with Mistral OCR, tables and layout kept. Text-layer pages $1 per 1,000, OCR pages $7 per 1,000.","summary":"Turn PDFs, scanned documents, slides and images into clean, structured Markdown, headings, lists, tables and reading order preserved, ready for RAG pipelines, LLM prompts, search indexing or data extraction. Paste document URLs, get one record per document with the full Markdown plus per-page text, character counts and (optionally) the embedded images. Scans and images are read by Mistral OCR, a document-understanding model that handles multi-column layouts, tables, handwriting and 40+ languages; PDF pages that already contain text are read straight from the PDF's text layer, at a seventh of the price.","pricing":{"model":"pay-per-event","currency":"USD","billedBy":"Apify","freePlanMaxItemsPerRun":5,"events":[{"name":"ocr-page","title":"OCR page","description":"Charged once per page processed by Mistral OCR: scanned PDF pages, images, DOCX/PPTX pages, or every page with forceOcr.","priceUsd":0.007},{"name":"pdf-text-page","title":"Text-layer page","description":"Charged once per PDF page read from the PDF's own text layer (born-digital or blank pages, hybrid mode): no OCR needed.","priceUsd":0.001}]},"input":{"description":"List publicly reachable document or image URLs. Each document produces one dataset record with its Markdown and per-page details.","required":["documentUrls"],"fields":[{"name":"documentUrls","title":"Document URLs","type":"array","required":true,"description":"Public URLs of PDFs, images (PNG, JPG, WEBP, TIFF, …) or office documents (DOCX, PPTX), one per line, max 50 MB each. PDF pages that have a text layer are read directly ($0.001 per page); scanned pages, images and office files are OCR'd ($0.007 per page). Apify key-value store record URLs work if the store is publicly readable. Accounts on the Apify free plan can process up to 5 documents per run, with at most 5 pages per document.","prefill":["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],"editor":"stringList"},{"name":"maxPagesPerDocument","title":"Max pages per document","type":"integer","required":false,"description":"Only the first N pages of each document are processed (and charged).","default":50,"prefill":5,"minimum":1,"maximum":1000},{"name":"includeImages","title":"Extract embedded images","type":"boolean","required":false,"description":"Save images detected on the pages (figures, photos, logos) to the run's key-value store and return their URLs per page. Images come from OCR, so every page is OCR'd when this is on.","default":false},{"name":"forceOcr","title":"OCR every page","type":"boolean","required":false,"description":"Send every PDF page to Mistral OCR, also pages that have a text layer (charged as ocr-page). Use it when you need OCR's layout and table reconstruction on born-digital pages too; images always need it.","default":false},{"name":"maxDocuments","title":"Max documents","type":"integer","required":false,"description":"Safety cap on the number of documents processed in this run.","default":100,"minimum":1,"maximum":10000},{"name":"concurrency","title":"Concurrency","type":"integer","required":false,"description":"Documents processed in parallel.","default":2,"minimum":1,"maximum":5},{"name":"includeRaw","title":"Include raw upstream response","type":"boolean","required":false,"description":"Attach the unmodified OCR response (without image data) to each record.","default":false}]},"exampleInput":{"documentUrls":["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],"maxPagesPerDocument":5},"outputFields":[{"name":"input","type":"string","title":"Input","description":"URL as submitted."},{"name":"url","type":"string","title":"URL","description":"Normalized document URL."},{"name":"documentType","type":"string","title":"Document type","description":"document (PDF, DOCX, PPTX, …) or image."},{"name":"mode","type":"string | null","title":"Mode","description":"hybrid: PDF pages with a text layer read directly, only scanned pages OCR'd; ocr: every page OCR'd (images, office files, forceOcr, includeImages, or a PDF whose text layer could not be read)."},{"name":"pageCount","type":"integer","title":"Pages returned","description":"Pages returned."},{"name":"totalPages","type":"integer | null","title":"Pages in the PDF","description":"Hybrid mode: the PDF's page count."},{"name":"pagesProcessed","type":"integer","title":"Pages processed","description":"Pages processed: OCR'd by Mistral, or read from the text layer (hybrid)."},{"name":"pagesCharged","type":"integer","title":"Pages charged","description":"Pages charged (ocr-page and pdf-text-page); exactly these pages are returned."},{"name":"ocrPagesCharged","type":"integer | null","title":"OCR pages charged","description":"ocr-page events for this document."},{"name":"textPagesCharged","type":"integer | null","title":"Text-layer pages charged","description":"pdf-text-page events for this document."},{"name":"textLayerPages","type":"array | null","title":"Text-layer pages","description":"Hybrid mode: page numbers read from the PDF's text layer."},{"name":"ocrPages","type":"array | null","title":"OCR pages","description":"Hybrid mode: page numbers sent to OCR."},{"name":"pageLimit","type":"integer","title":"Page limit applied"},{"name":"possiblyTruncated","type":"boolean","title":"Possibly truncated","description":"The page limit was reached; the document may have more pages."},{"name":"markdown","type":"string","title":"Markdown","description":"All pages joined, separated by <!-- page N --> comments."},{"name":"markdownUrl","type":"string | null","title":"Full Markdown URL","description":"Set only when the record would exceed ~6 MB: the full Markdown is in the key-value store, `markdown` keeps the first 1 MB."},{"name":"pages","type":"array","title":"Pages","description":"[{ index, pageNumber, markdown, charCount, imageCount, tableCount, source: text-layer | ocr | ocr-missing, images? }]"},{"name":"charsExtracted","type":"integer","title":"Characters extracted"},{"name":"imageCount","type":"integer","title":"Images detected"},{"name":"docSizeBytes","type":"integer | null","title":"Document size (bytes)"},{"name":"model","type":"string | null","title":"OCR model","description":"Mistral OCR model; null when no page needed OCR."},{"name":"warnings","type":"array","title":"Warnings"},{"name":"status","type":"string","title":"Status","description":"ok | not_found | error | skipped_invalid | skipped_budget | skipped_free_plan","example":"ok"},{"name":"charged","type":"boolean","title":"Charged"},{"name":"source","type":"string","title":"Source"},{"name":"fetchedAt","type":"string","title":"Fetched at"},{"name":"error","type":"object | null","title":"Error","description":"{ code, message, provider?, status? } when status is not ok."},{"name":"chargedEvent","type":"string | null","title":"Charged event","description":"Event charged by the runner for the record's last page (ocr-page or pdf-text-page)."}],"outputExample":{"input":"https://example.com/invoice-pack.pdf","url":"https://example.com/invoice-pack.pdf","documentType":"document","mode":"hybrid","pageCount":3,"totalPages":3,"pagesProcessed":3,"pagesCharged":3,"ocrPagesCharged":1,"textPagesCharged":2,"textLayerPages":[1,3],"ocrPages":[2],"pageLimit":3,"possiblyTruncated":false,"markdown":"## Invoice cover letter\n\nPlease find the scanned invoice on the next page.\n\n<!-- page 2 -->\n\n# INVOICE 2026-042\n\n| Item | Amount |\n| --- | --- |\n| Widgets | 1,190.00 EUR |\n\n<!-- page 3 -->\n\n## Terms and conditions\n...","markdownUrl":null,"pages":[{"index":0,"pageNumber":1,"markdown":"## Invoice cover letter\n...","charCount":160,"imageCount":0,"tableCount":0,"source":"text-layer"},{"index":1,"pageNumber":2,"markdown":"# INVOICE 2026-042\n...","charCount":412,"imageCount":1,"tableCount":1,"source":"ocr"},{"index":2,"pageNumber":3,"markdown":"## Terms and conditions\n...","charCount":140,"imageCount":0,"tableCount":0,"source":"text-layer"}],"charsExtracted":712,"imageCount":1,"docSizeBytes":25513,"model":"mistral-ocr-2512","status":"ok","charged":true,"chargedEvent":"ocr-page","source":"mistral-ocr","fetchedAt":"2026-10-14T10:00:00.000Z"},"faq":[{"question":"Why are some pages cheaper than others?","answer":"PDF pages that already contain text (exported from Word, LaTeX or a browser) are read straight from the PDF's text layer and cost $0.001 (pdf-text-page). Only pages without a usable text layer, such as scans and photos, are sent to Mistral OCR and cost $0.007 (ocr-page). Set forceOcr to OCR every page."},{"question":"Does it handle tables and multi-column layouts?","answer":"OCR pages keep tables as Markdown tables and follow the reading order of multi-column layouts. Text-layer pages rebuild headings, lists and simple tables from the PDF's layout; use forceOcr when you need OCR's reconstruction on every page."}],"mcpExamplePrompt":null,"related":["pdf-text-extractor","document-to-json","document-to-markdown","audio-transcription"],"urls":{"site":"https://www.sfoln.com/actors/pdf-ocr-markdown/","siteJson":"https://www.sfoln.com/actors/pdf-ocr-markdown.json","siteMarkdown":"https://www.sfoln.com/actors/pdf-ocr-markdown.md","runSync":"https://api.apify.com/v2/actors/sfoln~pdf-ocr-markdown/run-sync-get-dataset-items","runAsync":"https://api.apify.com/v2/actors/sfoln~pdf-ocr-markdown/runs","mcp":"https://mcp.apify.com?tools=sfoln/pdf-ocr-markdown","requestAccess":"mailto:contact@sfoln.com?subject=Access%20request%3A%20PDF%20OCR%20to%20Markdown%20Converter%20(sfoln%2Fpdf-ocr-markdown)&body=Please%20publish%20pdf-ocr-markdown.%20What%20we%20plan%20to%20use%20it%20for%3A"},"publisher":{"name":"SFOLN LLC","apifyUsername":"sfoln","url":"https://www.sfoln.com","apifyProfile":"https://apify.com/sfoln","email":"contact@sfoln.com"},"generatedAt":"2026-10-22T04:28:58.477Z"}