# PDF to Markdown Converter - AI-Powered with OCR & Tables (`clearpath/pdf-to-markdown-api`) Actor

Convert PDFs to clean Markdown with GPU-accelerated AI. Extracts tables, LaTeX formulas, and images from complex layouts. Supports OCR for scanned docs in 8 languages. Batch process hundreds of PDFs in parallel via URL, upload, or API.

- **URL**: https://apify.com/clearpath/pdf-to-markdown-api.md
- **Developed by:** [ClearPath](https://apify.com/clearpath) (community)
- **Categories:** Automation, Integrations, AI
- **Features:** Limited permissions
- **Stats:** 79 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.90 / 1,000 base fee per pdf processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## PDF to Markdown

**The most accurate PDF to Markdown converter on Apify** — AI-powered with GPU acceleration for complex layouts, tables, formulas, and images.

Convert any PDF document into clean, structured Markdown with intelligent layout detection, OCR for scanned documents, and optional image extraction. Built for developers who need reliable PDF processing at scale.

- **Complex layouts** — Multi-column documents, academic papers, financial reports
- **Table extraction** — Preserves table structure in Markdown format
- **Formula support** — Mathematical equations converted to LaTeX
- **Batch processing** — Process hundreds of PDFs in parallel
- **Multiple input methods** — File upload, URLs, or base64 API calls

#### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
clearpath/pdf-to-markdown-api on Apify. Call: ApifyClient("TOKEN").actor("clearpath/pdf-to-markdown-api").call(run_input={"pdfUrls": ["https://example.com/doc.pdf"]}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: pdfUrls (list of PDF URLs), pdfFile (upload), pdfBase64Items (base64-encoded PDFs for API calls). Full actor spec (input schema with all params/enums/defaults, output dataset fields, README): GET https://api.apify.com/v2/acts/clearpath~pdf-to-markdown-api/builds/default (Bearer TOKEN) → inputSchema, actorDefinition.storages.dataset, readme. Pricing: $0.01/PDF + $0.005/page + $0.001/image (PPE). Get token: https://console.apify.com/account/integrations
```

### Demo

[![Demo](https://asciinema.org/a/SyaduKzMYTTv91jZsJDM5SI8B.svg)](https://asciinema.org/a/SyaduKzMYTTv91jZsJDM5SI8B)

### Key Features

#### Document Processing

- **Intelligent layout detection** — Handles single and multi-column layouts automatically
- **Table recognition** — Extracts tables with proper Markdown formatting
- **Formula extraction** — Converts mathematical formulas to LaTeX notation
- **Image extraction** — Optionally extract embedded images with public URLs
- **OCR support** — Process scanned PDFs with 8 language options

#### Developer-Friendly

- **Batch processing** — Submit multiple PDFs in a single run
- **Parallel execution** — Configurable concurrency (1-10 simultaneous PDFs)
- **Three output modes** — Choose between text-only, with images, or full extraction
- **Structured output** — Consistent JSON schema for easy integration
- **Public image URLs** — Images stored in Apify Key-Value Store, not base64 blobs

#### Reliability

- **Automatic retries** — Exponential backoff for transient failures
- **Partial success** — Continues processing if individual PDFs fail
- **Detailed status** — Per-document success/error reporting
- **Processing metrics** — Page count, markdown length, processing time

### Use Cases

#### For RAG Pipeline Developers

- **Prepare documents for LLM retrieval** — Convert PDFs to clean text for embedding
- **Build knowledge bases** — Extract structured content from document libraries
- **Enhance chatbot context** — Feed processed documents into AI assistants
- **Create searchable archives** — Transform PDF collections into queryable text

#### For Data Engineers

- **Document migration** — Convert legacy PDF archives to Markdown
- **Content pipelines** — Automate PDF processing in data workflows
- **ETL integration** — Extract text data for downstream processing
- **Compliance archival** — Create text-based backups of PDF documents

#### For Researchers

- **Extract tables from papers** — Pull data tables from academic PDFs
- **Process formulas** — Convert mathematical notation to LaTeX
- **Batch analysis** — Process entire paper collections
- **Figure extraction** — Capture charts and diagrams with metadata

### Quick Start

#### Basic — Single PDF URL

```json
{
  "pdfUrls": ["https://example.com/document.pdf"]
}
```

#### Advanced — Batch with Images

```json
{
  "pdfUrls": [
    "https://example.com/report-q1.pdf",
    "https://example.com/report-q2.pdf",
    "https://example.com/report-q3.pdf"
  ],
  "outputMode": "markdown_images",
  "concurrency": 5
}
```

#### Complete — All Parameters

```json
{
  "pdfFile": null,
  "pdfUrls": ["https://example.com/document.pdf"],
  "pdfBase64Items": [
    {
      "filename": "uploaded-doc.pdf",
      "data": "JVBERi0xLjQKJeLjz9..."
    }
  ],
  "outputMode": "full",
  "language": "en",
  "concurrency": 3
}
```

### Pricing — Pay Per Event (PPE)

Usage-based pricing that scales with document complexity:

| Component | Price | Description |
|-----------|-------|-------------|
| Base fee | **$0.01**/PDF | Charged once per successfully processed PDF |
| Per page | **$0.005**/page | Charged for each page in the document |
| Per image | **$0.001**/image | Charged for each extracted image (only in `markdown_images` and `full` modes) |

#### Cost Examples

| Document | Pages | Images | Calculation | Total |
|----------|-------|--------|-------------|-------|
| Simple report | 5 | 0 | $0.01 + (5 × $0.005) | **$0.035** |
| Business doc | 20 | 5 | $0.01 + (20 × $0.005) + (5 × $0.001) | **$0.115** |
| Research paper | 30 | 10 | $0.01 + (30 × $0.005) + (10 × $0.001) | **$0.17** |
| Annual report | 100 | 30 | $0.01 + (100 × $0.005) + (30 × $0.001) | **$0.54** |
| Large manual | 500 | 100 | $0.01 + (500 × $0.005) + (100 × $0.001) | **$2.61** |

#### Batch Processing Examples

| Batch | Total Pages | Images | Total Cost |
|-------|-------------|--------|------------|
| 10 PDFs × 10 pages | 100 | 0 | **$0.60** |
| 50 PDFs × 20 pages | 1,000 | 0 | **$5.50** |
| 100 PDFs × 15 pages | 1,500 | 200 | **$8.70** |

#### Cost Optimization Tips

- Use `markdown` mode if you don't need images — saves $0.001 per image
- Filter PDFs before submission to avoid processing irrelevant documents
- Batch similar-sized documents for predictable costs

### Input Parameters

| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `pdfFile` | file upload | - | No\* | Upload a single PDF file via the Apify UI |
| `pdfUrls` | string\[] | - | No\* | Array of URLs pointing to PDF files |
| `pdfBase64Items` | object\[] | - | No\* | Array of base64-encoded PDFs with filenames |
| `outputMode` | enum | `markdown` | No | Output format: `markdown`, `markdown_images`, or `full` |
| `language` | enum | `en` | No | Language hint for OCR accuracy |
| `concurrency` | integer | `3` | No | Parallel processing (1-10) |

\*At least one PDF source is required (`pdfFile`, `pdfUrls`, or `pdfBase64Items`).

#### Output Modes

| Mode | Markdown | Images | JSON Content | Best For |
|------|----------|--------|--------------|----------|
| `markdown` | Yes | No | No | Text extraction, RAG pipelines |
| `markdown_images` | Yes | Yes (URLs) | No | Full document conversion |
| `full` | Yes | Yes (URLs) | Yes | Analysis, debugging |

#### Supported Languages

| Code | Language |
|------|----------|
| `en` | English |
| `ch` | Chinese (Simplified) |
| `chinese_cht` | Chinese (Traditional) |
| `japan` | Japanese |
| `korean` | Korean |
| `ta` | Tamil |
| `te` | Telugu |
| `ka` | Kannada |

#### Base64 Input Format

For API integration, use `pdfBase64Items`:

```json
{
  "pdfBase64Items": [
    {
      "filename": "invoice-001.pdf",
      "data": "JVBERi0xLjQKJeLjz9MKNSAwIG9iago8PC..."
    },
    {
      "filename": "contract-2024.pdf",
      "data": "JVBERi0xLjUKJeLjz9MKMSAwIG9iago8PC..."
    }
  ]
}
```

### Output

Each PDF produces one dataset item with the following structure:

```json
{
  "filename": "annual-report-2024.pdf",
  "sourceType": "url",
  "sourceUrl": "https://example.com/annual-report-2024.pdf",
  "status": "success",
  "markdown": "# Annual Report 2024\n\n## Executive Summary\n\nThis year marked significant growth across all business units...\n\n## Financial Highlights\n\n| Metric | Q1 | Q2 | Q3 | Q4 |\n|--------|-----|-----|-----|-----|\n| Revenue | $12M | $14M | $15M | $18M |\n| Profit | $2M | $3M | $3.5M | $4M |\n\n## Strategic Initiatives\n\n### Digital Transformation\n\nOur investment in AI-powered solutions delivered...",
  "pageCount": 24,
  "markdownLength": 45230,
  "images": [
    "https://api.apify.com/v2/key-value-stores/abc123/records/annual-report-2024/figure-1.png",
    "https://api.apify.com/v2/key-value-stores/abc123/records/annual-report-2024/chart-revenue.png",
    "https://api.apify.com/v2/key-value-stores/abc123/records/annual-report-2024/logo.jpg"
  ],
  "imageCount": 3,
  "jsonContent": null,
  "error": null,
  "errorDetails": null,
  "processingTimeMs": 32450,
  "timestamp": "2025-01-15T10:30:00.000Z"
}
```

#### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `filename` | string | Original filename |
| `sourceType` | string | Input source: `url`, `upload`, or `base64` |
| `sourceUrl` | string | Source URL (if applicable) |
| `status` | string | `success` or `error` |
| `markdown` | string | Extracted Markdown content |
| `pageCount` | number | Number of pages in PDF |
| `markdownLength` | number | Character count of markdown |
| `images` | array | List of public URLs for extracted images |
| `imageCount` | number | Number of extracted images |
| `jsonContent` | object | Raw extraction metadata (full mode only) |
| `error` | string | User-friendly error message (if failed) |
| `errorDetails` | string | Additional error context |
| `processingTimeMs` | number | Processing duration in milliseconds |
| `timestamp` | string | ISO 8601 timestamp |

#### Error Output Example

```json
{
  "filename": "encrypted-doc.pdf",
  "sourceType": "url",
  "sourceUrl": "https://example.com/encrypted-doc.pdf",
  "status": "error",
  "markdown": null,
  "pageCount": null,
  "markdownLength": 0,
  "images": [],
  "imageCount": 0,
  "jsonContent": null,
  "error": "PDF is password-protected",
  "errorDetails": null,
  "processingTimeMs": 1250,
  "timestamp": "2025-01-15T10:31:00.000Z"
}
```

### API Integration

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("your_api_token")

run_input = {
    "pdfUrls": [
        "https://example.com/report-q1.pdf",
        "https://example.com/report-q2.pdf",
    ],
    "outputMode": "markdown_images",
    "concurrency": 3,
}

run = client.actor("your-username/pdf-to-markdown").call(run_input=run_input)

## Fetch results
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["status"] == "success":
        print(f"Processed: {item['filename']}")
        print(f"Pages: {item['pageCount']}")
        print(f"Markdown length: {item['markdownLength']} chars")
        # Save markdown to file
        with open(f"{item['filename']}.md", "w") as f:
            f.write(item["markdown"])
    else:
        print(f"Failed: {item['filename']} - {item['error']}")
```

#### JavaScript / TypeScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'your_api_token' });

const input = {
    pdfUrls: [
        'https://example.com/report-q1.pdf',
        'https://example.com/report-q2.pdf',
    ],
    outputMode: 'markdown_images',
    concurrency: 3,
};

const run = await client.actor('your-username/pdf-to-markdown').call(input);

const { items } = await client.dataset(run.defaultDatasetId).listItems();

for (const item of items) {
    if (item.status === 'success') {
        console.log(`Processed: ${item.filename}`);
        console.log(`Pages: ${item.pageCount}`);
        console.log(`Images: ${item.imageCount}`);
    } else {
        console.log(`Failed: ${item.filename} - ${item.error}`);
    }
}
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/your-username~pdf-to-markdown/runs?token=your_api_token" \
  -H "Content-Type: application/json" \
  -d '{
    "pdfUrls": ["https://example.com/document.pdf"],
    "outputMode": "markdown"
  }'
```

### Technical Requirements

| Requirement | Value |
|-------------|-------|
| **Memory** | 512 MB |
| **Processing Time** | 20-45 seconds per PDF |
| **Max Queue Wait** | 2 minutes |
| **Max Processing Time** | 5 minutes per PDF |
| **Concurrency** | 1-10 parallel PDFs |

#### Supported PDF Types

- Standard text PDFs
- Scanned documents (via OCR)
- Multi-column layouts
- Tables and forms
- Academic papers with formulas
- Reports with charts and figures

#### Limitations

- Password-protected PDFs are not supported
- Maximum recommended file size: 50 MB per PDF
- Very complex layouts may have reduced accuracy

### FAQ

**What types of PDFs can this Actor process?**

This Actor handles most PDF types including standard text documents, scanned images (via OCR), multi-column layouts, academic papers, financial reports, and documents with tables and formulas.

**How long does processing take?**

Most PDFs complete in 20-45 seconds. Complex documents with many pages or images may take longer. The Actor has a 5-minute timeout per PDF.

**Can I process scanned documents?**

Yes! The Actor includes OCR (Optical Character Recognition) that works with scanned PDFs. Use the `language` parameter to improve accuracy for non-English documents.

**What languages are supported for OCR?**

Eight languages: English, Chinese (Simplified and Traditional), Japanese, Korean, Tamil, Telugu, and Kannada.

**How are images stored?**

When using `markdown_images` or `full` mode, extracted images are stored in Apify's Key-Value Store. The output contains public URLs that remain accessible as long as your storage retention allows.

**What happens if a PDF fails to process?**

The Actor continues processing other PDFs and reports failures in the output. Each item has a `status` field (`success` or `error`) and an `error` field with a user-friendly message.

**Can I process PDFs via API without uploading files?**

Yes! Use the `pdfBase64Items` parameter to submit base64-encoded PDF content directly, or use `pdfUrls` to provide URLs that the Actor will fetch.

**Is there a free trial?**

Yes, Apify offers free platform credits for new users. You can test the Actor with sample PDFs before committing to paid usage.

**How do I handle large batches efficiently?**

Increase the `concurrency` parameter (up to 10) to process more PDFs in parallel. For very large batches, consider splitting into multiple runs.

**What's the difference between output modes?**

- `markdown`: Text only, smallest output, fastest
- `markdown_images`: Text + image URLs, good for full document conversion
- `full`: Everything including raw JSON metadata, best for analysis/debugging

### Data Export

Export your results in multiple formats:

- **JSON** — Full structured data for programmatic access
- **CSV** — Spreadsheet-compatible format
- **Excel** — Direct import to Microsoft Excel
- **XML** — Legacy system integration

### Automation

- **Scheduled runs** — Process PDFs on a recurring schedule
- **Webhooks** — Get notified when processing completes
- **API integration** — Trigger runs from your application
- **Apify integrations** — Connect with Zapier, Make, and more

### Related Actors

<table>
<tr><td style="padding:10px 14px;background:#236194;border:none;border-radius:4px 4px 0 0"><strong style="color:#FFFFFF;font-size:14px">Clearpath Research &amp; Public Records</strong></td></tr>
<tr><td style="padding:6px;border:1px solid #B5CBE0;border-top:none;border-radius:0 0 4px 4px;background:#EAF2FA">
<span style="display:inline-block;vertical-align:top;margin:4px;padding:8px 12px;border:1px solid #B5CBE0;border-radius:4px;background:#D6E6F5"><span style="white-space:nowrap"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/DSvMCAwsufMyZeLyt-actor-bDwOBg7K2urZ6Vo2L-Whkqyd3AvI-pdf-to-markdown-api-logo.png" width="20" height="20" alt="" style="vertical-align:middle">&nbsp;&nbsp;<a href="https://apify.com/clearpath/pdf-to-markdown-api" style="color:#0F2A44;font-size:13px;font-weight:700;text-decoration:none">PDF to Markdown</a></span><br><span style="color:#3A5675;font-size:12px;white-space:nowrap">You are here</span></span><span style="display:inline-block;vertical-align:top;margin:4px;padding:8px 12px;border:1px solid #B5CBE0;border-radius:4px;background:#EAF2FA"><span style="white-space:nowrap"><img src="https://api.apify.com/v2/key-value-stores/rfpznBPgVbyLYqNaQ/records/cendoj-scraper-icon-6a6cd31a08d4.png" width="20" height="20" alt="" style="vertical-align:middle">&nbsp;&nbsp;<a href="https://apify.com/clearpath/cendoj-scraper" style="color:#0F2A44;font-size:13px;font-weight:700;text-decoration:none">CENDOJ</a></span><br><span style="color:#3A5675;font-size:12px;white-space:nowrap">Spanish case law</span></span><span style="display:inline-block;vertical-align:top;margin:4px;padding:8px 12px;border:1px solid #B5CBE0;border-radius:4px;background:#EAF2FA"><span style="white-space:nowrap"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/DSvMCAwsufMyZeLyt-actor-VbuFL7OPo1bw8y9j6-hbg2CKspQv-companies-house-scraper-logo.png" width="20" height="20" alt="" style="vertical-align:middle">&nbsp;&nbsp;<a href="https://apify.com/clearpath/companies-house-scraper" style="color:#0F2A44;font-size:13px;font-weight:700;text-decoration:none">Companies House</a></span><br><span style="color:#3A5675;font-size:12px;white-space:nowrap">UK companies &amp; directors</span></span><span style="display:inline-block;vertical-align:top;margin:4px;padding:8px 12px;border:1px solid #B5CBE0;border-radius:4px;background:#EAF2FA"><span style="white-space:nowrap"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/DSvMCAwsufMyZeLyt-actor-JsEa6fFyiVk0V2Ehw-VPD6udQ5OD-google-ads-transparency-scraper.png" width="20" height="20" alt="" style="vertical-align:middle">&nbsp;&nbsp;<a href="https://apify.com/clearpath/google-patents-scraper" style="color:#0F2A44;font-size:13px;font-weight:700;text-decoration:none">Google Patents</a></span><br><span style="color:#3A5675;font-size:12px;white-space:nowrap">Patents, claims and citations</span></span><span style="display:inline-block;vertical-align:top;margin:4px;padding:8px 12px;border:1px solid #B5CBE0;border-radius:4px;background:#EAF2FA"><span style="white-space:nowrap"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/DSvMCAwsufMyZeLyt-actor-eBWg2hsheVt3iAUeQ-X5m72jNYMX-icon.png" width="20" height="20" alt="" style="vertical-align:middle">&nbsp;&nbsp;<a href="https://apify.com/clearpath/us-business-entity-search" style="color:#0F2A44;font-size:13px;font-weight:700;text-decoration:none">Business Entity Search</a></span><br><span style="color:#3A5675;font-size:12px;white-space:nowrap">US company registry records</span></span>
</td></tr>
</table>

### Support

- **Issues & Bugs**: Use the [Issues tab](../../issues) on this Actor's page
- **Feature Requests**: Open an issue or contact via email
- **Email**: max@mapa.slmail.me
- **Response Time**: Usually within 24 hours

### Legal Compliance

This Actor processes documents that you provide. You are responsible for:

- Having the right to process the documents you submit
- Complying with applicable data protection regulations (GDPR, CCPA, etc.)
- Ensuring processed content doesn't violate any terms of service

The Actor does not store your PDFs beyond the processing duration.

***

[**Start Converting PDFs to Markdown Now**](https://console.apify.com/actors/your-username~pdf-to-markdown)

***

*Transform your document workflows with accurate, AI-powered PDF extraction.*

# Actor input Schema

## `pdfFile` (type: `string`):

Upload a single PDF file

## `pdfUrls` (type: `array`):

List of URLs to PDF files (for batch processing)

## `pdfBase64Items` (type: `array`):

Base64-encoded PDFs with filenames (for API calls)

## `outputMode` (type: `string`):

markdown = text only, markdown_images = with extracted images as base64, full = includes raw JSON content

## `language` (type: `string`):

Primary language in PDFs (improves OCR accuracy for non-English documents)

## Actor input object example

```json
{
  "pdfUrls": [
    "https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf"
  ],
  "outputMode": "markdown",
  "language": "en"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pdfUrls": [
        "https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearpath/pdf-to-markdown-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "pdfUrls": ["https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("clearpath/pdf-to-markdown-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pdfUrls": [
    "https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf"
  ]
}' |
apify call clearpath/pdf-to-markdown-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clearpath/pdf-to-markdown-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bDwOBg7K2urZ6Vo2L/builds/pBL8FBm32yImjfulM/openapi.json
