# PDF Text Metadata Extractor (`snappytools/pdf-text-metadata-extractor`) Actor

Give it the link to a public PDF and it returns the text of every page, the page count and the document metadata (title, author, creator, producer, creation and modification dates) as one record. You paste a list of PDF links into PDF URLs. You get back one row per link, in the same order.

- **URL**: https://apify.com/snappytools/pdf-text-metadata-extractor.md
- **Developed by:** [Snappy](https://apify.com/snappytools) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.80 / 1,000 results

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, page count and metadata from PDF URLs

Paste the links to public PDFs and this PDF text extractor returns the text of every page, the page count and the document metadata as one record per link.

You paste a list of PDF links into **PDF URLs**. You get back one row per link, in the same order, with `status`, `pageCount`, `title`, `author`, `text`, `wordCount` and a `pages` array holding `pageNumber` and `text` for each page. A link that fails still gets a row with a plain reason, so one bad URL never loses the rest.

Run it on a schedule to recheck the same documents and compare `modificationDate` or `fileSizeBytes`.

### Why this one

- **One record per URL.** Every link you give gets exactly one row, and a failed link comes back with a `reason` you can read.
- **Order is kept.** Row 1 is your first URL, row 2 your second, so matching results back is simple.
- **Text per page, not one blob.** The `pages` array lets you cite or chunk by page number, and you can switch it off to get only the joined `text`.
- **Metadata as clean timestamps.** `creationDate` and `modificationDate` come back as ISO 8601 dates.
- **Pay per result.** $4.80 per 1,000 results, and runs with no results cost nothing.

### Quick start

```json
{
  "pdfUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
    "https://www.irs.gov/pub/irs-pdf/fw4.pdf"
  ],
  "maxPages": 5,
  "includePageText": true
}
```

In a test run on 15 Nov 2026, this returned three records, one per PDF, each with text for up to five pages plus metadata.

### What you can use it for

| Who | What for |
|---|---|
| AI agent builders | Feed PDF text into a model by page, with the source link kept |
| Compliance teams | Pull the text of public forms and policies and check for changes |
| Researchers | Bulk-read public reports and papers into a spreadsheet |
| Automation users | Grab the title, author and dates of PDFs found by another workflow |

### How to use it

1. Click **Try for free**.
2. In **PDF URLs**, add one public PDF link per line, e.g. `https://www.irs.gov/pub/irs-pdf/fw9.pdf`. You can add up to 100.
3. Set **Max pages per PDF** if you only need the first few pages, e.g. `5`. The default is 50 and the maximum is 500.
4. Untick **Include text per page** if the joined `text` field is enough.
5. Click **Start**.

Tip: save the input as a task and add it to **Schedules** to recheck the same PDFs every week.

### What data you get

Each record describes one input URL.

| Field | What it is | Example |
|---|---|---|
| `id` | Stable id for the record | `pdf-c712e96563e8f8b0` |
| `input` | The value you passed in | `https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf` |
| `url` | The PDF URL that was read | `https://www.irs.gov/pub/irs-pdf/fw9.pdf` |
| `status` | `ok` when the PDF was read, otherwise a failure status | `ok` |
| `reason` | Why it failed, empty when ok | \`\` |
| `pageCount` | Total pages in the PDF | `6` |
| `pagesExtracted` | Pages whose text was read | `5` |
| `title` | Document title from metadata | `Form W-9 (Rev. March 2024)` |
| `author` | Author from metadata | `SE:W:CAR:MP` |
| `subject` | Subject from metadata | `Request for Taxpayer Identification Number and Certification` |
| `keywords` | Keywords from metadata | `Fillable` |
| `creator` | App that created the file | `Designer 6.5` |
| `producer` | App that wrote the PDF | `OpenOffice.org 2.1` |
| `pdfVersion` | PDF format version | `1.7` |
| `creationDate` | Created, ISO 8601 | `2024-03-06T13:18:13.000Z` |
| `modificationDate` | Last modified, ISO 8601 | `2024-03-06T13:18:13.000Z` |
| `fileSizeBytes` | Downloaded file size in bytes | `0` |
| `wordCount` | Words across the extracted pages | `5798` |
| `text` | All extracted text | `Dummy PDF file` |
| `pages` | Array of `pageNumber` and `text` | `[{"pageNumber":1,"text":"Dummy PDF file"}]` |
| `checkedAt` | When it was checked, ISO 8601 | `2026-11-15T09:28:52.248Z` |
| `source` | Where the data came from and its link | `{"name":"Public PDF URL","url":"https://www.irs.gov/pub/irs-pdf/fw9.pdf"}` |

Fields a PDF doesn't carry, such as `title` or `modificationDate`, come back as `null`.

### Pricing

| Event | Price |
|---|---|
| Result (one record per PDF URL) | $0.0048 |

No start fee. Runs with no results cost nothing.

| Run | Cost |
|---|---|
| 100 results | $0.48 |
| 1,000 results | $4.80 |
| 10,000 results | $48.00 |

### Good to know

- **Limits:** up to 100 URLs per run and 500 pages of text per PDF. Pages after **Max pages per PDF** are counted in `pageCount` but their text is skipped.
- **Where the data comes from:** the public PDF file at each URL you give. Nothing else is looked up.
- **Direct links only:** pass the link to the PDF file itself, not a web page that links to it.
- **Scanned PDFs:** there is no OCR. A scanned image PDF returns metadata and a low or zero `wordCount`.
- **Locked files:** password-protected PDFs and links behind a login are not read.
- **Not affiliated:** this tool isn't affiliated with or endorsed by the owners of the PDFs you read.

### FAQ

**Is there a PDF to text API?** Yes. Every Apify Actor runs through the Apify API, so you can send a list of PDF links and get the text and metadata back as JSON.

**Can I export PDF text to Excel or CSV?** Yes. Download the results as Excel, CSV or JSON from the Output tab. You get one row per PDF.

**Does it work on a web page that links to a PDF?** No. Pass the direct link to the PDF file itself.

**Can I get only the joined text?** Yes. Untick **Include text per page** and each record keeps `text` and the metadata without the `pages` array.

### Getting the data out

Download results as Excel, CSV or JSON from the Output tab. Send them to Google Sheets, Slack, Zapier, Make or webhooks from the **Integrations** tab. Every run is also available through the Apify API, and you can run it on a timetable from **Schedules**.

### Questions or problems

Open an issue on the **Issues** tab and include the run link. I reply within one business day.

### Related tools

- [Bulk Email Syntax and MX Validator](https://apify.com/snappytools/email-syntax-mx-validator): check email addresses in bulk
- [TED Europa Tender Scraper](https://apify.com/snappytools/ted-europa-tender-scraper): export public tenders from TED Europa
- [Companies House Company Scraper](https://apify.com/snappytools/companies-house-uk-scraper): export UK company records

# Actor input Schema

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

List of public http(s) links that point straight at a PDF file, one per line, e.g. https://www.irs.gov/pub/irs-pdf/fw9.pdf. Maximum 100 per run. Each URL gives exactly one output record, in the same order.

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

Highest number of pages to read text from in each PDF, e.g. 50. Pages after this are counted in pageCount but their text is skipped. Between 1 and 500.

## `includePageText` (type: `boolean`):

When true (default) each record has a pages array with pageNumber and text. Set to false to return only the joined text and metadata.

## Actor input object example

```json
{
  "pdfUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
    "https://www.irs.gov/pub/irs-pdf/fw4.pdf"
  ],
  "maxPages": 50,
  "includePageText": true
}
```

# 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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
        "https://www.irs.gov/pub/irs-pdf/fw4.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("snappytools/pdf-text-metadata-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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
        "https://www.irs.gov/pub/irs-pdf/fw4.pdf",
    ] }

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

```

## MCP server setup

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