# PDF Intake Check — Page Audit & Text Chunks (`wwaillc/my-actor`) Actor

Check PDFs before AI ingestion. Flag pages with missing or sparse extractable text and export page-referenced text chunks plus a JSON audit. Base64 input; no OCR or layout reconstruction. Experimental tool.

- **URL**: https://apify.com/wwaillc/my-actor.md
- **Developed by:** [WestWood AI LLC](https://apify.com/wwaillc) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 pdf auditeds

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 Intake Check — Page Audit & Text Chunks

Check what text your PDF exposes before sending it into an AI search or summarization workflow. Returns a page-by-page audit and overlapping text chunks with physical PDF page references.

### Quick start

1. Encode one PDF as base64, without a data-URL prefix.
2. Paste it into `pdfBase64` and run.
3. Open the default dataset for page results. In the default key-value store, open `REPORT` for the complete audit and `CHUNKS` for text chunks.
4. When `reviewRequired` is true, inspect flagged pages before continuing your pipeline.

### Outputs

Dataset rows contain `page`, `status`, `characters`, and `warnings`. Statuses: `text_extracted`, `no_extractable_text`, `sparse_text`, `extraction_error`.

In a verified three-page cloud sample, readable text returned 83 characters, a blank page returned zero characters with `no_extractable_text`, and a page containing Short returned six characters with `sparse_text`. Blank and image-only pages can both return no text; inspect the original before deciding whether OCR is needed.

`REPORT` includes SHA-256, page/character counts, `reviewRequired`, `flaggedPages`, pages, chunks, and limitations. `CHUNKS` contains the same chunk list separately. Chunks include identifier, source, physical page number, start/end character offsets, and text. Offsets start at zero with an exclusive end and refer to extracted text. Chunks use 1,800 characters with 150-character overlap and never cross pages. The current adapter labels the source `document.pdf`; use SHA-256 to distinguish documents. Identical bytes yield stable identifiers with the same parser version.

### Limits

- One PDF per run; at most 20 MB decoded, 300 physical pages, and 2 million extracted characters.
- Sparse means fewer than 40 non-whitespace characters.
- Encrypted PDFs and invalid inputs are rejected; the run is marked failed without a report.
- Parser timeout: 45 seconds. Use at least a 60-second overall timeout; tested memory: 512 MB.
- No OCR, table reconstruction, semantic validation, malware scan, reading-order guarantee, or printed-page-label detection.
- No review flag does not certify complete or correct extraction.

### Data handling

Apify stores run inputs and outputs according to its storage settings. No zero-retention promise. Use synthetic or public documents for this pilot. This tool does not fetch arbitrary URLs or forward text to an external AI model.

### Experimental pilot

Price: $0.02 per completed PDF audit, with platform usage included. One document is one event, regardless of its page count within the stated limits. A completed audit that flags blank or sparse pages is still a billable result. Rejected inputs and parser timeouts do not trigger the document event. The synthetic prefilled example is also billable when run. No separate start or per-page fee. Small cloud cases have been checked; performance on every PDF is not assured.

For reproducible issues, use Apify issues with a synthetic or public sample. Do not post confidential documents or credentials.

# Actor input Schema

## `pdfBase64` (type: `string`):

Base64 PDF, maximum 20 MB decoded. Prefilled synthetic example has a text page and a blank page. Replace it with your document. Apify stores input/output. Price: $0.02 per completed document audit, including flagged documents; no event fee for rejected input.

## Actor input object example

```json
{
  "pdfB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ci9TaXplIDgKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjYxMAolJUVPRgo="
}
```

# Actor output Schema

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

No description

## `report` (type: `string`):

No description

## `chunks` (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 = {
    "pdfBase64": "JVBERi0xLjMKJeLjz9MKMSAwIG9iago8PAovUHJvZHVjZXIgKHB5cGRmKQo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDIKL0tpZHMgWyA0IDAgUiA3IDAgUiBdCj4+CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAyIDAgUgo+PgplbmRvYmoKNCAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Ci9Gb250IDw8Ci9GMSA1IDAgUgo+Pgo+PgovTWVkaWFCb3ggWyAwLjAgMC4wIDMwMCAzMDAgXQovUGFyZW50IDIgMCBSCi9Db250ZW50cyA2IDAgUgo+PgplbmRvYmoKNSAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTEKL0Jhc2VGb250IC9IZWx2ZXRpY2EKPj4KZW5kb2JqCjYgMCBvYmoKPDwKL0xlbmd0aCA5Ngo+PgpzdHJlYW0KQlQgL0YxIDEwIFRmIDIwIDI1MCBUZCAoU3ludGhldGljIFBERiBzYW1wbGU6IHZlcmlmeSB0ZXh0IGV4dHJhY3Rpb24gYmVmb3JlIEFJIGluZ2VzdGlvbi4pIFRqIEVUCmVuZHN0cmVhbQplbmRvYmoKNyAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Cj4+Ci9NZWRpYUJveCBbIDAuMCAwLjAgMzAwIDMwMCBdCi9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCnhyZWYKMCA4CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwMDU0IDAwMDAwIG4gCjAwMDAwMDAxMTkgMDAwMDAgbiAKMDAwMDAwMDE2OCAwMDAwMCBuIAowMDAwMDAwMzAwIDAwMDAwIG4gCjAwMDAwMDAzNzAgMDAwMDAgbiAKMDAwMDAwMDUxNiAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDgKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjYxMAolJUVPRgo="
};

