# PDF to Markdown API: send a PDF link, get its text back as Markdown

> PDF to Markdown API for LLMs and RAG: send a PDF URL, get its text as Markdown with headings and tables, up to 100 pages, from $0.07/1K pages. Crypto.

- URL: https://webreaderapi.com/pdf-to-markdown-api/
- Last updated: 2026-10-22
- Publisher: WebReaderAPI (https://webreaderapi.com)

Reports, papers, manuals and price lists are often PDFs. Pass the link to the same endpoint you use for web pages and get the document's text as Markdown, ready to chunk and embed.

**Quick answer — Is there an API that converts a PDF from a URL into Markdown?**

Yes. With **WebReaderAPI**, send the PDF's URL to `https://webreaderapi.com/api/v1/read`: the API downloads the file and returns its text as Markdown, with headings, paragraphs, lists and simple tables. Files up to 20 MB and 100 pages are supported, at 1 credit per started block of 10 pages, from $0.07/1K pages as of October 2026. No KYC; pay in crypto.

## PDF to Markdown at a glance

| Attribute | Value |
| --- | --- |
| Endpoint | `GET https://webreaderapi.com/api/v1/read?url=https://…/report.pdf` (the same as for web pages) |
| Limits | PDF files up to 20 MB and 100 pages are converted to Markdown, at 1 credit per started block of 10 pages |
| Output | Markdown text with headings, paragraphs, lists and simple tables; `format=text` for plain text |
| Not supported | Scanned PDFs without a text layer (no OCR), password-protected files |
| robots.txt | Applies to PDF links as to any other page |
| Payment | BTC, USDT, USDC, ETH, SOL, LTC, from a $25 top-up; no KYC |

## How are PDF pages counted?

A PDF costs 1 credit per started block of 10 pages. A 4-page brochure costs 1 credit, a 25-page report 3 credits, and a 100-page manual 10 credits. The response gives the exact figure in `credits_used`.

Files larger than 20 MB or longer than 100 pages return `422 unsupported_content` and use no credit. For a long document, look for an HTML version of the same content first: it is often cheaper and better structured.

## What does the Markdown look like?

The converter rebuilds the reading order from the PDF's text layer. Large or bold lines at the start of a section become headings, bulleted and numbered items become Markdown lists, and simple grid tables become Markdown tables.

Running headers, footers and page numbers that repeat on every page are removed, so they do not split sentences in your chunks. Two-column layouts are read column by column. Footnotes stay as text at the point where the page puts them.

*Python: read a PDF and split it into chunks by heading*

```python
import os
import re

import requests

resp = requests.get(
    "https://webreaderapi.com/api/v1/read",
    headers={"Authorization": "Bearer " + os.environ["WEBREADER_API_KEY"]},
    params={"url": "https://example.com/annual-report.pdf"},
    timeout=120,
)
resp.raise_for_status()
doc = resp.json()
chunks = [c.strip() for c in re.split(r"\n(?=#{1,3} )", doc["markdown"]) if c.strip()]
print(len(chunks), "chunks,", doc["credits_used"], "credit(s)")
for c in chunks[:3]:
    print(c.splitlines()[0])

```

## Which PDFs work best, and which do not work?

PDFs exported from a word processor, a website or a publishing tool work best: they carry a text layer with fonts and positions. Annual reports, research papers, product manuals, policy documents and price lists usually fall in this group.

Scanned documents are images of pages and have no text layer. WebReaderAPI does not run optical character recognition, so a scan returns little or no text; the `word_count` field shows it at once. Password-protected and encrypted PDFs are refused with `422 unsupported_content`, without charge.

## How do PDFs fit into a RAG pipeline?

Treat them like web pages. Read the PDF, split the Markdown along its headings, add the source URL and the page title to each chunk's metadata, then embed. Keeping the URL lets your assistant cite the document it used.

When a crawl meets links to PDFs on the same domain, it reads them with the same rules and the same robots.txt checks. See the [RAG guide](https://webreaderapi.com/use-cases/rag/) for a full ingestion example.

## What does PDF conversion cost?

PDFs draw from the same credits as web pages: 1 credit per started block of 10 pages. With 10,000 pages for $3.75, you can convert about 10,000 short PDFs or 1,000 documents of 100 pages.

| Plan | Quantity | Price | Price per unit |
| --- | --- | --- | --- |
| Test | 10,000 pages | $3.75 | $0.38/1K pages |
| Starter | 50,000 pages | $14.25 | $0.28/1K pages |
| Build | 100,000 pages | $21.75 | $0.22/1K pages |
| Scale | 500,000 pages | $50 | $0.10/1K pages |

In every plan: Main-content extraction · JavaScript rendering when needed · Failed and refused pages not charged · Credits never expire

**Before you pay**

- Minimum top-up $25. Top up once in crypto, then buy any plan from your balance.
- Your balance has no end date and can buy page credits at any time. If a pack costs less than the minimum top-up, the amount you added only to reach that minimum can be sent back on request within 30 days of the payment, in USDT or USDC, as long as you have not spent it. Any other balance is not refunded unless the law says otherwise.
- Credited once your payment is checked on the blockchain. Typical network confirmation time: BTC ≈ 20 min · USDT TRC-20 ≈ 1 min · USDT ERC-20 ≈ 5 min · USDC ERC-20 ≈ 5 min · ETH ≈ 5 min · SOL ≈ 1 min · LTC ≈ 15 min

## PDF to Markdown API: common questions

### Can I upload a PDF file instead of sending a link?

Not in version 1. The API reads PDFs from a public URL. To convert a private file, put it at a URL you control for the time of the request.

### Does it extract text from scanned PDFs?

No. WebReaderAPI reads the text layer of a PDF and does not run OCR. A scanned document returns little or no text, which the `word_count` field shows.

### Are tables kept?

Simple grid tables become Markdown tables. Tables with merged cells or complex layouts are kept as text in reading order, which models still read well.

### Is a PDF charged if it fails?

No. Files that are too large, too long, encrypted or refused by the site are not charged. 1 credit = 1 page read without a browser; 2 credits when the page needs a browser to render JavaScript. A request that fails, or that a site's robots.txt refuses, is not charged.

---

WebReaderAPI: WebReaderAPI is a web reader API for AI agents that turns any public web page into clean Markdown, paid in crypto with no ID upload. Prepaid credits from $0.07/1K pages never expire, and robots.txt is respected. No KYC — no ID, no selfie, no documents. Pay in crypto.
