API Documentation

Integrate TigerLab's powerful PDF tools into your applications

Quick Start

  1. 1Sign up or log in to your TigerLab account
  2. 2Go to Account Settings → API Keys
  3. 3Create a new API key and save it securely
  4. 4Start making API requests!

Authentication

All API requests require authentication. Include your API key using one of these methods:

# Option 1: Authorization header
Authorization: Bearer tl_your_api_key_here
# Option 2: X-API-Key header
X-API-Key: tl_your_api_key_here

Rate Limits

Free
1 API key
50/hour
Pro
5 API keys
500/hour
Business
10 API keys
2000/hour

API Endpoints

POST/api/v1/html-to-pdf
Available

Convert HTML content to a PDF document

Request Body (JSON)

{
  "html": "<h1>Your HTML content</h1>",  // Required
  "landscape": true,                      // Optional, default: true
  "format": "A4",                         // Optional, default: "A4"
  "scale": 0.9                            // Optional, default: 0.9
}

cURL

curl -X POST https://tigerlab.co.uk/api/v1/html-to-pdf \
  -H "Authorization: Bearer tl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Hello World</h1>"}' \
  --output document.pdf

JavaScript (Node.js)

const response = await fetch('https://tigerlab.co.uk/api/v1/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer tl_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ html: '<h1>Hello World</h1>' })
});

const pdfBuffer = await response.arrayBuffer();
fs.writeFileSync('document.pdf', Buffer.from(pdfBuffer));

Python

import requests

response = requests.post(
    'https://tigerlab.co.uk/api/v1/html-to-pdf',
    headers={'Authorization': 'Bearer tl_your_api_key'},
    json={'html': '<h1>Hello World</h1>'}
)

with open('document.pdf', 'wb') as f:
    f.write(response.content)

Response

Returns the PDF file as binary data with Content-Type: application/pdf

POST/api/v1/ocr
Available

Extract text from PDF using AI-powered OCR

Request Body (multipart/form-data)

file: PDF file (max 10MB)

Example (cURL)

curl -X POST https://tigerlab.co.uk/api/v1/ocr \
  -H "Authorization: Bearer tl_your_api_key" \
  -F "[email protected]"

Response (JSON)

{
  "success": true,
  "text": "Extracted text content...",
  "filename": "document.pdf",
  "fileSize": 102400
}
POST/api/v1/merge
Available

Merge multiple PDF files into one document

Request Body (multipart/form-data)

files: Multiple PDF files (max 20 files, 20MB each)

cURL

curl -X POST https://tigerlab.co.uk/api/v1/merge \
  -H "Authorization: Bearer tl_your_api_key" \
  -F "[email protected]" \
  -F "[email protected]" \
  --output merged.pdf

Response

Returns the merged PDF file as binary data with Content-Type: application/pdf

POST/api/v1/compress
Available

Compress PDF files to reduce size

Request Body (multipart/form-data)

file: PDF file (max 20MB)
quality: "low" | "medium" | "high" (default: "medium")

cURL

curl -X POST https://tigerlab.co.uk/api/v1/compress \
  -H "Authorization: Bearer tl_your_api_key" \
  -F "[email protected]" \
  -F "quality=medium" \
  --output compressed.pdf

Response

Returns the compressed PDF with Content-Type: application/pdf. Header X-Compression-Ratio shows the size reduction percentage.

POST/api/v1/split
Coming Soon

Split PDF into multiple files

Error Codes

401Invalid or missing API key
403API key lacks required permission
429Rate limit exceeded
500Internal server error
504Request timeout

Need Help?

Questions about the API? We're here to help!

Manage Your API Keys