PDF to Markdown + tables for LLM and RAG
Pricing
from $4.00 / 1,000 pdf processeds
PDF to Markdown + tables for LLM and RAG
Convert PDF URLs to page-marked Markdown, CSV tables, and token chunks for LLM and RAG workflows. Optional auto OCR on pages without a text layer. $0.004 per processed PDF, $0.002 per OCR page, $0.001 per table. Invalid and failed files are not charged.
Pricing
from $4.00 / 1,000 pdf processeds
Rating
0.0
(0)
Developer
Supes Dad
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
PDF to Markdown + Tables to CSV
Turn PDF URLs into Markdown for LLM and RAG workflows. The Actor downloads only the HTTP(S) links you supply, rebuilds page-marked Markdown with heading detection, extracts tables as inline Markdown and CSV, and optionally runs OCR on pages with no text layer. It does not crawl, follow redirects, or fetch links found inside a document.
- Actor:
supes/pdf-to-markdown - Console: https://console.apify.com/actors/BWKEWBQxb6lwNBXmZ
What it does
For each PDF URL you provide, the Actor writes one dataset row:
- Downloads the file (50 MB limit, checked from
Content-Lengthand again while streaming) - Reconstructs Markdown with
<!-- page N -->markers, headings from font size and bold weight, and tables inlined where they appear - Saves accepted tables as CSV in the default key-value store, with row/column counts and a confidence of
high,medium, orlow - Splits the Markdown into approximate token chunks (default 800) for embedding
- Runs Tesseract OCR when
ocrisauto(pages with no text layer) orforce(every selected page). The image includes English language data only
A bad URL or a failed file becomes an error row. The run continues with the rest of the list. Page-level failures are reported on the row while successful pages are kept.
Who it's for
Use this Actor if you need to:
- Ingest research papers, manuals, contracts, or reports into a RAG or vector-search pipeline
- Give an agent or LLM a tool that turns a public PDF link into quoted, page-cited Markdown
- Extract ruled tables to CSV without standing up your own OCR or PDF stack
- Keep costs predictable: $0.004 per processed PDF, plus $0.002 per OCR page and $0.001 per extracted table
Typical use cases include RAG ingestion, document Q&A, contract or report review, and knowledge-base indexing.
What you get
Each input URL produces one dataset row, including error rows.
| Field | Type | Meaning |
|---|---|---|
sourceUrl | string | The input URL |
pageCount | number | Pages in the PDF (0 on early failures) |
pagesProcessed | number[] | 1-based pages that were converted |
metadata | object | title, author, and created when the PDF provides them |
markdown | string | Page-marked Markdown, with tables inlined |
tables | object[] | Each entry has page, index, rows, columns, csvKey, markdown, and confidence |
tableCount | number | Number of tables saved to the key-value store |
chunks | object[] | { text, pages, tokens } slices of the Markdown |
ocrPages | number[] | Pages that were successfully OCR'd |
error | object or null | { code, message } when something failed; otherwise null |
CSV files are stored under csvKey in the default key-value store.
Input
| Field | Required | Default | Description |
|---|---|---|---|
pdfUrls | yes | — | Direct HTTP(S) PDF URLs. Credentials, fragments, redirects, and non-public IPs are rejected. |
pages | no | all pages | Optional 1-based selection, for example 1-5,8 |
ocr | no | auto | auto (only pages without text), force (all selected pages), or off |
ocrLanguages | no | eng | Tesseract language codes. Only English data is installed in the image. |
extractTables | no | true | Detect tables and save them as CSV |
chunkTokens | no | 800 | Approximate maximum tokens per chunk (100–4000) |
maxConcurrency | no | 2 | How many PDFs to process at once |
Example input:
{"pdfUrls": ["https://arxiv.org/pdf/1706.03762","https://example.com/notapdf"],"ocr": "auto","extractTables": true,"chunkTokens": 800,"maxConcurrency": 2}
Pricing
Pay per event. You pay the events below, not Apify platform usage.
| Event | Price | When it is charged |
|---|---|---|
pdf-processed | $0.004 ($4 per 1,000) | After a successful or partially successful PDF row is saved |
page-ocr | $0.002 ($2 per 1,000) | Once per page that was successfully OCR'd |
table-extracted | $0.001 ($1 per 1,000) | Once per table saved to the key-value store |
apify-actor-start | $0.00005 per start event | Charged automatically at the start of the run. At the default 1 GB memory, that is $0.00005 |
Error rows are not charged: INVALID_URL, DOWNLOAD_FAILED, TOO_LARGE, NOT_PDF, and ENCRYPTED. There is no automatic per-dataset-row charge. If a run reaches your maximum spend, in-flight work is stopped and remaining URLs are skipped.
Worked examples (plus the $0.00005 start fee at 1 GB):
- 1 text-layer PDF, no tables: $0.004
- The sample 15-page paper (1 table, no OCR): $0.005
- 100 text-layer PDFs, no tables: $0.40
- 1 text-layer PDF with 4 saved tables: $0.008
- A 20-page scanned PDF (OCR on every page, no tables): $0.044
- 100 valid PDFs and 5 typo / failed downloads: $0.40 (the failed rows are free)
How to run
In Apify Console
- Open PDF to Markdown + Tables to CSV.
- Paste direct PDF URLs into PDF URLs. Leave OCR on Only pages without text unless you need to force OCR or turn it off.
- Keep Extract tables checked and Maximum concurrent PDFs at
2unless you have a reason to change them. - Run the Actor, then open the default dataset and key-value store when it finishes.
The input field titles above match this Actor's input schema.
From the API
Send the same JSON input to the Actor's run endpoint:
curl -X POST "https://api.apify.com/v2/acts/supes~pdf-to-markdown/runs?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"pdfUrls":["https://arxiv.org/pdf/1706.03762"],"ocr":"auto","extractTables":true}'
You can also schedule the Actor or start it from an integration. Replace YOUR_APIFY_TOKEN with your own Apify API token.
Sample output
The values below come from a successful row for https://arxiv.org/pdf/1706.03762 in run ZAHuoEBKbjPBbMkHE on 10 November 2026 (America/New_York), build 1.0.2, with ocr: auto and extractTables: true. The live row had 15 pages processed, 42,015 characters of Markdown, 12 chunks, and one 8×9 table at medium confidence, saved as pdf-1-p9-t1.csv. The Markdown and table are trimmed here to keep the example short. The live chunks array had 12 items; only the first is shown, with its text shortened.
{"sourceUrl": "https://arxiv.org/pdf/1706.03762","pageCount": 15,"pagesProcessed": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],"metadata": { "title": null, "author": null, "created": "D:20240410211143Z" },"markdown": "<!-- page 1 -->\n\nProvided proper attribution is provided, Google hereby grants permission to\n\nreproduce the tables and figures in this paper solely for use in journalistic or\n\nscholarly works.\n\n# Attention Is All You Need\n\nAshish Vaswani ∗ Noam Shazeer ∗ Niki Parmar ∗ Jakob Uszkoreit ∗\n\n## Abstract\n\nThe dominant sequence transduction models are based on complex recurrent or\n\n…","tables": [{"page": 9,"index": 1,"rows": 8,"columns": 9,"csvKey": "pdf-1-p9-t1.csv","confidence": "medium","markdown": "| N | d<br>model | d<br>ff | h | d<br>k | d P<br>v | drop | ϵ<br>ls | train<br>steps |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| 6 | 512 | 2048 | 8 | 64 | 64 | 0.1 | 0.1 | 100K |\n…"}],"tableCount": 1,"chunks": [{ "text": "<!-- page 1 -->\n\nProvided proper attribution is provided, Google hereby grants permission to\n\n…", "pages": [1, 2, 3, 4, 5], "tokens": 800 }],"ocrPages": [],"error": null}
On the same run, https://127.0.0.1/x.pdf returned error.code: INVALID_URL (local addresses are blocked) and https://example.com/notapdf returned DOWNLOAD_FAILED with HTTP 404. Neither error row is charged.
Limits
- 50 MB per PDF, checked from
Content-Lengthand during the download. - 500 pages per PDF, and 120 seconds of processing per PDF (30-second download timeout).
- Redirects are not followed. Use a direct link that returns HTTP 200 and a PDF body. The prefill
https://arxiv.org/pdf/1706.03762works; a URL that 301s, including some…/1706.03762.pdfvariants, will fail withDOWNLOAD_FAILED. - Only
httpandhttpsURLs are accepted. Loopback, private, link-local, and cloud-metadata addresses are rejected after DNS resolution, including IPv4-mapped IPv6. - Default memory is 1024 MB. Default concurrency is 2, so results can arrive out of input order.
- Only English Tesseract data is included in the image. Other
ocrLanguagesvalues will fail unless you install those language packs yourself.
Limitations
- Heading detection and layout reconstruction are heuristic. Complex multi-column pages, headers, and stamps can leave leftover characters in the Markdown.
- Unruled typographic tables (common in academic papers) usually come out as readable body text, not structured
tables[]entries. Ruled tables can still have stacked or split cells; confidence may bemediumorlow. - Attention or figure grids are filtered out and are not charged as tables, but leftover visualization glyphs can still appear in the body Markdown.
- Formulas, subscripts, and typographic math are lossy. They are linearized, not converted to LaTeX.
- OCR is best-effort. Auto OCR runs only when a page has no text layer, so a bad or garbage text layer will not trigger OCR. Headings on OCR pages can over-trigger (email lines or body sentences marked as headings).
- Metadata
titleandauthorare whatever the PDF stores. Many papers leave them empty. - The Actor does not accept file uploads or base64, does not follow links inside PDFs, and cannot open password-protected files (
ENCRYPTED).
FAQ
Do I need an API key? No. Only an Apify account. The Actor downloads public PDF URLs; it cannot open files behind a login.
Are failed files charged?
No. Invalid URLs, download failures, oversized files, non-PDFs, and encrypted files are not charged. A partially successful PDF (some pages converted, a page-level error on the same row) is charged pdf-processed, plus any OCR pages and saved tables.
Will it OCR every page?
Only if you set ocr to force. The default auto setting OCRs pages that have no text layer. Pages that already have text are left as text.
Why wasn't my table extracted?
Tables without ruling lines are often returned as text in markdown instead of a tables[] entry. That is expected. Figure-like grids are dropped on purpose so they are not billed.
Why did a URL that works in my browser fail?
The Actor does not follow redirects and does not send a browser profile. Use the final URL that returns HTTP 200 with a %PDF- header. Local and private addresses are blocked.
Can I convert only some pages?
Yes. Set pages to a 1-based range such as 1-5,8.
What language is OCR?
English (eng) is installed. Other Tesseract codes can be requested in ocrLanguages, but those language packs are not in the image.
Support
Found a bug or want a feature? Open an issue on this Actor's Issues tab in Apify Console. Include the run ID and the PDF URL that failed when you can.