For developers · Python, Node.js and MCP

Document parsing API for invoices, receipts and purchase orders

Send 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.

25 free pages No credit card 1 page credit per page MIT-licensed libraries
pip install parserbeenpm install parserbeenpx -y parserbee-mcp
POST app.parserbee.com/api/v1/extract
Request
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"
Response 200 OK
{
  "success": true,
  "data": {
    "invoice_number": "INV-2026-001",
    "vendor_name": "Acme Corp",
    "total_amount": 1500.00
  },
  "usage": { "pages_processed": 1, "credits_charged": 1 }
}
Get your API key in a minute. 25 free pages, no credit card.
Libraries and SDKs

Official libraries and tools

Open source under the MIT license. Install one, add your API key, and make your first call in a few minutes.

PY

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 parserbee
JS

Node.js and TypeScript

For Node.js 18 and later. ES modules and CommonJS, with TypeScript types you can shape to your own Parser Template fields.

$ npm install parserbee
MCP

MCP server

Lets Claude Desktop, Claude Code, Cursor, VS Code and other MCP clients extract documents with your Parser Templates.

$ npx -y parserbee-mcp
API

REST API

One 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/extract
PM

Postman collection

Every endpoint, ready to send. The collection saves your template ID and request ID between calls, so you can click through a full run.

OAS

OpenAPI 3.1 spec

The full API description in one JSON file. Import it into your API client or generate a client for another language.

Quick start

Your first extraction in three steps

  1. 1

    Create a free account

    Sign up in under a minute. You get 25 free pages and no credit card is needed.

  2. 2

    Make a Parser Template

    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.

  3. 3

    Copy your API key

    Open Settings in the dashboard and copy your key. It starts with pk_. Save it as PARSERBEE_API_KEY.

Extract a document
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"
Response
{
  "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.

MCP server

Extract documents from your AI assistant

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 Template
  • list_templatesList your Parser Templates and their fields
  • get_templateRead one Parser Template
  • get_creditsCheck your page credit balance
  • list_recent_extractionsThe last 10 extraction requests
  • get_extractionOne extraction, with its data

Claude 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" }
    }
  }
}
Reference

The API at a glance

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.

MethodEndpointWhat it does
POST/api/v1/extractExtract data from an uploaded file or a public file URL with a Parser Template
GET/api/v1/templatesList the Parser Templates in your account
GET/api/v1/templates/{id}One Parser Template with all of its fields
GET/api/v1/creditsPage credit balance, plan and subscription status
GET/api/v1/activityYour most recent extraction requests
GET/api/v1/activity/{id}One extraction request, with its extracted data

Billing

1 page credit per page processed, minimum 1 per document. Each response shows what the call cost.

Files

PDF, PNG, JPG, WebP, HEIC and common office files, up to 50 MB. Scans and phone photos work.

Input

multipart/form-data with template_id and file, or JSON with template_id and file_url.

Uptime

Live status and incident history are on the status page.

Errors

StatusCodeMeaning
400MISSING_FILE, MISSING_TEMPLATE_ID, INVALID_FILEA field is missing, or the file type or size is not accepted
401INVALID_API_KEYThe x-api-key header is missing or wrong
402INSUFFICIENT_CREDITSNo page credits left; the body also holds credits_remaining
403SUBSCRIPTION_INACTIVEThe account has no active plan or trial
404TEMPLATE_NOT_FOUNDThe template ID does not exist in your account
422PDF_TOO_LONGThe PDF has more pages than your plan allows in one file
500PROCESSING_FAILEDThe 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.

Get your free API key →Or see pricing

FAQ

Developer questions

Stop retyping documents. Start calling one endpoint.

Invoices, receipts, purchase orders, bank statements and more, as JSON your code can trust.