API Documentation

REST API with JSON in, JSON out. Version 1.0.

Overview

The Bookpull API is a REST API that accepts JSON and returns JSON. All endpoints require authentication via an API key. The base URL is https://bookpull.ai. Rate limit: 60 requests per minute.

Authentication

Include your API key in the x-api-key header on every request.

x-api-key: YOUR_API_KEY

Rate Limits

The API allows 60 requests per minute per API key.

When you exceed the limit, you'll receive a 429 Too Many Requests response with a Retry-After header indicating when you can retry.

Endpoints

POST /v1/extract/invoice

Extracts structured data from invoice documents including vendor info, line items, totals, and payment details.

Request Body

{
  "document_text": "string (required) — the raw invoice text"
}

This complete labeled-text example fits the verified invoice procedure's supported format. Keep all nine fields, use ISO dates and two decimal places for amounts, and ensure the totals and payment dates agree. This format does not include line items. Other invoice layouts may require an available AI provider. An active extraction API key is required; a benchmark-only subscription does not grant extraction access.

Example

curl -X POST https://bookpull.ai/v1/extract/invoice \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text":"INVOICE\nVendor: ACME Corp\nInvoice Number: INV-0042\nInvoice Date: 2026-09-01\nDue Date: 2026-10-01\nSubtotal: 500.00\nTax: 40.00\nTotal: 540.00\nCurrency: USD\nPayment Terms: Net 30"}'

Example extraction (receipt and execution metadata omitted)

{
  "extraction": {
    "vendor_name": "ACME Corp",
    "invoice_number": "INV-0042",
    "date": "2026-09-01",
    "due_date": "2026-10-01",
    "subtotal": 500,
    "tax": 40,
    "total": 540,
    "currency": "USD",
    "payment_terms": "Net 30"
  }
}
POST /v1/extract/receipt

Extracts structured data from retail or restaurant receipts including merchant, items, and totals.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/extract/receipt \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "Starbucks\nLatte $5.50\nTotal $5.50"}'

Response

{
  "extraction": {
    "merchant": "Starbucks",
    "date": null,
    "items": [{"description": "Latte", "amount": 5.50}],
    "subtotal": null,
    "tax": null,
    "total": 5.50,
    "payment_method": null
  }
}
POST /v1/extract/resume

Parses resume or CV documents, extracting contact info, work experience, education, and skills.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/extract/resume \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "Jane Doe\njane@email.com\nSoftware Engineer at Google 2020-2024"}'

Response

{
  "extraction": {
    "name": "Jane Doe",
    "email": "jane@email.com",
    "phone": null,
    "experience": [{"company": "Google", "title": "Software Engineer", "start": "2020", "end": "2024"}],
    "education": [],
    "skills": []
  }
}
POST /v1/extract/business-card

Extracts contact details from business card text including name, title, company, email, phone, and address.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/extract/business-card \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "John Smith\nCEO\nAcme Inc\njohn@acme.com"}'

Response

{
  "extraction": {
    "name": "John Smith",
    "title": "CEO",
    "company": "Acme Inc",
    "email": "john@acme.com",
    "phone": null,
    "website": null,
    "address": null
  }
}
POST /v1/extract/contract

Identifies key contract terms including parties, effective date, payment terms, termination clauses, and obligations.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/extract/contract \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "Service Agreement between Acme and Client..."}'

Response

{
  "extraction": {
    "parties": ["Acme", "Client"],
    "effective_date": null,
    "expiry_date": null,
    "payment_terms": null,
    "termination_notice_days": null,
    "key_obligations": [],
    "governing_law": null
  }
}
POST /v1/extract/bank-statement

Parses bank statements to extract account info, transactions, opening/closing balances, and period dates.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/extract/bank-statement \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "Chase Bank Statement\nOpening: $1,000\nDeposit $500\nClosing: $1,500"}'

Response

{
  "extraction": {
    "bank_name": "Chase Bank",
    "account_number": null,
    "period_start": null,
    "period_end": null,
    "opening_balance": 1000.0,
    "closing_balance": 1500.0,
    "transactions": [{"date": null, "description": "Deposit", "amount": 500.0, "type": "credit"}]
  }
}
POST /v1/analyze/sentiment

Analyzes the sentiment of any text, returning a label (positive/negative/neutral) and confidence score.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/analyze/sentiment \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "I love this product! Best purchase ever."}'

Response

{
  "analysis": {
    "sentiment": "positive",
    "confidence": 0.97,
    "emotions": ["joy", "satisfaction"],
    "summary": "Strongly positive review expressing love for the product."
  }
}
POST /v1/analyze/email-intent

Classifies the intent of an email — meeting request, complaint, inquiry, follow-up, and more.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/analyze/email-intent \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "Can we schedule a call to discuss Q2 budget?"}'

Response

{
  "analysis": {
    "primary_intent": "meeting_request",
    "secondary_intents": ["budget_discussion"],
    "urgency": "medium",
    "action_required": true,
    "summary": "Request to schedule a call about Q2 budget."
  }
}
POST /v1/analyze/support-ticket

Classifies and prioritizes support tickets by category, urgency, and recommended routing.

Request Body

{
  "document_text": "string (required)"
}

Example

curl -X POST https://bookpull.ai/v1/analyze/support-ticket \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"document_text": "I cannot login to my account and have a presentation in 1 hour!"}'

Response

{
  "analysis": {
    "category": "authentication",
    "priority": "high",
    "urgency": "immediate",
    "sentiment": "frustrated",
    "suggested_team": "tier1_support",
    "summary": "User locked out of account with time-sensitive need."
  }
}
POST /v1/transform/text-to-json

Converts any unstructured text to structured JSON. Provide an optional schema hint to guide the extraction.

Request Body

{
  "document_text": "string (required)",
  "schema_hint": "string (optional) — JSON schema describing desired output"
}

Example

curl -X POST https://bookpull.ai/v1/transform/text-to-json \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "document_text": "MacBook Pro 14 inch, $1999, in stock, rated 4.8 stars",
    "schema_hint": "{\"name\": \"string\", \"price\": \"number\", \"in_stock\": \"boolean\"}"
  }'

Response

{
  "result": {
    "name": "MacBook Pro 14 inch",
    "price": 1999,
    "in_stock": true
  }
}

Error Codes

Status Name Description
400 Bad Request Missing or invalid request body. Check that document_text is present.
401 Unauthorized Missing or invalid API key. Include a valid x-api-key header.
408 Request Timeout Processing took too long. Try with a shorter document.
429 Too Many Requests Rate limit exceeded (60 req/min). Check the Retry-After header.
500 Internal Server Error Unexpected server error. Please retry, and contact support if it persists.

Ready to integrate?

Choose a Bookpull extraction plan using your account email. Sign in with that verified email to manage or replace your API key in the dashboard. Creating an account alone does not issue an extraction key, and a benchmark-only subscription does not include extraction.