# PDF Table, Datasheet & RAG Markdown Extractor (`rickyboa21/pdf-table-spec-extractor`) Actor

Extract structured JSON/CSV tables, engineering specs with units, compliance tags (RoHS/ISO/CE/UL), and RAG-ready Markdown chunks from any public PDF URL — zero LLM API keys required.

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

## Pricing

from $2.00 / 1,000 pdf page processeds

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 Table, Engineering Datasheet & RAG Markdown Extractor

Turn any public PDF URL (engineering datasheets, BOMs, technical manuals, RFPs, financial statements, or research reports) into **clean JSON/CSV tables**, **structured engineering specifications with physical units**, **compliance standards tags**, and **RAG-ready chunked Markdown** — with **zero external LLM API keys required**.

Built for **AI agents (MCP)**, **n8n / Make workflows**, **hardware & procurement teams**, and **RAG data pipelines**.

***

### What You Get (Sample Output)

```json
{
  "url": "https://www.ti.com/lit/ds/symlink/ne555.pdf",
  "status": "ok",
  "title": "xx555 Precision Timers datasheet (Rev. K)",
  "totalPages": 39,
  "pagesProcessed": 6,
  "wordCount": 2650,
  "approxTokens": 4420,
  "isLikelyScanned": false,
  "tableCount": 8,
  "specCount": 24,
  "chunkCount": 18,
  "tables": [
    {
      "page": 5,
      "tableIndex": 0,
      "headers": ["Parameter", "Test Conditions", "Min", "Typ", "Max", "Unit"],
      "records": [
        { "Parameter": "Supply voltage (VCC)", "Test Conditions": "NE555", "Min": "4.5", "Typ": "", "Max": "16", "Unit": "V" }
      ],
      "markdown": "| Parameter | Test Conditions | Min | Typ | Max | Unit |\n| --- | --- | --- | --- | --- | --- |\n| Supply voltage (VCC) | NE555 | 4.5 | | 16 | V |"
    }
  ],
  "technicalSpecs": [
    { "parameter": "NE555 T", "value": "0°C to 70°C", "page": 1, "source": "text" },
    { "parameter": "High-level output voltage", "value": "15V, I = -200mA 12.5 V", "page": 6, "source": "text" }
  ],
  "ragChunks": [
    {
      "chunkIndex": 0,
      "pageStart": 1,
      "pageEnd": 1,
      "charCount": 1820,
      "approxTokens": 455,
      "text": "## Page 1\n\n..."
    }
  ]
}
```

***

### Why Use This Instead of Basic PDF-to-Text Dumpers?

| Feature | Basic PDF-to-Text Scrapers | This Actor |
| :--- | :---: | :---: |
| Structured table detection (`headers`, `rows`, `records[]`, Markdown) | No | **Yes** |
| Engineering spec & physical unit mining (`V`, `mA`, `MHz`, `°C`, `mm`, `MPa`, etc.) | No | **Yes** |
| Automatic compliance tag detection (`RoHS`, `REACH`, `CE`, `UL`, `FCC`, `ISO`, `IEC`, `IEEE`, `ASTM`, `IP`) | No | **Yes** |
| Token-estimated overlapping RAG chunks with page numbers | No | **Yes** |
| 3 export modes (`per_document`, `per_table` for Excel/Sheets, `per_chunk` for Vector DBs) | No | **Yes** |
| Scanned-PDF warning flag (`isLikelyScanned`) | Rare | **Yes** |
| Zero LLM API keys, zero proxies, deterministic speed | — | **Yes** |

***

### Output Modes

- **`per_document`** *(default)*: One comprehensive JSON object per PDF URL containing metadata, all tables, technical specs, compliance tags, full Markdown, and RAG chunks.
- **`per_table`**: Flattens every detected table into its own dataset row — perfect for exporting directly to CSV, Excel, Airtable, or Google Sheets.
- **`per_chunk`**: Flattens every RAG Markdown chunk into its own dataset row with `url`, `title`, `pageStart`, `pageEnd`, and `approxTokens` — ready to upsert straight into Pinecone, Qdrant, Chroma, or pgvector via n8n/Make.

***

### Pricing (Pay-Per-Event)

Transparent, predictable event billing — set a hard spending limit on any run:

- **Actor Start (`actor-start`)**: charged once per run.
- **Per Page Processed (`pdf-page-processed`)**: charged per PDF page actually parsed (capped by your `maxPagesPerPdf` setting).

***

### Limitations

- Works on publicly accessible PDF URLs (`http://` / `https://`) up to `maxPdfSizeMb` (default 25 MB).
- Uses deterministic text & layout extraction (no OCR). Image-only scanned PDFs are automatically flagged with `"isLikelyScanned": true` so downstream pipelines can route them to OCR only when needed.

# Actor input Schema

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

List of public PDF URLs to download and parse.

## `outputMode` (type: `string`):

Choose how results are pushed to the Apify dataset: one rich record per PDF document, one row per extracted table (ideal for CSV/Excel), or one row per RAG chunk (ideal for vector DB pipelines).

## `maxPagesPerPdf` (type: `integer`):

Maximum number of pages to parse per PDF (helps cap execution cost and latency on very large manuals).

## `extractTables` (type: `boolean`):

Detect and extract tables into both row-object JSON records and Markdown table format.

## `extractTechnicalSpecs` (type: `boolean`):

Extract numeric specifications with physical units (V, mA, MHz, °C, mm, kB, etc.), compliance standards (RoHS, CE, UL, ISO, IEC, FCC), and document identifiers.

## `extractRagChunks` (type: `boolean`):

Convert pages and tables into clean Markdown and split into token-estimated overlapping chunks for LLM/vector database ingestion.

## `chunkSizeChars` (type: `integer`):

Target maximum character length per RAG chunk (~4 chars ≈ 1 token).

## `chunkOverlapChars` (type: `integer`):

Character overlap between consecutive RAG chunks to preserve cross-boundary context.

## `maxPdfSizeMb` (type: `integer`):

Safety cap on downloaded PDF size in megabytes.

## `requestTimeoutSecs` (type: `integer`):

HTTP timeout in seconds for downloading each PDF.

## Actor input object example

```json
{
  "pdfUrls": [
    "https://www.ti.com/lit/ds/symlink/ne555.pdf"
  ],
  "outputMode": "per_document",
  "maxPagesPerPdf": 15,
  "extractTables": true,
  "extractTechnicalSpecs": true,
  "extractRagChunks": true,
  "chunkSizeChars": 2000,
  "chunkOverlapChars": 200,
  "maxPdfSizeMb": 25,
  "requestTimeoutSecs": 45
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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.ti.com/lit/ds/symlink/ne555.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rickyboa21/pdf-table-spec-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.ti.com/lit/ds/symlink/ne555.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("rickyboa21/pdf-table-spec-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.ti.com/lit/ds/symlink/ne555.pdf"
  ]
}' |
apify call rickyboa21/pdf-table-spec-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rickyboa21/pdf-table-spec-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/PVVfigvMXV8kbtRo3/builds/bEUvJEjxfBwRfWVwg/openapi.json
