# PDF to Markdown API

Read a paper without copying its pages.

Give your agent a public PDF URL and get Markdown text. Our test recovered a paper’s headings and body; its table cells came back as flattened text.

Public text PDFs, returned as readable Markdown. The test flattened tables and mathematical layout.

Provider in the worked example: Otto.

Price shown for this route: 0.5¢ per PDF request.



## What it can do

### Read a public PDF as Markdown

Return the document title and readable text with Markdown headings. Our paper test returned about 40,500 characters; table cells were flattened into prose.

Price: $0.005 / PDF request.


## A real example

Tested on 2026-11-05 through Otto.

The response contained the paper title, abstract and numbered sections. Tables and mathematical layout were returned as text.

Your agent asked: Read the Attention Is All You Need paper from its public arXiv PDF

Returned in this test:

- Document: Attention Is All You Need, arXiv 1706.03762
- Returned text: about 40,500 characters, with Markdown headings
- Table 1: Column labels and values flattened into text
- Source PDF: Public arXiv document

Charged in this test: $0.005.

One public text PDF. Table layout was flattened; scanned-document OCR and faithful equation layout were not tested.


## Try the API request

Use your TaskFuel API key as TASKFUEL_API_KEY in your terminal or server. Keep it out of browser code.

### 1. Check the price

This request checks the price without paying. Exact public PDF URL used in the test. This request sends no body.

```sh
curl --fail-with-body https://app.taskfuel.ai/v1/call \
  -H "Authorization: Bearer $TASKFUEL_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'TASKFUEL_REQUEST'
{
  "url": "https://x402.ottoai.services/web-extract?url=https%3A%2F%2Farxiv.org%2Fpdf%2F1706.03762",
  "method": "GET",
  "dryRun": true
}
TASKFUEL_REQUEST
```

### 2. Run the request

Review amount_usd in the quote. To pay and run, change dryRun to false and add maxAmountUsd with that approved amount inside the same JSON object. Keep the inputs unchanged; this limit applies to one call.

### 3. Read the result

Read data.title and data.content. data.httpStatus identifies the fetched document’s status; a successful paid API response can still contain a source error page.



[Setup and API reference](https://taskfuel.ai/docs/) · [Job polling and timeout recovery](https://app.taskfuel.ai/using.md)


## Connect your agent

Read the [setup guide](https://taskfuel.ai/docs/setup/) and choose the connection your agent supports.

Use one TaskFuel account and prepaid balance. Inspect the provider and request quote before a paid call, then review the returned response and recorded charge.



## When to use it

### Pull text and headings into the task.

Your agent reads the extracted abstract and sections, then refers back to the source PDF.

### See how the table came back.

Your agent can read the returned table text while keeping the source PDF for the original layout.




## Questions

### What does the PDF to Markdown API return?

A document title and Markdown text. The research-paper test returned about 40,500 characters with headings and body text.

### Does it preserve tables and equations?

In this test, table cells were flattened into text and mathematical layout was simplified. The result served text reading rather than a faithful layout conversion.

### Does this example cover scanned PDFs?

The tested paper was a text PDF. Scans require OCR; this example does not establish scanned-document extraction.

### Can a free local converter do the job?

Yes. Free tools such as Docling can be a better fit for local documents or repeated extraction when you run the conversion yourself. This route reads a public PDF from your agent’s existing task.

### What did the PDF request cost?

The successful paper extraction cost $0.005 on 5 November 2026. Your agent shows the price for your own request before it pays.

### Do I need a separate extraction account?

No. Your agent pays from your TaskFuel balance, so there is nothing else to sign up for.

## Related tool guides

- [Compare paper-search indexes before reading a PDF](https://taskfuel.ai/tools/google-scholar-api/)
- [Extract text from a webpage](https://taskfuel.ai/tools/extract-webpage/)
- [Find sources with a search API](https://taskfuel.ai/tools/web-search-api-for-llm/)
- [Read financial statements as structured data](https://taskfuel.ai/tools/financial-statements-api/)


## Reference

- [Read this guide on the website](https://taskfuel.ai/tools/pdf-to-markdown-api/).
- [Browse providers and capabilities](https://taskfuel.ai/catalog/).
- [Pricing](https://taskfuel.ai/pricing/).
- [Agent instructions](https://taskfuel.ai/llms.txt).