// Run the Actor and wait for it to finish
const run = await client.actor("wwaillc/my-actor").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 = { "pdfBase64": "JVBERi0xLjMKJeLjz9MKMSAwIG9iago8PAovUHJvZHVjZXIgKHB5cGRmKQo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDIKL0tpZHMgWyA0IDAgUiA3IDAgUiBdCj4+CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAyIDAgUgo+PgplbmRvYmoKNCAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Ci9Gb250IDw8Ci9GMSA1IDAgUgo+Pgo+PgovTWVkaWFCb3ggWyAwLjAgMC4wIDMwMCAzMDAgXQovUGFyZW50IDIgMCBSCi9Db250ZW50cyA2IDAgUgo+PgplbmRvYmoKNSAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTEKL0Jhc2VGb250IC9IZWx2ZXRpY2EKPj4KZW5kb2JqCjYgMCBvYmoKPDwKL0xlbmd0aCA5Ngo+PgpzdHJlYW0KQlQgL0YxIDEwIFRmIDIwIDI1MCBUZCAoU3ludGhldGljIFBERiBzYW1wbGU6IHZlcmlmeSB0ZXh0IGV4dHJhY3Rpb24gYmVmb3JlIEFJIGluZ2VzdGlvbi4pIFRqIEVUCmVuZHN0cmVhbQplbmRvYmoKNyAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Cj4+Ci9NZWRpYUJveCBbIDAuMCAwLjAgMzAwIDMwMCBdCi9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCnhyZWYKMCA4CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwMDU0IDAwMDAwIG4gCjAwMDAwMDAxMTkgMDAwMDAgbiAKMDAwMDAwMDE2OCAwMDAwMCBuIAowMDAwMDAwMzAwIDAwMDAwIG4gCjAwMDAwMDAzNzAgMDAwMDAgbiAKMDAwMDAwMDUxNiAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDgKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjYxMAolJUVPRgo=" }

# Run the Actor and wait for it to finish
run = client.actor("wwaillc/my-actor").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 '{
  "pdfBase64": "JVB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IDgKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjYxMAolJUVPRgo="
}' |
apify call wwaillc/my-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wwaillc/my-actor"
        }
    }
}
```

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/1zzJRmic33m0C1i0r/builds/p9k9qd0rUOZlQOS02/openapi.json
