# PDF Text Extractor API — Bulk PDF URLs to Text (`kadro/pdf-text-extractor-api`) Actor

Extract text, page count, title and word count from PDF links. Per-page output optional. Text PDFs only (no OCR).

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

## Pricing

$3.00 / 1,000 pdf extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 API: Bulk PDF URLs to Text

Give it links to text-based PDF files and get back the full text, page count, title, creation date and word count, with an optional list of the text of each page. Fast and cheap for contracts, papers, manuals and reports that are not scanned.

### What you get

| Field | Meaning |
|---|---|
| `url` | The PDF link you gave |
| `pages_total` | Pages in the PDF |
| `pages_read` | Pages actually read (limited by `maxPages`) |
| `title` | Title from the PDF metadata, or `null` |
| `creation_date` | Creation date from the metadata, or `null` |
| `word_count` | Words in the extracted text |
| `text` | The extracted text |
| `pages` | List of `{page, text}` (only with `perPage`) |

Real example (13 Oct 2026, default input):

```json
{"url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", "pages_total": 1, "pages_read": 1, "title": null, "creation_date": "2007-02-23 17:56:37+02:00", "word_count": 3, "text": "Dummy PDF file"}
```

PDFs that cannot be read are skipped and not charged, so every row you pay for contains text.

### How to use it in 3 steps

1. Paste the PDF links (public http(s), up to 100 per run, 20 MB each).
2. Optionally switch on `perPage` to also get the text of each page, and set `maxPages` (1 to 300).
3. Run it and read the text from the dataset.

### Pricing

**$3 per 1,000 PDFs** ($0.003 per PDF, whatever its number of pages up to `maxPages`). Example: 500 PDFs = $1.50. You pay only for PDFs with extracted text; scanned, encrypted, broken or unreachable PDFs are free.

### Integrations

- **Apify API and clients**: start the Actor from any language with the Apify API (or the JavaScript and Python clients) and read the dataset when the run ends.
- **Make, n8n and Zapier**: use the official Apify modules, pick `kadro/pdf-text-extractor-api`, pass the input as JSON and map the dataset rows to your next step.
- **Google Sheets**: send the dataset to a sheet with the Apify integration or export it as CSV or Excel from the Console.
- **MCP (Claude, Cursor and other AI agents)**: add the Apify MCP server `https://mcp.apify.com/?actors=kadro/pdf-text-extractor-api` and ask, for example: "Extract the text of these 30 PDF reports, page by page, and tell me which mention "renewal"."

### FAQ

**Does it read scanned PDFs?**
No, there is no OCR here. Scanned PDFs are skipped for free. Use our Bulk OCR Actor for them.

**Do I get tables or Markdown?**
No. Layout and tables come out as plain text. Markdown, table extraction and chunks are not available yet.

**What is not charged?**
Encrypted PDFs, files that are not PDFs, PDFs without text, files too big and blocked addresses.

**Is it legal and private?**
It only downloads public links you provide. Make sure you may process the documents; the text is stored only in your run.

### Limitations

- Text PDFs only: no OCR, so scanned or password-protected PDFs are skipped.
- No Markdown, no table structure and no RAG chunks: output is plain text.
- Max 100 PDFs per run, 20 MB each, up to 300 pages read per PDF.
- Only public http(s) addresses; private and local addresses are blocked.

### Other Kadro tools

- [Bulk OCR](https://apify.com/kadro/bulk-ocr-image-pdf-to-text)
- [Article Text Extractor](https://apify.com/kadro/article-text-extractor)
- [Website to PDF](https://apify.com/kadro/website-to-pdf)
- [Website to Markdown + llms.txt](https://apify.com/kadro/website-to-markdown-llms-txt)

### Credits and license

Built on `pypdf` (BSD license).

Found it useful? Please leave a review ⭐ — it helps a lot. Bugs or feature ideas: open an issue, I answer within 24 h.

# Actor input Schema

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

Public http(s) links to PDF files (max 100, 20 MB each). Scanned image-only PDFs are not supported (no OCR).

## `perPage` (type: `boolean`):

Adds a 'pages' list with the text of each page.

## `maxPages` (type: `integer`):

Reads at most this many pages of each PDF (1-300).

## Actor input object example

```json
{
  "pdfUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "perPage": false,
  "maxPages": 100
}
```

# Actor output Schema

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

One row per result.

# 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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kadro/pdf-text-extractor-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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("kadro/pdf-text-extractor-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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ]
}' |
apify call kadro/pdf-text-extractor-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kadro/pdf-text-extractor-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/aLC1mBxudzhY1WgkN/builds/tcJd1hPg3wcpzPITR/openapi.json
