# PDF to Markdown for LLM ingestion

**Use case:** 

Convert PDFs to Markdown with headings and paragraph structure preserved, and split the text into overlapping chunks sized for embedding models. Feed the chunks straight into LangChain, LlamaIndex or a vector database.

## Input

```json
{
  "urls": [
    "https://bitcoin.org/bitcoin.pdf"
  ],
  "outputFormat": "markdown",
  "perPage": true,
  "extractLinks": true,
  "maxPages": 500,
  "pageRange": "",
  "chunkSize": 1500,
  "chunkOverlap": 200,
  "maxFileSizeMb": 25,
  "maxConcurrency": 5,
  "timeoutSecs": 60
}
```

## Output

```json
{
  "url": {
    "label": "PDF URL",
    "format": "string"
  },
  "success": {
    "label": "OK",
    "format": "boolean"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "fileName": {
    "label": "File name",
    "format": "string"
  },
  "pageCount": {
    "label": "Pages",
    "format": "integer"
  },
  "pagesExtracted": {
    "label": "Pages extracted",
    "format": "integer"
  },
  "wordCount": {
    "label": "Words",
    "format": "integer"
  },
  "charCount": {
    "label": "Characters",
    "format": "integer"
  },
  "hasText": {
    "label": "Has text layer",
    "format": "boolean"
  },
  "fileSizeBytes": {
    "label": "Size (bytes)",
    "format": "integer"
  },
  "metadata": {
    "label": "Metadata",
    "format": "object"
  },
  "errorType": {
    "label": "Error type",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [Best Damn PDF Text Extractor](https://apify.com/josh99smith/pdf-text-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/josh99smith/pdf-text-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/josh99smith/pdf-text-extractor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
