PDF & Image AI Extractor: OCR to Markdown, Text & JSON (Gemini) avatar

PDF & Image AI Extractor: OCR to Markdown, Text & JSON (Gemini)

Pricing

from $7.00 / 1,000 ai pages

Go to Apify Store
PDF & Image AI Extractor: OCR to Markdown, Text & JSON (Gemini)

PDF & Image AI Extractor: OCR to Markdown, Text & JSON (Gemini)

Turn PDFs, scans and photos into Markdown with real tables, plain text or structured JSON (invoices, receipts, CVs, bank statements or your own fields) with Google Gemini. Digital pages are read locally at a fraction of the price; only scans use AI. Pay only for pages that return content.

Pricing

from $7.00 / 1,000 ai pages

Rating

0.0

(0)

Developer

Juan Orjuela

Juan Orjuela

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 days ago

Last modified

Share

PDF & Image AI Extractor: OCR to Markdown, Text & JSON

Turn PDFs, scanned documents and phone photos into clean Markdown with real tables, plain text or structured JSON, powered by Google Gemini.

  • Scanned and image-only PDFs: full OCR, including handwriting, stamps and small print.
  • Tables stay tables: every table becomes a Markdown table, ready for RAG pipelines and LLMs.
  • Structured extraction: invoices, receipts, resumes/CVs, bank statements, contracts, or your own fields.
  • You only pay AI prices where AI is needed. In Auto mode, pages that already have a text layer are read locally at the cheap text-page price; only scanned pages go to the AI.
  • Bring your own Gemini key and AI pages drop to the BYOK price.

What you get

One row per document:

FieldDescription
url, fileName, fileType, sizeBytesThe source file
pageCount, pagesProcessedPages in the file and pages processed
textLayerPages, aiPages, failedPagesHow each page was read
contentThe whole document as Markdown or plain text
pagesPer-page results: page, method (text-layer, ai, empty, failed), content
dataStructured JSON output (when Output = Structured JSON)
errorWhy a document or some pages could not be read (those are not charged)

The dataset has three views: Documents, Extracted fields and One row per page (handy for RAG chunking with page citations).

Example: Markdown output

{
"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"fileName": "fw9.pdf",
"pageCount": 6,
"textLayerPages": 6,
"aiPages": 0,
"content": "Form W-9(Rev. March 2024)\nRequest for Taxpayer\nIdentification Number and Certification\nDepartment of the Treasury...",
"pages": [{ "page": 1, "method": "text-layer", "content": "Form W-9(Rev. March 2024)..." }]
}

Example: invoice to JSON

{
"url": "https://example.com/invoice-1043.pdf",
"pageCount": 2,
"data": {
"invoiceNumber": "1043",
"issueDate": "2026-09-30",
"currency": "USD",
"seller": { "name": "Northwind Ltd", "taxId": "US-12-3456789" },
"lineItems": [{ "description": "Consulting, September", "quantity": 10, "unitPrice": 120, "amount": 1200 }],
"taxTotal": 96,
"total": 1296
}
}

How to use it

  1. Paste direct links to your files in PDF or image URLs (PDF, PNG, JPEG, WebP, HEIC; up to 50 MB each). Google Drive and Dropbox share links work if the file is shared with "anyone with the link".
  2. Choose the Output: Markdown, Plain text or Structured JSON.
  3. For Structured JSON, pick a Document type or define Custom fields like total (number): grand total including tax.
  4. Run it. Results stream into the dataset as each document finishes.

Engines:

EngineWhat it doesBest for
Auto (default)Digital pages read locally; scanned pages (including scans with an old, error-prone OCR layer) by AIMixed batches, lowest cost
AI on every pageEvery page through GeminiBest layout and table fidelity
Text layer onlyNo AI at allDigital PDFs where you just need the text

Pricing

Pay per event: you are charged only for pages that return content. Failed pages, empty pages and documents that cannot be opened are free.

EventWhenPrice (free plan)
AI pageA page or image read by Gemini using the Actor's AI$10 per 1,000 pages
Text-layer pageA page read from the PDF's own text layer (Auto and Text-layer modes)$1 per 1,000 pages
AI page (your key)A page read by Gemini with your own API key; Google bills you for the tokens$2 per 1,000 pages

Paid Apify plans get up to 30% off (see the Pricing tab). A 10-page digital PDF in Auto mode costs about $0.01; a 10-page scan costs $0.10. The maximum cost per run you set is always respected: the Actor stops cleanly and keeps everything already processed.

Integrations

Works anywhere Apify does: the API, Make, Zapier, n8n, Google Sheets, webhooks, and AI agents through the Apify MCP server. A typical flow: new invoice email → save the attachment → run this Actor with the Invoice preset → append the JSON to a spreadsheet.

FAQ

Is my data used to train models? Documents are sent to Google's paid Gemini API, which does not use your content to improve Google's products. Files are processed in memory and not stored by this Actor. If you use your own key on Google's free tier, Google's free-tier terms apply.

What about password-protected PDFs? PDFs that only restrict printing or copying work. PDFs that need a password to open cannot be read.

Very long documents? Up to 1,000 pages per PDF. Use Max pages per document to process only the first pages.

Which languages? Any language Gemini reads, including mixed-language documents. The text is never translated.

Can I ask for something specific? Use Extra instructions, for example "amounts are in Colombian pesos" or "ignore the cover page".