# Batch Vendor COI & Compliance PDF Extractor (`t-williams03/coi-pdf-extractor`) Actor

Batch-extracts structured policy numbers, expiration dates, USD limits, and compliance flags from Vendor Certificate of Insurance (ACORD 25) PDFs.

- **URL**: https://apify.com/t-williams03/coi-pdf-extractor.md
- **Developed by:** [Hemlock Logic](https://apify.com/t-williams03) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $28.00 / 1,000 pdf pages processed

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

## Batch Vendor COI & Compliance PDF Extractor

Batch-extract structured policy numbers, ISO expiration dates, USD coverage limits, and compliance checkboxes from Vendor Certificate of Insurance (ACORD 25) PDFs into a flat, strictly typed JSON, CSV, or Excel table.

Built for compliance teams, operations managers, automation agencies (n8n, Make, Power Automate), and AI agents (MCP) that need reliable, spreadsheet-ready COI data without brittle OCR pipelines.

***

### Why Use This Actor?

- **Reads scanned & rotated PDFs natively:** Uses native multimodal vision extraction to accurately read multi-column ACORD 25 tables, scanned documents, and compliance checkboxes (`Additional Insured`, `Waiver of Subrogation`, `Umbrella Policy`).
- **Strict, flat v1.0 schema:** Every run enforces a flat, additive-only JSON contract (`schema_version: "1.0"`). All dates are normalized to `YYYY-MM-DD`, and all dollar limits are returned as clean whole integers (e.g., `1000000`)—ready for Excel, databases, or downstream rule validators with zero manual cleanup.
- **Batch fault-tolerance:** Processing 50 vendor PDFs at once? If one file is password-protected, corrupted, or exceeds your page cap, the Actor logs a clean status row (`ERROR_ENCRYPTED`, `SKIPPED_TOO_LONG`, `ERROR_FETCH`) at **$0 extraction cost** and finishes the rest of the batch instead of crashing your workflow.
- **AI-Agent & MCP Ready:** Runs with **Limited Permissions** enabled and a clean dataset schema for seamless integration with Claude, Cursor, and automated MCP toolboxes.

***

### Sample Output (Overview Table)

| Status | Insured Vendor | Certificate Holder | GL Expiration | GL Occurrence ($) | GL Aggregate ($) | WC Expiration | Auto Expiration | Add'l Insured | Waiver of Subrogation | Umbrella | Pages |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| `SUCCESS` | ABC Miscellaneous, Inc. | Fulton County Schools | `2024-01-01` | `1000000` | `2000000` | `2024-01-01` | `2024-01-01` | `true` | `true` | `true` | `1` |

***

### Full JSON Output (`schema_version: "1.0"`)

Switch your dataset view to **All fields** (or export via API/JSON) to access all 23 canonical fields:

```json
[
  {
    "insured_vendor_name": "ABC Miscellaneous, Inc.",
    "certificate_holder_name": "Fulton County Schools",
    "producer_agency_name": "ABC Insurance Agency",
    "certificate_date": "2020-12-30",
    "gl_policy_number": "123-2023BC",
    "gl_effective_date": "2023-01-01",
    "gl_expiration_date": "2024-01-01",
    "gl_each_occurrence_limit": 1000000,
    "gl_general_aggregate_limit": 2000000,
    "wc_policy_number": "123-2023BC",
    "wc_expiration_date": "2024-01-01",
    "auto_expiration_date": "2024-01-01",
    "auto_combined_single_limit": 1000000,
    "additional_insured_checked": true,
    "waiver_of_subrogation_checked": true,
    "umbrella_policy_present": true,
    "umbrella_each_occurrence_limit": 2000000,
    "description_of_operations": null,
    "schema_version": "1.0",
    "source_url": "https://resources.finalsite.net/images/v1726669885/fultonschoolsorg/xqkoiokt4ksiqjda0mht/SampleCertiticateofInsuranceACORD25.pdf",
    "extraction_status": "SUCCESS",
    "page_count": 1,
    "error_message": null
  }
]
```

***

### Input Parameters

| Field | Type | Required | Default | Description |
| :--- | :--- | :--- | :--- | :--- |
| `pdf_urls` | Array of Strings | **Yes** | — | Direct URLs to Vendor COI / ACORD 25 PDF files (up to 50 URLs per run). |
| `max_pages_per_pdf` | Integer | No | `10` | Safety cap (1–25). PDFs exceeding this page count are skipped before AI extraction so oversized policy packets don't drain your budget. |
| `include_raw_notes` | Boolean | No | `false` | Set to `true` to extract the full *"Description of Operations / Locations / Vehicles"* text block. |
| `gemini_api_key` | String (Secret) | No | *(Blank)* | Optional Bring-Your-Own-Key (BYOK) field for high-volume agencies. Leave blank to run out of the box. |

***

### Pricing (Pay-Per-Event)

You only pay for pages that are actually extracted:

- **`pdf-page-processed`:** **$0.04 per page**
- **Pre-flight protection:** Unreachable URLs, files over 20 MB, password-protected PDFs, and documents exceeding `max_pages_per_pdf` are caught locally before AI processing—you are **not** charged for skipped or errored files.

***

### Ready-to-Use n8n Workflows & Walkthrough

Skip building the glue logic from scratch. Watch the 3-minute walkthrough or deploy a pre-built workflow powered by `coi-pdf-extractor`:

- **3-Minute Video Walkthrough (ACORD 25 PDF → Google Sheets):** [Watch on YouTube](https://youtu.be/rRiTLvgdvbY) — demonstrates form intake, automatic General Liability expiration status calculation (`ACTIVE`, `EXPIRING_SOON`, `EXPIRED`), deduplicated Google Sheets upserts, and clean error screens.
- **Pro Agency COI Compliance Kit (End-to-End Automation):** [Get the Pro Kit on Polar](https://buy.polar.sh/polar_cl_Ztdp3Tfwoa6tdAMWDDODNdteOvdC7FtPWOxAU0zDX3V) — a production-ready 12-node n8n blueprint by **Hemlock Logic** that watches a Gmail inbox for COI PDF attachments, archives certificates to Google Drive, audits GL/Auto/WC limits and endorsements against client rules, upserts a Master Tracker, alerts Slack, and pre-drafts threaded vendor chase emails (includes Single-Company and Agency Unlimited licenses + Microsoft 365 swap guide).
- **Excel, Make & AI Agents (MCP):** Export results directly from Apify Console as `.xlsx` or `.csv`, connect via Apify's REST API, or attach via the Apify MCP server for structured COI reading in AI assistants.

***

### Data Handling, Privacy & Disclaimer

- **Transient Processing & Zero Creator Retention:** This Actor runs with Apify **Limited Permissions** enabled and writes extracted results exclusively to your own Apify Dataset. Uploaded PDF URLs and document contents are processed in memory during the run and are never stored, logged, or retained on creator-owned servers.
- **AI Sub-Processor & Optional BYOK:** Document pages are processed transiently via Google's paid Gemini Developer API (where inputs are not used to train foundation models). Organizations with strict vendor, Zero Data Retention (ZDR), or custom data-residency requirements can supply their own API key via the optional `gemini_api_key` (BYOK) input field so all processing occurs under their own Google Cloud account.
- **Intended Use & Prohibited Data:** This tool is designed exclusively for standard B2B Certificates of Insurance (ACORD 25 and equivalent commercial documents). **Do not** submit documents containing regulated consumer or sensitive personal data, including Protected Health Information (HIPAA/PHI), Social Security numbers, government ID numbers, or personal financial/banking records.
- **Verification & No Legal/Insurance Advice:** AI-assisted document extraction is provided **"AS IS"** for operational workflow automation only and does not constitute legal, regulatory, or insurance compliance advice. Always independently verify extracted policy numbers, expiration dates, coverage limits, and endorsement checkboxes (`additional_insured_checked`, `waiver_of_subrogation_checked`) against the original PDF before making consequential business, contracting, or compliance decisions.

# Actor input Schema

## `pdf_urls` (type: `array`):

Direct URLs to Vendor Certificate of Insurance (COI / ACORD 25) PDF files.

## `max_pages_per_pdf` (type: `integer`):

Safety cap: PDFs exceeding this page count are skipped before AI extraction.

## `include_raw_notes` (type: `boolean`):

Include the raw 'Description of Operations / Locations / Vehicles' text block.

## `gemini_api_key` (type: `string`):

Optional: provide your own Google Gemini API key.

## Actor input object example

```json
{
  "pdf_urls": [
    "https://resources.finalsite.net/images/v1726669885/fultonschoolsorg/xqkoiokt4ksiqjda0mht/SampleCertiticateofInsuranceACORD25.pdf"
  ],
  "max_pages_per_pdf": 10,
  "include_raw_notes": false
}
```

# 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 = {
    "pdf_urls": [
        "https://resources.finalsite.net/images/v1726669885/fultonschoolsorg/xqkoiokt4ksiqjda0mht/SampleCertiticateofInsuranceACORD25.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("t-williams03/coi-pdf-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 = { "pdf_urls": ["https://resources.finalsite.net/images/v1726669885/fultonschoolsorg/xqkoiokt4ksiqjda0mht/SampleCertiticateofInsuranceACORD25.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("t-williams03/coi-pdf-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 '{
  "pdf_urls": [
    "https://resources.finalsite.net/images/v1726669885/fultonschoolsorg/xqkoiokt4ksiqjda0mht/SampleCertiticateofInsuranceACORD25.pdf"
  ]
}' |
apify call t-williams03/coi-pdf-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,t-williams03/coi-pdf-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/rtLb0qsLuauL1Xtbt/builds/XbPLvR4afvCQ79fFP/openapi.json
