Document to JSON – PDF Invoice/Statement/Contract Parser

io.github.fashionmascherine-svgPublished by GitHub account fashionmascherine-svgv1.0.0Updated Oct 24, 2026

Turn any PDF into structured JSON via AI + OCR: invoices, bank statements, contracts.

The publisher's own server: Parser Club

VerifiedStreamable HTTPWeb executableFiles & StorageData & Analytics

Overview

AI-generated overview

An Apify-hosted MCP server that turns PDF invoices, bank statements, contracts and generic documents into structured JSON using AI and OCR.

What you can do
Parse invoices into seller, buyer, line items, totals, VAT, IBAN and payment info as JSON, with optional total and date validation. Parse bank statements into transactions, balances, fees and account holder details. Parse contracts into parties, key clauses, dates, financial terms and jurisdiction. Extract full text and tables from any generic document, free during launch. Documents are read from a public PDF URL and results are returned as JSON.
When to use it
Useful when an assistant needs to convert PDF invoices, statements or contracts into structured data for accounting, spreadsheet, legal review or automation workflows, including scanned documents in English, Italian or Spanish.
Requirements
Remote MCP endpoint at mcp.apify.com, reached over streamable HTTP. Requires an Apify account and an Apify API token sent in the Authorization header as a Bearer token. The PDF must be reachable at a public URL. Network access to Apify is needed.
Before you install
Each extraction is billed per document through Apify (invoice $0.01, bank statement $0.015, contract $0.02; generic free during launch), so usage spends money on the account. The Apify API token is a secret and must be kept private. The PDF is fetched from a public URL and sent to Apify's AI processing; the README says files are not stored after extraction, but the document content leaves your machine.

Installation

In SourceWeft

  1. Open Document to JSON – PDF Invoice/Statement/Contract Parser in the dashboard and add it to a workspace.
  2. Connect the required credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.fashionmascherine-svg%2Fdocument-to-json-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.

{
  "mcpServers": {
    "document-to-json-pdf-invoice-statement-c": {
      "type": "http",
      "url": "https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp"
    }
  }
}

README

Document-to-JSON Converter

Turn PDFs into structured JSON in seconds. AI-powered, no coding needed.

[MCP Server] [License: MIT] [Apify]


🚀 What does it do?

Paste a PDF URL → get structured JSON. That's it.

Powered by AI. Instead of rigid templates or fragile regex, an AI model actually reads and understands each document — so it adapts to any layout, language, or vendor, and even handles scanned files. That's why the same tool works on an Italian invoice, a Spanish receipt, or an English contract without any configuration.

Perfect for:

  • Accountants — extract invoice data (numbers, dates, totals, VAT, IBAN)
  • Developers — automate document processing in your apps
  • Business analysts — convert bank statements to spreadsheets
  • Legal teams — extract contract clauses and dates automatically

📋 Supported documents

TypeWhat you getPrice
InvoiceSeller, buyer, line items, totals, VAT, IBAN, payment info$0.01
Bank StatementAll transactions, balances, fees, account holder$0.015
ContractParties, key clauses, dates, financial terms, jurisdiction$0.02
GenericFull text + tables from any documentFree during launch

✨ Example output

json
{  "success": true,  "data": {    "document_type": "invoice",    "confidence": 0.97,    "metadata": {      "invoice_number": "INV-2024-00123",      "invoice_date": "2024-03-15",      "currency": "EUR"    },    "seller": {      "name": "Acme S.p.A.",      "vat_id": "IT01234567890"    },    "line_items": [      {        "description": "Consulting services",        "quantity": 1,        "unit_price": 5000.00,        "net_amount": 5000.00,        "vat_rate": 22.0,        "total": 6100.00      }    ],    "totals": {      "net_total": 5000.00,      "vat_total": 1100.00,      "grand_total": 6100.00    },    "payment_info": {      "iban": "IT60X0542811101000000123456"    }  }}

🧪 Live examples — try them now

Run the Actor on these public sample PDFs (synthetic data) to see the extraction quality for yourself:

