Python
For Python 3.9 and later. Pass a file path, an open file or a public link, and catch typed errors such as InsufficientCreditsError.
$ pip install parserbeeSend a PDF, scan or phone photo to one endpoint and get back clean JSON with the fields you chose. Call our invoice OCR API from your code, or let your AI assistant call it through the MCP server.
curl -X POST https://app.parserbee.com/api/v1/extract \
-H "x-api-key: $PARSERBEE_API_KEY" \
-F "template_id=your_template_id" \
-F "file=@invoice.pdf"{
"success": true,
"data": {
"invoice_number": "INV-2026-001",
"vendor_name": "Acme Corp",
"total_amount": 1500.00
},
"usage": { "pages_processed": 1, "credits_charged": 1 }
}Open source under the MIT license. Install one, add your API key, and make your first call in a few minutes.
For Python 3.9 and later. Pass a file path, an open file or a public link, and catch typed errors such as InsufficientCreditsError.
$ pip install parserbeeFor Node.js 18 and later. ES modules and CommonJS, with TypeScript types you can shape to your own Parser Template fields.
$ npm install parserbeeLets Claude Desktop, Claude Code, Cursor, VS Code and other MCP clients extract documents with your Parser Templates.
$ npx -y parserbee-mcpOne HTTPS endpoint that any language can call. Send the key in the x-api-key header and a file or a file URL in the body.
POST https://app.parserbee.com/api/v1/extractEvery endpoint, ready to send. The collection saves your template ID and request ID between calls, so you can click through a full run.
The full API description in one JSON file. Import it into your API client or generate a client for another language.
Sign up in under a minute. You get 25 free pages and no credit card is needed.
Upload one sample document and the AI suggests the fields, or pick a ready-made one from the template library. Copy the template ID from the template page.
Open Settings in the dashboard and copy your key. It starts with pk_. Save it as PARSERBEE_API_KEY.
curl -X POST https://app.parserbee.com/api/v1/extract \
-H "x-api-key: $PARSERBEE_API_KEY" \
-F "template_id=your_template_id" \
-F "file=@invoice.pdf"from parserbee import ParserBee
client = ParserBee() # reads PARSERBEE_API_KEY
result = client.extract("your_template_id", "invoice.pdf")
print(result["data"]["invoice_number"])import { ParserBee } from "parserbee";
const client = new ParserBee(); // reads PARSERBEE_API_KEY
const result = await client.extract("your_template_id", { file: "invoice.pdf" });
console.log(result.data.invoice_number);curl -X POST https://app.parserbee.com/api/v1/extract \
-H "x-api-key: $PARSERBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"template_id": "your_template_id", "file_url": "https://example.com/invoice.pdf"}'{
"success": true,
"request_id": "req_abc123",
"data": {
"invoice_number": "INV-2026-001",
"invoice_date": "2026-10-02",
"vendor_name": "Acme Corp",
"total_amount": 1500.00,
"line_items": [
{
"description": "Consulting",
"quantity": 10,
"amount": 1500.00
}
]
},
"credits_remaining": 449,
"processing_time_ms": 2400,
"usage": {
"pages_processed": 1,
"credits_charged": 1,
"doc_size_bytes": 204800
}
}The keys inside data are the field names of your Parser Template. Change the template and the JSON changes with it; your code does not need a new parser for each supplier's layout.
The ParserBee MCP server works in Claude Desktop, Claude Code, Cursor, VS Code and any other Model Context Protocol client, and gives the assistant six tools. Ask in plain words, for example: “Read every receipt in this folder and give me a table of merchant, date and total.”
extract_documentExtract a local file or a public link with a Parser Templatelist_templatesList your Parser Templates and their fieldsget_templateRead one Parser Templateget_creditsCheck your page credit balancelist_recent_extractionsThe last 10 extraction requestsget_extractionOne extraction, with its dataClaude Desktop: Settings > Developer > Edit Config. Claude Code: --scope user makes ParserBee available in every folder, not only the current one; start a new session after you add it. Cursor: ~/.cursor/mcp.json. VS Code: .vscode/mcp.json. You need Node.js 18 or later; more setup notes are in the parserbee-mcp README.
{
"mcpServers": {
"parserbee": {
"command": "npx",
"args": ["-y", "parserbee-mcp"],
"env": { "PARSERBEE_API_KEY": "pk_your_api_key" }
}
}
}claude mcp add parserbee --scope user -e PARSERBEE_API_KEY=pk_your_api_key -- npx -y parserbee-mcp{
"mcpServers": {
"parserbee": {
"command": "npx",
"args": ["-y", "parserbee-mcp"],
"env": { "PARSERBEE_API_KEY": "pk_your_api_key" }
}
}
}{
"servers": {
"parserbee": {
"command": "npx",
"args": ["-y", "parserbee-mcp"],
"env": { "PARSERBEE_API_KEY": "pk_your_api_key" }
}
}
}Base URL https://app.parserbee.com. Every request needs the x-api-key header. The full reference, with request and response examples, is in the API docs.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/v1/extract | Extract data from an uploaded file or a public file URL with a Parser Template |
| GET | /api/v1/templates | List the Parser Templates in your account |
| GET | /api/v1/templates/{id} | One Parser Template with all of its fields |
| GET | /api/v1/credits | Page credit balance, plan and subscription status |
| GET | /api/v1/activity | Your most recent extraction requests |
| GET | /api/v1/activity/{id} | One extraction request, with its extracted data |
1 page credit per page processed, minimum 1 per document. Each response shows what the call cost.
PDF, PNG, JPG, WebP, HEIC and common office files, up to 50 MB. Scans and phone photos work.
multipart/form-data with template_id and file, or JSON with template_id and file_url.
Live status and incident history are on the status page.
| Status | Code | Meaning |
|---|---|---|
| 400 | MISSING_FILE, MISSING_TEMPLATE_ID, INVALID_FILE | A field is missing, or the file type or size is not accepted |
| 401 | INVALID_API_KEY | The x-api-key header is missing or wrong |
| 402 | INSUFFICIENT_CREDITS | No page credits left; the body also holds credits_remaining |
| 403 | SUBSCRIPTION_INACTIVE | The account has no active plan or trial |
| 404 | TEMPLATE_NOT_FOUND | The template ID does not exist in your account |
| 422 | PDF_TOO_LONG | The PDF has more pages than your plan allows in one file |
| 500 | PROCESSING_FAILED | The document could not be processed |
Errors return JSON with error (a message) and code. The Python and Node.js libraries turn each one into its own error class.
Your first 25 pages are on us
Create an account, build a Parser Template from one sample document, and call the API in minutes. No credit card, and the free pages never expire.
Every new account gets 25 free pages in total, with full API access and no credit card. The free pages do not expire. Paid plans start at $29 per month; see pricing.
1 page credit per page processed, with a minimum of 1 per document. A photo or a one-page PDF costs 1 credit and a 10-page PDF costs 10. Each response shows pages_processed and credits_charged, and GET /api/v1/credits returns your balance. The API, the dashboard and the integrations all use the same page credits.
PDF, PNG, JPG, WebP and HEIC, plus Word (.doc), PowerPoint, Excel (.xlsx), CSV, TXT, RTF, ODT, HTML and EML files, up to 50 MB each. Scanned PDFs and phone photos work. DOCX files are not accepted: save them as PDF first.
No. A Parser Template is the schema. Build one from a single sample document with the AI template builder, edit its fields in the dashboard, or start from the template library. The API returns your template's field names, so the JSON has the same shape for every supplier's layout.
Yes. One request returns the extracted data in the same response, so there is no job ID to poll and no webhook to set up.
Send one request per document from a loop or a queue, and check credits_remaining in each response. For a one-off batch with no code, Data Lab in the dashboard takes a set of files and exports one Excel, CSV or Google Sheets file.
There are official libraries for Python and Node.js (with TypeScript types). Any other language can call the REST API with a normal HTTP client, and the OpenAPI 3.1 spec lets you generate a client.
Yes. ParserBee has a native Zapier integration (see the Zapier guide). Make and n8n call the API with their HTTP modules, and ready-made n8n workflows are on GitHub.
Yes, through the ParserBee MCP server. Add it to Claude Desktop, Claude Code, Cursor, VS Code or any other app that supports the Model Context Protocol, and the assistant can extract documents with your Parser Templates, list your templates and check your page credits.
Invoices, receipts, purchase orders, bank statements and more, as JSON your code can trust.