# PDF to JSON Parser (`parseforge/pdf-to-json-parser`) Actor

Extract structured JSON data from PDF files automatically. Upload one or more PDFs and get clean, organized data with AI-powered field extraction.

- **URL**: https://apify.com/parseforge/pdf-to-json-parser.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** AI, Jobs, Automation
- **Stats:** 72 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $400.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### PDF to JSON Parser

**Extract structured JSON data from any PDF file, no manual data entry.** Upload one or more PDFs and get clean, organized JSON with all important fields automatically identified. No coding required. Export to CSV, JSON, Excel, or XML.

PDFs are everywhere, but getting data out of them is a pain. Manual copying is slow and error-prone, and many PDFs are scanned or have complex layouts. This tool reads your PDF files and uses AI to extract the key information into a structured JSON format. You get clean, usable data without writing a single line of code.

| Who uses it | What they scrape PDF for |
|---|---|
| Data analysts | Pull data from PDF reports for analysis in Excel or BI tools |
| Developers | Convert PDF documents into JSON for integration into applications |
| Business professionals | Extract key information from contracts, invoices, or research papers |

### What it does

This Actor extracts structured JSON data from PDF files, automatically identifying and returning important fields such as title, author, date, and more.

- 📄 **Multiple file upload:** Upload one or more PDFs in a single run, each processed automatically.
- 🔍 **Custom field extraction:** Specify exactly which fields you need (e.g., title, author, price) for targeted results.
- 🧠 **AI-powered extraction:** Uses a smart default prompt to identify and extract meaningful information from any PDF.
- ⚙️ **Custom system prompt:** Provide your own instructions to guide the AI for specialized extraction needs.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with PDF data

**📊 Analyze PDF reports.**

Data analysts upload monthly sales reports in PDF and extract key metrics like revenue and growth into JSON for quick analysis in spreadsheets.

**📄 Automate invoice processing.**

Accounting teams upload invoices and extract fields like invoice number, date, and total amount, feeding them directly into their accounting software.

**📚 Digitize research papers.**

Researchers convert academic papers into structured JSON to build searchable databases of citations and abstracts.

**🛠️ Integrate PDF data into apps.**

Developers use the extracted JSON to populate web forms or mobile apps with data from uploaded PDFs, saving users from manual entry.

### Why choose this scraper

|  | What you get |
|---|---|
| **Time-saving** | Automatically extracts data from PDFs in seconds, eliminating manual data entry. |
| **Accurate** | AI-powered extraction reduces errors compared to manual copying. |
| **Flexible** | Works with any PDF, from simple text documents to complex forms and reports. |
| **Structured output** | Returns data in a consistent JSON format, ready for further processing. |

### How it compares

No other Store actor targets PDF the same way, so the honest comparison is with the alternatives teams actually weigh.

| | PDF to JSON Parser | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When PDF changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Configure the run by uploading your PDF files and optionally specifying the fields you want extracted. The AI processes each file and returns only the data you need, in a clean JSON format. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "pdfFile": [
    "https://api.apify.com/v2/key-value-stores/Fy9UrApb6rz0dRBqm/records/sample.pdf?signature=1c819r8xjMsE0Fi3AhqnT"
  ],
  "maxItems": 10
}
```

A larger pull:

```json
{
  "pdfFile": [
    "https://api.apify.com/v2/key-value-stores/Fy9UrApb6rz0dRBqm/records/sample.pdf?signature=1c819r8xjMsE0Fi3AhqnT"
  ],
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$1 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $100.00 |
| 1,000 results | $1000.00 |
| 10,000 results | $10000.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect more results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [PDF to JSON Parser](https://apify.com/parseforge/pdf-to-json-parser?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to PDF through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/pdf-to-json-parser"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Make sure you have uploaded at least one PDF file. If you specified custom fields, ensure they are comma-separated and match the content of the PDF. Also check that the PDF is not password-protected or corrupted.

**The extracted fields are not what I expected.**

Try specifying the exact fields you need in the 'Fields to Extract' input. You can also provide a custom system prompt to guide the AI more precisely.

**The run fails with an error.**

Check that your PDF files are valid and not too large. If the issue persists, contact Apify support with the run ID for assistance.

**How do I increase the number of documents processed?**

Adjust the 'Maximum documents' input to a higher value. Note that processing more documents may increase the cost and time of the run.

### FAQ

| Question | Answer |
|---|---|
| What types of PDFs can I upload? | You can upload any PDF file, including scanned documents, forms, reports, and text-based PDFs. The AI handles various layouts and formats. |
| How does the AI decide which fields to extract? | By default, the AI uses a smart prompt that identifies important fields like title, author, date, and other key information. You can also specify custom fields to extract. |
| Can I extract data from multiple PDFs at once? | Yes, you can upload multiple PDF files in a single run. Each file is processed individually, and you get a separate JSON output for each. |
| What is the maximum number of documents I can process? | You can set the maximum number of documents per run, but the practical limit depends on your Apify plan and the size of your PDFs. |
| Do I need to provide a system prompt? | No, it's optional. If you don't provide one, a smart default prompt is used that extracts meaningful information from the PDF. |
| What output formats are supported? | The Actor returns data in JSON format, which you can then export to CSV, Excel, XML, or other formats using Apify's export features. |
| Is my data secure? | Yes, your PDFs are processed securely on Apify's infrastructure. Files are not stored permanently and are deleted after processing. |
| Can I use this for free? | Apify offers a free tier with limited usage. You can try the Actor with the sample PDF to see how it works before committing to a paid plan. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by PDF. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `pdfFile` (type: `array`):

Upload one or more PDF files using file upload. The files will be automatically processed.

## `fieldsToExtract` (type: `string`):

Specify which fields you want extracted (e.g., "title, author, date, description, price"). If not provided, the AI will automatically extract all important fields it identifies.

## `systemPrompt` (type: `string`):

Optional custom system prompt to guide the AI extraction. If not provided, a smart default prompt will be used that extracts meaningful information from the PDF.

## `maxItems` (type: `integer`):

How many documents to collect per run.

## Actor input object example

```json
{
  "pdfFile": [
    "https://api.apify.com/v2/key-value-stores/Fy9UrApb6rz0dRBqm/records/sample.pdf?signature=1c819r8xjMsE0Fi3AhqnT"
  ],
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `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 = {
    "pdfFile": [
        "https://api.apify.com/v2/key-value-stores/Fy9UrApb6rz0dRBqm/records/sample.pdf?signature=1c819r8xjMsE0Fi3AhqnT"
    ],
    "fieldsToExtract": "",
    "systemPrompt": "",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/pdf-to-json-parser").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 = {
    "pdfFile": ["https://api.apify.com/v2/key-value-stores/Fy9UrApb6rz0dRBqm/records/sample.pdf?signature=1c819r8xjMsE0Fi3AhqnT"],
    "fieldsToExtract": "",
    "systemPrompt": "",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/pdf-to-json-parser").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 '{
  "pdfFile": [
    "https://api.apify.com/v2/key-value-stores/Fy9UrApb6rz0dRBqm/records/sample.pdf?signature=1c819r8xjMsE0Fi3AhqnT"
  ],
  "fieldsToExtract": "",
  "systemPrompt": "",
  "maxItems": 10
}' |
apify call parseforge/pdf-to-json-parser --silent --output-dataset

```

## MCP server setup

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

```

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/vGEOdTbMS0Zt6lkbC/builds/CQQJa8b4yqfCXo3Gf/openapi.json