TypeSample PDFWhat the AI extracts (highlights)
Invoicesample-invoice.pdfInvoice INV-2026-0042, seller + buyer with VAT IDs, 2 line items, VAT 22%, grand total €1,889.78 — confidence 1.0
Bank statementsample-bank-statement.pdf7 transactions auto-categorized, opening/closing balances reconciled to €8,655.28 — confidence 1.0
Contractsample-contract.pdf2 parties + roles, effective/expiry/renewal dates, fee €5,000, 5 key clauses with summaries, jurisdiction — confidence 0.95

Just paste one of these URLs as file_url, pick the matching document_type, and run. Each extraction takes ~15–20 seconds.

🎯 Why this Actor?

FeatureBenefit
AI understandingAn AI reads documents like a human — adapts to any layout, no templates or rules to maintain
Multi-languageEnglish, Italian, Spanish (OCR)
OCR includedWorks with scanned documents too
ValidationAuto-checks totals and dates for accuracy
Pay per useNo subscription, pay only for what you process

🔧 How to use

  1. Get a public PDF URL (Dropbox, Google Drive, your server)
  2. Select the document type
  3. Run the Actor
  4. Get your JSON in seconds

That's it. No configuration, no API keys needed.

💰 Pricing

Document typePrice
Invoice$0.01 ($10/1000)
Bank statement$0.015 ($15/1000)
Contract$0.02 ($20/1000)
GenericFree during launch

Pay-per-event via Apify. Pay only for successful extractions. No subscription, no hidden fees.

🔒 Privacy

  • PDFs are processed and not stored after extraction
  • Data is available in your private dataset
  • All API keys stay encrypted

📚 Supported OCR languages

eng (English), ita (Italian), spa (Spanish)

Combine with + for multi-language scanned documents: eng+ita+spa (default)

🤖 Built for AI agents (MCP)

This Actor is an MCP server: AI agents can call it directly as a tool to turn any PDF into JSON, with zero configuration — just pass a public file_url. Specialized tools (parse_invoice, parse_bank_statement, parse_contract) and a free parse_generic_document make it easy for an LLM to pick the right one for the task.

🔌 Integrations

Replace YOUR_APIFY_TOKEN with your token from Apify → Settings → Integrations.

Claude Code (CLI)

bash
claude mcp add --transport http apify \  "https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp"

Claude Desktop / Cursor (MCP)

Add to your MCP config (claude_desktop_config.json or Cursor's mcp.json):

json
{  "mcpServers": {    "document-to-json": {      "command": "npx",      "args": [        "-y", "mcp-remote",        "https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp",        "--header", "Authorization: Bearer YOUR_APIFY_TOKEN"      ]    }  }}

The agent then sees parse_invoice, parse_bank_statement, parse_contract, and parse_generic_document as tools and calls them on its own.

REST API (any language)

One call in, JSON out — run-sync-get-dataset-items returns the result directly:

bash
curl -X POST \  "https://api.apify.com/v2/acts/opportunity-biz~document-to-json-mcp/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \  -H "Content-Type: application/json" \  -d '{"file_url": "https://example.com/invoice.pdf", "document_type": "invoice", "validate_totals": true}'

Python

python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("opportunity-biz/document-to-json-mcp").call(run_input={    "file_url": "https://example.com/invoice.pdf",    "document_type": "invoice",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():    print(item)

JavaScript / TypeScript

javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('opportunity-biz/document-to-json-mcp').call({  file_url: 'https://example.com/invoice.pdf',  document_type: 'invoice',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);

n8n

Use an HTTP Request node (POST) to the REST API URL above, or the official Apify node → select document-to-json-mcp → set file_url and document_type. Great for "watch inbox → extract invoice → append to Google Sheet" workflows.

LangChain / CrewAI / any MCP framework

Point your agent framework's MCP client at https://mcp.apify.com/?actors=opportunity-biz/document-to-json-mcp — the parsing tools are exposed automatically.

Source: README.md at commit 2580cf9

Tools

0
This server asks you to sign in, so SourceWeft could not read its tools without an account and has not indexed them. What a connected account sees can depend on that account and its permissions.

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

85% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Parser integrations