# ComIQ PDF Table Extractor (`connected_comiq/comiq-invoice-extractor`) Actor

Extract structured, QA-gated tables from PDFs with headers, rows, totals, confidence scores, and page metadata. Pay only for successfully processed PDFs and delivered tables.

- **URL**: https://apify.com/connected\_comiq/comiq-invoice-extractor.md
- **Developed by:** [ComIQ](https://apify.com/connected_comiq) (community)
- **Categories:** Automation, Other, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 pdf table 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ComIQ PDF Table Extractor

**Extract structured tables from PDF files with QA-gated delivery.**

ComIQ PDF Table Extractor turns PDF tables into structured data you can use in spreadsheets, databases, APIs, automations, and downstream AI workflows.

Upload **1–10 PDF files** per run. ComIQ detects table structures, reconstructs rows and columns, evaluates result quality, and returns only customer-ready tables that pass its QA gate.

### Why use ComIQ PDF Table Extractor?

- **Structured table output** — headers, rows, page numbers, table indexes, row/column counts, and more.
- **QA-gated delivery** — results are quality-scored before they are returned.
- **Confidence metadata** — inspect table confidence and QA scores with every result.
- **Totals and section handling** — preserves detected section/group rows and subtotal/total rows where available.
- **OCR fallback** — supports PDFs that require OCR-based table reconstruction.
- **Pay for delivered value** — ComIQ custom billing is tied to successfully processed PDFs and QA-approved tables that are delivered.
- **Apify-native output** — results are written to the Actor's default Dataset and can be consumed through the Apify Console, API, integrations, schedules, or downstream workflows.

### Quick start

1. Open the Actor and upload one or more PDF files.
2. Set your **maximum cost per run** high enough for the number of documents/tables you expect.
3. Start the run.
4. When the run finishes, open **Dataset / Output** to view the extracted tables.

For a simple PDF containing one accepted table, a typical successful run uses:

- 1 × **PDF Document Processed**
- 1 × **PDF Table Delivered**
- the small Apify **Actor Start** event shown by the platform

### Input

#### PDF files

Upload **1–10 PDF documents** per run.

ComIQ is best suited to PDFs containing visibly structured tabular data such as:

- business reports
- statements
- order summaries
- operational documents
- schedules
- financial or administrative tables
- text-heavy PDFs containing embedded tables
- scanned or image-based PDFs where OCR reconstruction is needed

#### Best results

For the most reliable extraction:

- use PDFs with clear table boundaries or consistent column alignment;
- use legible scans when the PDF is image-based;
- avoid heavily rotated, blurred, cropped, or extremely low-resolution pages;
- use documents where columns and rows are visually distinguishable.

Complex layouts may be held back by the QA gate rather than returned as low-confidence customer-ready data.

### Output

Each accepted table is returned as a separate item in the default Apify Dataset.

Typical output fields include:

| Field | Description |
| --- | --- |
| `source_file` | Original PDF filename |
| `page` | Page containing the extracted table |
| `table_index` | Table index within the document |
| `headers` | Detected column headers |
| `rows` | Structured table rows |
| `row_count` | Number of extracted rows |
| `column_count` | Number of extracted columns |
| `table_confidence` | Table extraction confidence score |
| `qa_score` | ComIQ QA score |
| `qa_issues` | Quality issues detected by the QA gate |
| `section_rows` | Preserved section/group rows where detected |
| `summary_rows` | Preserved subtotal/total rows where detected |
| `extraction_method` | Extraction/reconstruction method used |
| `delivery_status` | Delivery state for the result |
| `billing_mode` | Preview or Pay Per Event mode |
| `billing_status` | Billing state associated with the delivered result |
| `processing_seconds` | ComIQ processing time where available |

#### Example

```json
{
  "source_file": "orders.pdf",
  "page": 1,
  "table_index": 1,
  "headers": ["Order No", "Account No", "Account Name", "Order Total"],
  "rows": [["100101", "ABC001", "Customer ABC001", "994.29"]],
  "row_count": 10,
  "column_count": 4,
  "table_confidence": 95,
  "qa_score": 95,
  "delivery_status": "completed",
  "extraction_method": "rapidocr_layout",
  "billing_mode": "apify_pay_per_event",
  "billing_status": "charged"
}
```

### Pricing

ComIQ uses **Pay Per Event** pricing.

| Event | Price |
| --- | ---: |
| **PDF Document Processed** | **$0.040 per successfully processed PDF** |
| **PDF Table Delivered** | **$0.025 per QA-approved table delivered** |
| **Actor Start** | Small synthetic Apify event displayed by the platform |

The primary pricing event is **PDF Table Delivered**.

#### Example pricing

A successful run containing:

- 1 PDF
- 1 QA-approved delivered table

uses approximately:

**$0.040 + $0.025 + the Apify Actor Start event**

A PDF containing multiple accepted tables can generate multiple **PDF Table Delivered** events.

Your configured **maximum cost per run** is respected by the Actor.

#### When ComIQ custom events are not charged

ComIQ's custom document/table billing is designed around successful delivery:

- failed processing is not treated as successful paid delivery;
- Revenue Guard rejected work is not treated as successful paid delivery;
- QA-held work that produces no customer-ready table is not treated as successful paid delivery;
- a table event is charged only when that table is successfully delivered to the Dataset.

Apify's own synthetic platform events, such as Actor Start, are controlled by the Apify platform and may still apply independently.

### QA-gated delivery

ComIQ does not treat every detected table as automatically customer-ready.

The fulfillment engine evaluates extraction quality and can consider factors such as:

- table structure;
- row/column consistency;
- header quality;
- sparse or malformed cells;
- reconstruction quality;
- OCR confidence;
- detected totals and sections.

Results that do not meet the configured quality gate may be held instead of being returned as accepted customer-ready tables.

A QA score is a **quality-screening signal**, not a guarantee of semantic or ground-truth accuracy. For business-critical workflows, validate extracted data before using it for financial, legal, regulatory, or irreversible decisions.

### OCR and scanned PDFs

ComIQ can use OCR-based reconstruction when direct PDF table extraction is not sufficient.

OCR can be useful for:

- scanned documents;
- image-based PDFs;
- PDFs where text is not directly extractable.

OCR accuracy depends on scan quality, font clarity, resolution, rotation, compression, and table complexity.

### Full permissions — why are they currently required?

This Actor currently uses Apify's file-upload workflow. Uploaded files may be stored in Apify key-value storage, and the Actor must access the specific uploaded file referenced by the run input so it can prepare that file for ComIQ processing.

For this reason, the current release requires **Full permissions**.

The Actor implementation is designed to use the storage/file reference supplied for the requested run; it is not designed to intentionally inspect unrelated user data. A future ComIQ release may move to a Limited-permissions upload architecture when the same simple upload experience can be preserved.

### Security and processing architecture

- Actor-to-ComIQ communication uses authenticated HTTPS.
- The ComIQ Windows fulfillment worker uses **outbound HTTPS**; no public inbound port on the processing PC is required for normal fulfillment.
- Results are returned to Apify storage for the requesting Actor run.
- Do not upload documents that you are not authorized to process.

Because PDFs may contain sensitive information, users should evaluate whether this processing model is appropriate for their data and compliance requirements before submitting confidential, regulated, or highly sensitive documents.

### API and automation

Because this is an Apify Actor, you can use it through:

- the Apify Console;
- the Apify API;
- Actor Tasks;
- schedules;
- webhooks and integrations supported by Apify;
- downstream automation tools that consume Apify Dataset output.

This makes ComIQ suitable for both one-off extraction and repeatable document-processing workflows.

### Common use cases

#### PDF table to JSON

Upload a PDF and retrieve structured table data through the Dataset/API for downstream processing.

#### PDF table to spreadsheet workflow

Extract rows and headers, then send Dataset results to a spreadsheet or data-processing workflow.

#### Document QA pipeline

Use ComIQ's QA and confidence metadata to decide which extracted tables can continue automatically and which should be reviewed.

#### OCR table extraction

Process scanned or image-based PDFs where conventional text extraction is not enough.

#### Batch document processing

Upload multiple PDFs in one run and receive one structured Dataset item for each accepted table.

### Limitations

ComIQ may not successfully extract every table.

Results can be affected by:

- very low-resolution scans;
- handwriting;
- highly irregular or artistic layouts;
- overlapping text;
- severe page rotation or distortion;
- tables with visually ambiguous columns;
- complex nested tables;
- documents where rows/columns cannot be reconstructed reliably.

When quality is insufficient, the Actor may return fewer tables rather than deliver a low-confidence result.

### FAQ

#### Does ComIQ extract normal PDF text too?

The current Store product is focused on **structured table extraction**, not general-purpose PDF text extraction.

#### Does it work with scanned PDFs?

Yes, OCR fallback can be used for image-based PDFs, although quality depends on the source scan.

#### How many PDFs can I upload?

The current input supports **up to 10 PDFs per run**.

#### How is a table billed?

Each QA-approved table successfully delivered to the Dataset triggers the **PDF Table Delivered** event.

#### Why is there also a document-processing charge?

The document-processing event covers the successful document-level processing needed before one or more customer-ready tables can be produced.

#### What happens if ComIQ cannot produce a customer-ready table?

The QA gate can hold the result instead of delivering a low-confidence table. ComIQ's custom document/table events are designed not to treat that outcome as successful delivery.

#### Why does the Actor request Full permissions?

The current Apify upload workflow requires access to the key-value storage containing the file uploaded for the run. See **Full permissions — why are they currently required?** above.

#### Can I use the results through an API?

Yes. Results are stored in the Apify Dataset and can be retrieved using Apify's API and integrations.

#### Is the QA score an accuracy percentage?

No. It is a heuristic quality-screening score used by ComIQ. It should not be interpreted as guaranteed ground-truth accuracy.

### Support

If a run produces an unexpected result:

1. Check the Actor run **Log** for errors or QA messages.
2. Confirm the source file is a PDF and is readable.
3. Try a clearer or higher-resolution version if the file is scanned.
4. Include the **Run ID** when reporting a reproducible issue.

Feedback is useful during the early release of ComIQ PDF Table Extractor, especially for unusual table layouts and scanned PDFs.

### About ComIQ

ComIQ develops practical AI-assisted document-processing and automation tools focused on structured data extraction, QA validation, and efficient local/cloud workflows.

**Current Store product:** ComIQ PDF Table Extractor.

# Actor input Schema

## `files` (type: `array`):

Upload up to 10 PDF files. Each accepted table is returned as a structured dataset item with rows, headers, confidence, page number, QA score, and billing metadata.

## Actor input object example

```json
{}
```

# 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 = {};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,connected_comiq/comiq-invoice-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/b44vZABHplZ5fDieL/builds/fRHPfXua14cMqjwxv/openapi.json
