# PDF Text Extractor — Text, Pages & Metadata from Any PDF Link (`highbrow_fame/pdf-text-extractor`) Actor

The text of any PDF at a public link — whole or page by page — with page count, word count and metadata. Scanned PDFs without text are flagged and not charged.

- **URL**: https://apify.com/highbrow\_fame/pdf-text-extractor.md
- **Developed by:** [yestrue](https://apify.com/highbrow_fame) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 pdf delivereds

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 — Text, Pages & Metadata from Any PDF Link

Get the text out of PDF files at public links — as one text, or page by page — with page count, word count and the document's metadata: title, subject, keywords, the program that made it, and creation and modification dates. Many PDFs per run.

**Why this one**

- 📄 **Whole documents, fast.** A 75-page research paper — 38,097 words — read in seconds in a live test run.
- 📑 **Page by page if you need it.** Switch on **Text page by page** for a list with one entry per page, for citations or chunking.
- 🖨️ **Scanned PDFs are flagged, not charged.** A PDF without a text layer comes back as `NO_TEXT` — it would need OCR — instead of an empty success you pay for.
- 🧾 **Honest results.** A link that returns a web page instead of a PDF, a 404, or a file over 100 MB comes back as a free record with the reason.
- 🔒 **No personal data.** The document's Author field is not delivered.

### What you get

For every PDF:

| Field | What it is |
|---|---|
| `url`, `finalUrl` | the link, and where it ended up after redirects |
| `text` | the full text |
| `pages` | with **Text page by page** on: the text of each page |
| `pageCount`, `pagesRead`, `characters`, `words`, `fileBytes` | size |
| `title`, `subject`, `keywords` | from the document's properties, when set |
| `creator`, `producer`, `pdfVersion`, `language` | how it was made |
| `createdAt`, `modifiedAt` | dates from the document's properties |
| `textTruncated` | when **Max text length** cut the text |
| `scrapedAt`, `status`, `error` | when it was read, and why a link gave nothing |

#### Example

A real record from a live run, 24 September 2026 (text shortened):

```json
{
  "url": "https://arxiv.org/pdf/1706.03762",
  "pageCount": 15,
  "characters": 39619,
  "words": 6120,
  "creator": "LaTeX with hyperref",
  "producer": "pdfTeX-1.40.25",
  "createdAt": "2024-04-10T21:11:43Z",
  "text": "Provided proper attribution is provided, Google hereby grants permission to\nreproduce the tables and figures in this paper solely for use in journalistic or\nsch…",
  "status": "OK"
}
```

### How to use it

1. Add **PDF links**, one per line.
2. Optionally limit **Max pages per PDF**, switch on **Text page by page**, or cap the text with **Max text length**.
3. Press **Start**, and download the results from the **Output** tab as JSON, CSV or Excel.

Feed the text to an AI model, a search index or a spreadsheet — or call it from the Apify API, Make, Zapier or n8n, or from an AI agent through the Apify MCP server.

### Pricing

You are charged **per PDF delivered** — see the price on this page. Scanned PDFs without text, links that are not PDFs, missing files and files over 100 MB are free.

### FAQ

**Does it read scanned PDFs?** No — it reads the text layer. Scanned pages have none and are reported as `NO_TEXT`, free.

**Are tables kept?** Their text is, in reading order; the table layout is not.

**Can it read password-protected PDFs?** No.

**Like it?** A short review on the Store page helps other people find this Actor. Something missing or broken? Tell us on the Issues tab — we read every one.

# Actor input Schema

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

Links to PDF files, one per line. Up to 100 MB each.

## `maxPagesPerPdf` (type: `integer`):

Read only the first N pages. 0: all pages.

## `includePages` (type: `boolean`):

Also deliver the text as a list with one entry per page.

## `maxTextLength` (type: `integer`):

Cut the full text after this many characters. 0: no limit.

## `maxConcurrency` (type: `integer`):

How many PDFs to read at the same time.

## `proxyConfiguration` (type: `object`):

Used only when a site turns a download down: the first try goes out directly.

## Actor input object example

```json
{
  "pdfUrls": [
    "https://arxiv.org/pdf/1706.03762"
  ],
  "maxPagesPerPdf": 0,
  "includePages": false,
  "maxTextLength": 0,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every result as a JSON record, with a status for each input.

## `resultsCsv` (type: `string`):

The same records as CSV, for a spreadsheet.

# 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://arxiv.org/pdf/1706.03762"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("highbrow_fame/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 = {
    "pdfUrls": ["https://arxiv.org/pdf/1706.03762"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("highbrow_fame/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 '{
  "pdfUrls": [
    "https://arxiv.org/pdf/1706.03762"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call highbrow_fame/pdf-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,highbrow_fame/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/03TNiElhAynx1OEaG/builds/Ol9Udcjs6Mgug4ZV3/openapi.json
