# PDF Text Extractor: Markdown & Metadata | $1.00 per 1,000 PDFs (`v0iddo/mint-pdf-text-extractor`) Actor

Extract the text of PDF files page by page, as plain text or as Markdown with headings, bold, lists and paragraphs, ready for LLM and search pipelines. Each PDF also gives its page count, title, author, dates and other metadata. Links or uploads. Batch mode: process up to 1000 items per run.

- **URL**: https://apify.com/v0iddo/mint-pdf-text-extractor.md
- **Developed by:** [vøiddo](https://apify.com/v0iddo) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 result produceds

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 Text Extractor: Markdown & Metadata | $1.00 per 1,000 PDFs

Extract the text of PDF files page by page, as plain text or as Markdown with headings, bold, lists and paragraphs, ready for LLM and search pipelines. Each PDF also gives its page count, title, author, dates and other metadata. Links or uploads.

### What it does

Extract the text of a PDF page by page as plain text or Markdown, with page selection, an optional layout-preserving mode and the document metadata. It runs in seconds, needs no login and no API key of your own, and can process up to 1000 items in one run (batch mode).

Examples:

- All pages of a two-page PDF
- Page 2 only, layout mode
- All pages as Markdown

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_url` | string | no | Public http(s) URL of the file. The PDF: base64 string (or data: URI) or {"url": "https://..."}. Up to 10 MB. |
| `file_urls` | array | no | Many files in one run: one public http(s) URL per line, up to 1000. Each file is processed on its own with the options below and gives its own row. |
| `file_text` | string | no | The file content pasted as text. Use this or file_url. |
| `file_base64` | string | no | The file content as base64 (or a data: URI). Use this or file_url. |
| `pages` | string | no | Pages to extract, e.g. '1-3,7' or '5-' (default: all pages). |
| `layout` | boolean | no | Preserve the visual layout (columns, spacing) instead of reading order. |
| `format` | select | no | text: the plain text of each page. markdown: headings, bold and italic, lists and paragraphs as Markdown, page headers and footers that repeat on most pages left out (layout does not apply). Allowed: text, markdown. |
| `items` | array | no | Optional. A list of input objects with the same fields as above; every object is processed in its own right and the top-level fields act as shared defaults. Leave empty to process the single input above (up to 1000 items per run). |

Example input:

```json
{
  "file_urls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "format": "markdown"
}
```

### Output

Each processed item adds one row to the dataset with the result fields ({page_count, pages: \[{n, text}] (Markdown: \[{n, markdown}]), chars, metadata: {title, author, subject, keywords, creator, producer, created, modified}}; meta.note when the PDF has no text layer.), plus `credits` and `ms`. A failed item adds a row with `error` and `status` instead; the run fails only when every item failed.

### Limits

- Up to 30 seconds per item.
- Input size up to 10,000,000 bytes per item.
- URLs must be public http(s) addresses; private and local addresses are refused, robots.txt is respected where pages are fetched.
- No logins, no captcha solving, no personal-data lookups.
- Each run sends one short usage record to the developer: the Actor and run IDs, the number of results, whether the run succeeded (and if not, the kind of error, such as "blocked" or "input problem"), whether the account is on a paid Apify plan, how the run was started (for example from the Console, the API or a schedule) and a one-way fingerprint of the account (a hash, not the account ID), so that repeat runs of one account count once. It contains nothing from your input or results.

### Pricing

You pay per successfully processed item (the current price is on the Pricing tab). A failed item is not charged.

### Run it through the API

Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("v0iddo/mint-pdf-text-extractor").call(run_input={"file_urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "format": "markdown"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript, with the `apify-client` package:

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('v0iddo/mint-pdf-text-extractor').call({"file_urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "format": "markdown"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

One HTTP call that waits for the run and returns the rows (for runs that finish within 5 minutes):

```bash
curl -X POST "https://api.apify.com/v2/acts/v0iddo~mint-pdf-text-extractor/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"file_urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "format": "markdown"}'
```

### Use it from an agent (MCP)

Claude, Cursor, VS Code and other MCP clients can call this actor as a tool through the Apify MCP server. Add it to the client's MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=v0iddo/mint-pdf-text-extractor",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

### FAQ

#### Do I need an account or an API key?

No key of your own. You only need an Apify account to start the actor.

#### How many items can one run process?

One item from the fields above, or up to 1,000 in **items** (batch mode) or one per URL in **file_urls**. Each item becomes one row in the dataset.

#### How am I charged?

Per successfully processed item, at the price on the Pricing tab for your Apify plan. A failed item is not charged, the platform usage of the run is included, and your spending limit for a run is always respected.

#### Where are the results?

In the run's dataset: export it as JSON, CSV, Excel or HTML from the Output tab, or read it through the API.

#### Can I run it on a schedule or from another tool?

Yes. Save the input as a task and schedule it in the Apify Console, or start it from Make, Zapier, n8n, a webhook or the API calls above.

#### Something is missing or wrong. Where do I report it?

Open an issue on the Issues tab of this actor with the run link, or write to data@voiddo.com.

### Other ways to use it

The same engine is also available as an API at https://data.voiddo.com and as browser tools at https://utils.voiddo.com.

### Support

Questions or a case that does not work: data@voiddo.com. We answer within one business day.

# Actor input Schema

## `file_url` (type: `string`):

Public http(s) URL of the file. The PDF: base64 string (or data: URI) or {"url": "https://..."}. Up to 10 MB.

## `file_urls` (type: `array`):

Many files in one run: one public http(s) URL per line, up to 1000. Each file is processed on its own with the options below and gives its own row.

## `file_text` (type: `string`):

The file content pasted as text. Use this or file_url.

## `file_base64` (type: `string`):

The file content as base64 (or a data: URI). Use this or file_url.

## `pages` (type: `string`):

Pages to extract, e.g. '1-3,7' or '5-' (default: all pages).

## `layout` (type: `boolean`):

Preserve the visual layout (columns, spacing) instead of reading order.

## `format` (type: `string`):

text: the plain text of each page. markdown: headings, bold and italic, lists and paragraphs as Markdown, page headers and footers that repeat on most pages left out (layout does not apply).

## `items` (type: `array`):

Optional. A list of input objects with the same fields as above; every object is processed in its own right and the top-level fields act as shared defaults. Leave empty to process the single input above (up to 1000 items per run).

## Actor input object example

```json
{
  "file_urls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "layout": false,
  "format": "markdown"
}
```

# Actor output Schema

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

One dataset row per processed item.

# 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 = {
    "file_urls": [
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    ],
    "format": "markdown"
};

// Run the Actor and wait for it to finish
const run = await client.actor("v0iddo/mint-pdf-text-extractor").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 = {
    "file_urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"],
    "format": "markdown",
}

# Run the Actor and wait for it to finish
run = client.actor("v0iddo/mint-pdf-text-extractor").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 '{
  "file_urls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "format": "markdown"
}' |
apify call v0iddo/mint-pdf-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,v0iddo/mint-pdf-text-extractor"
        }
    }
}
```

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/KACQlAyLz1JZHzP7l/builds/SWTWUy0cpWs3BcOnx/openapi.json
