document-to-json-mcp
This server converts PDF documents into structured JSON data using AI-powered extraction and OCR, supporting multiple document types and languages.
Available Tools:
parse_invoice: Extracts seller/buyer info, line items, totals, VAT, and payment info from invoice PDFs. Supports European (Fattura Elettronica) and international formats. Optional total validation. Cost: $0.02/document.parse_bank_statement: Extracts transactions, balances, account holder info, and fees from bank statement PDFs. Supports optional auto-categorization of transactions. Cost: $0.03/document.parse_contract: Extracts parties, key dates, financial terms, and key clauses (termination, confidentiality, etc.) from contract PDFs. Cost: $0.05/document.parse_generic_document: Extracts full text and tables from any PDF when a specialized parser isn't needed. Cost: $0.01/document.supported_document_types: Lists all supported document types with descriptions and pricing. Always free to call.
Key Features:
AI-powered: adapts to any layout, language, or vendor without rigid templates
Built-in multi-language OCR (English, Italian, Spanish; combinable, e.g.
ita+eng) for scanned documentsAccepts any publicly accessible PDF URL up to 20MB
Privacy-focused: PDFs are not stored after extraction
Pay-per-use pricing via x402 USDC on Base (no subscription)
Integrates via REST API, Python, JavaScript, and AI agent frameworks (Claude, LangChain, CrewAI, n8n)
Allows the server to fetch and process PDF documents hosted on Dropbox via public share URLs.
Allows the server to fetch and process PDF documents hosted on Google Drive via public share links.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Document-to-JSON Converter
Turn PDFs into structured JSON in seconds. AI-powered, no coding needed.
๐ 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
Related MCP server: Invoice Parser MCP
๐ Supported documents
Type | What you get | Price |
Invoice | Seller, buyer, line items, totals, VAT, IBAN, payment info | $0.01 |
Bank Statement | All transactions, balances, fees, account holder | $0.015 |
Contract | Parties, key clauses, dates, financial terms, jurisdiction | $0.02 |
Generic | Full text + tables from any document | Free during launch |
โจ Example output
{
"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:
Type | Sample PDF | What the AI extracts (highlights) |
Invoice | Invoice | |
Bank statement | 7 transactions auto-categorized, opening/closing balances reconciled to โฌ8,655.28 โ confidence 1.0 | |
Contract | 2 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?
Feature | Benefit |
AI understanding | An AI reads documents like a human โ adapts to any layout, no templates or rules to maintain |
Multi-language | English, Italian, Spanish (OCR) |
OCR included | Works with scanned documents too |
Validation | Auto-checks totals and dates for accuracy |
Pay per use | No subscription, pay only for what you process |
๐ง How to use
Get a public PDF URL (Dropbox, Google Drive, your server)
Select the document type
Run the Actor
Get your JSON in seconds
That's it. No configuration, no API keys needed.
๐ฐ Pricing
Document type | Price |
Invoice | $0.01 ($10/1000) |
Bank statement | $0.015 ($15/1000) |
Contract | $0.02 ($20/1000) |
Generic | Free 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_TOKENwith your token from Apify โ Settings โ Integrations.
Claude Code (CLI)
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):
{
"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:
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
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
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.
Available Tools
5 toolsparse_bank_statementAInspect
Extract structured data from a bank statement PDF.
Returns JSON with all transactions, balances, account holder info, and fees.
Args:
file_url: Public URL of the PDF file (max 20MB).
language: Document language(s) for OCR. Default: ita+eng.
categorize_transactions: Auto-categorize transactions. Default: false.
Cost: $0.03 per document, paid via x402 USDC on Base.
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| language | No | ita+eng | |
| categorize_transactions | No |
parse_contractAInspect
Extract structured data from a contract PDF.
Returns JSON with parties, key dates, financial terms, and essential clauses.
Args:
file_url: Public URL of the PDF file (max 20MB).
language: Document language(s) for OCR. Default: ita+eng.
extract_clauses: Extract key clauses (termination, confidentiality, etc.). Default: true.
extract_financial_terms: Extract fees, payment terms, penalties. Default: true.
Cost: $0.05 per document, paid via x402 USDC on Base.
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| language | No | ita+eng | |
| extract_clauses | No | ||
| extract_financial_terms | No |
parse_generic_documentAInspect
Extract text and tables from any PDF document.
Less structured than specialized parsers, but more flexible.
Returns full text content and detected tables.
Args:
file_url: Public URL of the PDF file (max 20MB).
language: Document language(s) for OCR. Default: ita+eng.
extract_tables: Detect and extract tables. Default: true.
Cost: $0.01 per document, paid via x402 USDC on Base.
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| language | No | ita+eng | |
| extract_tables | No |
parse_invoiceAInspect
Extract structured data from an invoice PDF.
Returns JSON with seller, buyer, line items, totals, and payment info.
Supports European (Fattura Elettronica) and international invoice formats.
Args:
file_url: Public URL of the PDF file (max 20MB).
language: Document language(s) for OCR. Default: ita+eng.
extract_line_items: Whether to extract individual line items. Default: true.
validate_totals: Validate that line item sums match declared totals. Default: false.
Cost: $0.02 per document, paid via x402 USDC on Base.
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| language | No | ita+eng | |
| extract_line_items | No | ||
| validate_totals | No |
supported_document_typesAInspect
List all supported document types with their descriptions and prices. This tool is always free to call.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
- First observed
parse_bank_statement - First observed
parse_contract - First observed
parse_generic_document - First observed
parse_invoice - First observed
supported_document_types
TDQS
Scored across 5 tools
Each tool targets a distinct document type (bank statement, contract, generic, invoice) plus a listing tool, with no overlap in purpose.
All parse tools follow a consistent 'parse_X' pattern, but the listing tool 'supported_document_types' deviates slightly; still clear and predictable.
Five tools are well-scoped for a document parsing server, covering specific types and generic fallback without being excessive or thin.
The server provides specialized parsers for common documents, a generic parser for others, and a listing tool, covering the full parsing lifecycle.
Maintenance
Related MCP Connectors
Render PDFs from 45 starter templates or raw HTML. Pay-per-render with USDC via x402.
Pay-per-call document and web tools for AI agents: PDF parsing and OCR (Japanese-strong), web and structured extraction, invoice verification, company profiles and PDF utilities. x402 (USDC on Base), no API key; failed calls are never charged.
Pay-per-call PDF to text, RSS/Atom to JSON, sitemap to URLs for agents. x402 USDC, Base/Algorand.
Reads AIA G702/G703 pay applications and change orders from PDF to JSON. $0.04/page via x402.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceHeadless document processing for AI agents. Invoice extraction, contract analysis, and Dutch business verification. Pay-per-use via X402 on Solana. No API keys needed.101-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to extract structured JSON from invoices and receipts in PDF and image formats using Claude Vision. Supports full document parsing, line item extraction, validation, and batch CSV export with API key or cryptocurrency payment options.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for StructDoc that converts documents (PDFs, images) into structured data like Markdown, OCR text, and invoice/receipt fields for AI agents, with pay-per-call via x402 (USDC on Base/Solana).10 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to parse and extract text, metadata, and statistics from PDF documents via URL, with x402 micropayments on Base Mainnet.MIT