# PDF Extractor & Parser – Bulk PDF to Text with Metadata (`forevertools/pdf-to-text-extractor`) Actor

PDF text extraction in bulk (PDF scraper, reader & converter): extract clean text from PDFs by URL — full text or page by page, plus title, author, dates, page & word counts and a scanned-PDF flag. Document-to-text conversion for LLM/RAG pipelines. Flat price per PDF.

- **URL**: https://apify.com/forevertools/pdf-to-text-extractor.md
- **Developed by:** [Forever Tools](https://apify.com/forevertools) (community)
- **Categories:** AI, Developer tools
- **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 to Text Extractor (Bulk, with Metadata)

Turn a list of PDF links into clean text. You paste direct PDF URLs, and you get one dataset row per PDF with the **full text**, optional **page-by-page text**, and **metadata**: title, author, subject, creator, producer, creation and modification dates, page count, word count, character count and file size. It is built for feeding LLMs and RAG pipelines, search indexes, research and document analysis, without running your own PDF parsing code.

### Extract text from PDF URLs in bulk

Give the actor a list of `pdfUrls`. It downloads each file, reads the text layer and returns a row per document. Several PDFs are processed in parallel (`maxConcurrency`, 1 to 10, default 5). Files that are too large, missing or not actually PDFs come back as rows with an `error` field and are not charged.

#### Input example

```json
{
  "pdfUrls": [
    "https://arxiv.org/pdf/1706.03762",
    "https://example.com/reports/annual-2025.pdf"
  ],
  "perPage": true,
  "maxPages": 200,
  "maxFileSizeMb": 50,
  "maxConcurrency": 5
}
```

| Field | Default | What it does |
|---|---|---|
| `pdfUrls` (required) | | Direct links to PDF files |
| `perPage` | `false` | Adds a `pages` array with the text of each page |
| `maxPages` | 500 | Only extract the first N pages of each PDF |
| `maxFileSizeMb` | 50 (max 200) | Skip PDFs larger than this |
| `maxConcurrency` | 5 (1 to 10) | PDFs processed in parallel |

### PDF to text with metadata: output

One realistic result row (text shortened):

```json
{
  "url": "https://arxiv.org/pdf/1706.03762",
  "pageCount": 15,
  "pagesExtracted": 15,
  "title": null,
  "author": null,
  "wordCount": 6120,
  "likelyScanned": false,
  "text": "Provided proper attribution is provided, Google hereby grants permission ...",
  "pages": [{ "page": 1, "text": "..." }]
}
```

Other fields in the dataset schema: `subject`, `creator`, `producer`, `createdAt`, `modifiedAt` (ISO timestamps), `fileSizeBytes`, `charCount`, `contentType` (only when the response was not a PDF) and `error`. Metadata fields are `null` when the PDF does not contain them, as with `title` and `author` above. `pages` appears only when `perPage` is on.

### Use cases

- **Build a RAG or LLM knowledge base** from reports, papers and manuals. Turn on `perPage` to get page-numbered chunks you can cite.
- **Bulk-index contracts, invoices and filings** for full-text search.
- **Extract PDF metadata** (author, dates, page count) across a document library.
- **Triage a PDF batch.** `likelyScanned` flags files that are mostly images, so you know which need OCR before you send them to a language model.
- **Word and page statistics** for research corpora using `wordCount`, `charCount` and `pageCount`.

### Pricing: how much does it cost to convert PDFs to text?

**$0.003 per successfully extracted PDF**, flat, regardless of page count (up to `maxPages`). No subscription.

- 100 PDFs = $0.30
- 1,000 PDFs = $3.00
- 10,000 PDFs = $30.00

Failed rows (HTTP errors, not a PDF, too large) are not charged. Apify platform compute usage is separate from the per-PDF price; check your run's cost in the console.

### Limitations

- **No OCR.** Scanned or image-only PDFs have no text layer. They are flagged `likelyScanned: true` (fewer than about 5 words per page on average) and the text will be empty or very short.
- **Password-protected PDFs are not supported** and return an `error` row.
- **Direct URLs only.** The link must return the PDF file itself, not a web page that embeds a viewer. Each download times out after 60 seconds.
- **Layout is not preserved.** Text comes out in reading order; tables become plain text lines and figures are ignored.
- **Size and page caps.** Files above `maxFileSizeMb` are skipped, and only the first `maxPages` pages are read.
- Only process documents you are allowed to access and use.

### FAQ

**How do I extract text from a PDF URL?** Put the direct link in `pdfUrls` and run the actor. The `text` field in the dataset holds the full document text.

**Can I convert many PDFs to text at once?** Yes. Add as many URLs as you need; they run in parallel up to `maxConcurrency`.

**Does it OCR scanned PDFs?** No. Scanned files are flagged `likelyScanned: true` so you can route them to an OCR tool.

**Am I charged for failed downloads or bad files?** No. Only successfully extracted PDFs are billed at $0.003 each.

**How do I get text per page for citations?** Set `perPage` to `true`; each row then includes `pages` with `page` numbers and text.

**Can it read metadata like author and creation date?** Yes: `title`, `author`, `subject`, `creator`, `producer`, `createdAt` and `modifiedAt`, when the PDF includes them.

Built and maintained with AI assistance. Problems or requests: use the Issues tab.

### Related tools

Other actors by the same developer (same flat pay-per-result pricing, no subscription):

- [Apple App Store Reviews Scraper (Multi-Country)](https://apify.com/forevertools/apple-app-store-reviews)
- [Article Extractor – Clean Text & Markdown for LLM/RAG](https://apify.com/forevertools/article-extractor)
- [Company Jobs Scraper: Workday, Greenhouse, Lever, Ashby](https://apify.com/forevertools/ats-company-jobs)
- [Bulk Domain Checker — WHOIS/RDAP, DNS, SPF/DMARC, SSL Expiry](https://apify.com/forevertools/domain-whois-dns-ssl)
- [Bulk PageSpeed Insights & Core Web Vitals Checker](https://apify.com/forevertools/pagespeed-core-web-vitals)
- [Website SEO Audit Crawler](https://apify.com/forevertools/website-seo-audit)
- [Sitemap Extractor & Bulk URL Status Checker](https://apify.com/forevertools/sitemap-url-status-checker)
- [Website Tech Stack Detector (CMS, Framework, Analytics)](https://apify.com/forevertools/website-tech-stack-detector)
- [Website Screenshot – Bulk Full Page PNG, JPEG & PDF](https://apify.com/forevertools/website-screenshot)

### Integrations

Run it from the Apify API, a schedule, or no-code tools: the Apify apps for **Zapier**, **Make** and **n8n** can start any public actor ("Run Actor") and read its dataset. AI agents can call it through the **Apify MCP server**.

# Actor input Schema

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

Direct http(s) links to PDF files (e.g. https://arxiv.org/pdf/1706.03762). One row per PDF: full `text`, word/char/page counts, document metadata (title, author, dates) and a `likelyScanned` flag for image-only PDFs (no OCR). Links that are not PDFs, too large, or fail to download return a row with `error` and are not charged.

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

Adds a `pages` array with the text of each page (useful for citations/chunking).

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

Only extract the first N pages of each PDF.

## `maxFileSizeMb` (type: `integer`):

Skip PDFs larger than this.

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

PDFs processed in parallel.

## Actor input object example

```json
{
  "pdfUrls": [
    "https://arxiv.org/pdf/1706.03762"
  ],
  "perPage": false,
  "maxPages": 500,
  "maxFileSizeMb": 50,
  "maxConcurrency": 5
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("forevertools/pdf-to-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"] }

# Run the Actor and wait for it to finish
run = client.actor("forevertools/pdf-to-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"
  ]
}' |
apify call forevertools/pdf-to-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,forevertools/pdf-to-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/CVTEM5fcPtdDSahuA/builds/cg68KfDj3umbwQAwF/openapi.json
