PDF OCR to Markdown: Scans, Images, Tables
Pricing
from $6.00 / 1,000 page converteds
PDF OCR to Markdown: Scans, Images, Tables
Returns clean Markdown or plain text for each PDF or image (PNG, JPG, WEBP, TIFF): tables as Markdown tables, a per-page array and a .md file. OCR for scanned and digital PDFs with Google Gemini vision. Page ranges. For RAG, LLMs and AI agents. From $0.006 per page.
Pricing
from $6.00 / 1,000 page converteds
Rating
0.0
(0)
Developer
Brasspage
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
PDF OCR to Markdown: scanned PDFs and images to clean Markdown
Convert scanned PDFs, digital PDFs and images (PNG, JPG, WEBP, TIFF) to clean Markdown or plain text. Tables become Markdown tables, headings stay headings, and math becomes LaTeX. For every document you get the full text, a per-page array, the page count and a downloadable .md file.
A vision AI model (Google Gemini 3.1 Flash-Lite) reads each page as an image, so it works on scans, photos of paper, faxes and PDFs with no text layer, where plain text extraction returns nothing.
Price: $0.006 per page, including up to 2,000 output tokens (about 1,500 words). Very dense pages, such as tables full of numbers, cost $0.003 more per extra 1,000 tokens. A 10-page scanned contract costs about $0.065. On the Apify free plan, you can try 20 pages per run and 50 pages per month (see Limits).
What you get
For each PDF or image, one row with:
- Clean Markdown or plain text for the whole document: tables as Markdown tables, headings kept, math as LaTeX.
- A per-page array, so you can quote, chunk or index page by page.
- A
.mdfile to download. - The page count and the number of pages converted.
- No charge for failures: a page or file that fails is marked with an
error.
Quick start
- Keep the prefilled IRS Form W-9 PDF, or paste links to your own PDFs or images.
- Optional: set Pages (for example
1-3) and choose Markdown or plain text. - Click Start. The 6-page W-9 is ready in about 10 seconds and costs $0.044.
- Read the Markdown in the Output tab, or download the
.mdfile.
What you can do with it
- RAG and LLM pipelines: turn PDFs into Markdown that chunks well. Use
pages[]to keep page numbers for citations. - AI agents: give an agent one tool that reads any PDF or image link and returns text. MCP URL below.
- Scanned archives: old reports, typewritten letters, faxes and multi-page TIFF scans to searchable text.
- Tables to data: invoices, price lists, statements and data tables as Markdown pipe tables, or as tab-separated rows that paste straight into a spreadsheet.
- Forms and receipts: get the printed text and labels of forms, receipts and IDs you are allowed to process.
How it works
- You give direct links to PDF or image files, or upload a file.
- The Actor downloads each file from public hosts only, checks its real type from its first bytes, and splits PDFs and multi-page TIFFs into single pages.
- Each page goes to Gemini 3.1 Flash-Lite with fixed instructions: transcribe exactly, in reading order, keep the original language, do not summarize or add anything. Up to 8 pages are read at the same time.
- You get one dataset item per document, plus a
document-NNNN.md(or.txt) file in the run's key-value store.
Input
| Field | Description |
|---|---|
documentUrls | Direct links to PDF, PNG, JPEG, WEBP or TIFF files, up to 100 MB each. Apify key-value store record URLs also work (private stores too). |
documentFile | Upload one PDF or image from your computer. |
pages | Pages to convert in each document, for example 1-3, 5, 10- (10- means page 10 to the end). Empty means all pages. An image is page 1. |
outputFormat | markdown (default) or text (no Markdown formatting). |
markdownTables | true (default): tables as Markdown pipe tables, also in plain text output. false: one row per line, cells separated by tabs. |
maxPagesPerRun | Safety limit: total pages per run (default 1000). |
Example input
{"documentUrls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf","https://example.com/scanned-invoice.jpg"],"pages": "1-2","outputFormat": "markdown","markdownTables": true}
Output
One dataset item per document:
{"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","fileType": "pdf","pageCount": 6,"pagesConverted": 2,"markdown": "# Form W-9\n(Rev. March 2024)\n...\n\n# Part I Taxpayer Identification Number (TIN)\n...","pages": [{ "page": 1, "markdown": "# Form W-9\n(Rev. March 2024)\n..." },{ "page": 2, "markdown": "Form W-9 (Rev. 3-2024) Page 2\n..." }],"outputFormat": "markdown","model": "gemini-3.1-flash-lite","fileUrl": "https://api.apify.com/v2/key-value-stores/.../records/document-0001.md","convertedAt": "2026-10-15T15:50:03+00:00"}
markdownis all converted pages joined with a blank line. WithoutputFormat: text, the field istextinstead, in the item and inpages[].pageCountis the number of pages in the file.pagesConvertedis the number of pages you get text for.- Each page in
pages[]hasoutputTokens, the size of its text.extraTokenBlocksis the number of extra 1,000-token blocks charged for the document (see Pricing). - A page whose text is longer than the limit of 8,192 output tokens is cut there and has
"truncated": true. You get and pay for the text up to the limit. This is rare: the densest page we tested, a full IRS tax table, needs about 6,500. - A page that fails has
{ "page": 4, "error": "..." }inpages[], and you are not charged for it. - A file that fails (a 404, a web page instead of a file, a password-protected PDF) gives an item with an
errorfield, and you are not charged for it.
Pricing
Pay per event. There is no monthly fee.
| Event | Price |
|---|---|
| Actor start | $0.005 per run |
page-converted | $0.006 per page that you get text for, including up to 2,000 output tokens |
extra-1k-tokens | $0.003 per started 1,000 output tokens above 2,000 on one page |
Examples: one typed letter costs $0.011. The 6-page IRS Form W-9 costs $0.044 (one page has 2,130 tokens, so it adds one extra block). A full page of a tax table with about 6,500 tokens costs $0.021. 1,000 pages of normal text cost about $6. The most one page can cost is $0.027.
Set Maximum cost per run in the run options to cap your spending. The Actor starts a page only if its highest possible price still fits in the remaining budget, so a run never goes over your maximum.
Limits
- Max pages per run (
maxPagesPerRun, default 1000). The run stops when it reaches this total, and the last dataset row has anotethat says so. Raise the limit or start another run for more. - Apify free plan: free trial of 20 pages per run and 50 pages per month. On the free plan, the Actor converts up to 20 pages per run, then stops with a note. After 50 pages in a calendar month (UTC), runs return only a note until the 1st of the next month. To convert more, upgrade to a paid Apify plan.
- Files up to 100 MB, pages up to 14 MB each, and up to 5,000 pages per document.
- Supported: PDF, PNG, JPEG, WEBP and TIFF. Word, Excel and PowerPoint files are not supported; export them to PDF first.
FAQ
How accurate is it?
Very good on printed text, typewriter pages and clean scans. Like every OCR tool, it can misread small digits in dense tables, faint scans or messy handwriting. Check important numbers against the original. Unreadable words are marked [illegible].
Does it work on PDFs that already have text? Yes. Every page is read as an image, so digital and scanned PDFs give the same kind of Markdown, with the layout, tables and reading order of what you see on the page.
Can text in a document trick the AI? The page goes to the model only as file data, with fixed instructions to transcribe it and never follow instructions in it. The model has no tools and no internet access, and its answer is only ever stored as that page's text. In our tests, a page that says "ignore all previous instructions" is transcribed word for word.
Where do my documents go? The Actor sends each page to Google's Gemini API on a paid plan. Google does not use paid API data to improve its products. It keeps it for a limited time to detect abuse. The Actor keeps no copy after the run, except the results in your own Apify storage.
What is the difference between Markdown and plain text output?
Markdown keeps headings (#), lists, bold text and LaTeX math, which LLMs and RAG tools read well. Plain text has no formatting. In both, tables are Markdown tables unless you turn off Tables as Markdown tables.
How fast is it? About 2 to 5 seconds per page, with 8 pages read at a time, so a 100-page PDF should take 1 to 2 minutes.
How do I use it from an AI agent or my code?
Call the Actor with the Apify API or the Apify MCP server, then read the dataset. To give an AI agent this one tool, connect it to the Apify MCP server at https://mcp.apify.com?tools=brasspage/pdf-ocr-to-markdown.
Who is responsible for the rights to the documents? You are. Only convert documents that you own, that are public, or that you have permission to process. The Actor does not try to get around paywalls, logins or PDF passwords.
Something does not work? Open an issue on the Issues tab with the run URL. Fixes are usually quick.
Related Actors
Other tools from the same developer, with the same pay-per-result pricing:
- Podcast & Audio Transcriber: podcasts and audio or video files to text, SRT and VTT subtitles.
- Google Sheets Export & Sync: send the results of any Actor to a Google Sheet (append, replace or upsert).
- Website Contacts & Tech Stack: public emails, phones, social links, CMS and pixels for a list of websites.
- ATS Jobs API: every open job from Greenhouse, Lever, Ashby and other ATS boards, with new-job alerts.