Convert PDF to Markdown via API, pay per PDF: $0.0035 each
If you feed documents to an LLM, a search index or an agent, you need the text of a PDF with its structure kept: headings as headings, lists as lists, tables as tables. This guide shows an API that does that and charges per PDF, not per month. You send links, you get Markdown (and optionally chunks cut for RAG) back as JSON.
Price
| Job | Cost |
|---|---|
| 1 PDF (up to 200 pages by default) | $0.0035 |
| 1,000 PDFs | $3.50 |
| Dead link, not a PDF, or no text layer | $0, returned with the reason |
The price is per document, so a 2-page memo and a 150-page report cost the same. There is no start fee and no monthly plan; the Apify free plan includes monthly credit, and a maximum spend per run stops the Actor when it is reached.
A real run
On 2 November 2026 we ran it on Apify's servers on a 2-page PDF that we host and made up ourselves, sample.pdf. The input:
{"urls": [{"url": "https://keencrest-guides.web.app/samples/sample.pdf"}], "outputFormat": "markdown", "chunkSize": 1000}
The run (id saTEnjaE9BlVCbcgk) charged one PDF, $0.0035. The row said pageCount: 2, hasTextLayer: true, 148 words, 795 characters, and 1 chunk. The first page of the markdown field:
# Keencrest sample document
This short PDF is hosted by Keencrest so that the PDF to Markdown Actor has a sample it is allowed to read. It contains headings, paragraphs, a list and a small table.
## 1. Why a sample file
A built-in example should run on a file we host ourselves. That way the example never depends on a third party's terms of service or availability, and the output is the same every time.
## 2. What the converter keeps
- Headings and paragraphs in reading order
- Bulleted lists
- Simple tables as Markdown tables
## 3. A small table
| Plan | Pages | Price |
| --- | --- | --- |
| Free | 10 | 0 |
| Team | 500 | 9 |
| Scale | 5000 | 49 |
The headings became # titles, the list stayed a list and the aligned columns came back as a Markdown table. This is a clean file made for the test; real reports with multi-column layouts, footnotes or merged table cells convert less neatly, so check a few of your own files first.
Scanned PDFs (no text layer)
A PDF that is only a picture of each page has no text to extract. This Actor returns it with hasTextLayer: false and does not charge. For those files use OCR instead: OCR API, pay per page, no subscription reads scanned PDFs and images at $0.003 per page with text.
Limits to know
- Text layer only: no OCR in this Actor and no handwriting.
- Files up to 50 MB by default. A file that cannot be opened comes back with a reason.
- It downloads from links you give and obeys the host's robots.txt; a host that forbids automated downloads is refused and not charged. Use files you have the right to process.
- Markdown structure is inferred from fonts and layout, so heading levels can be wrong on unusual documents.
How to run it
- Put the PDFs at public links.
- Paste them into
urls, setoutputFormattomarkdownand, for RAG,chunkSizeto about 1000. Start with 3 files. - Export the dataset as JSON or fetch it through the API.
Try it: PDF to Markdown & Text Extractor on Apify. $0.0035 per PDF; scans and failed links are free. The Apify free plan includes monthly credit, so a test run costs nothing out of pocket.
Related guides
- Find a company's website from its name (bulk): 96% on known companies, $0.80 per 1,000 found
- Company names to business emails (bulk): 11 of 20 names, $0.04 measured
- OCR API, pay per page, no subscription: $0.003 per page
- Find contact forms on a list of websites: contact page, form type, captcha
- Find a Google Play app's competitors and similar apps, with installs: $0.30 per 1,000 apps
- Export a Google Play developer's app list and a category's competitor apps, with installs and ratings