API Documentation BETA

Build powerful privacy-focused applications with our comprehensive API. Get started in minutes with our developer-friendly endpoints.

Quick Start

Get up and running with PrivacyKit API in under 5 minutes. Follow these simple steps to make your first API call.

1

Get your API key

Sign up for a free account and generate your API key from the dashboard.

2

Install the SDK

Choose your preferred language and install our official SDK.

3

Make your first request

Use the code example below to make your first API call.

JavaScript
const PrivacyKit = require('@privacykit/sdk');

const client = new PrivacyKit({
  apiKey: 'YOUR_API_KEY'
});

// Extract PDF metadata
const metadata = await client.pdf.readMetadata({
  file: './document.pdf'
});

console.log(metadata);

Authentication

All API requests require authentication using your API key. Include your key in the Authorization header.

Bearer Token

Recommended method for production applications

HTTP Header
Authorization: Bearer YOUR_API_KEY

Query Parameter

Alternative method for testing (not recommended for production)

URL
https://api.privacykit.net/v1/endpoint?api_key=YOUR_API_KEY

Security Best Practices

  • Never expose your API key in client-side code
  • Rotate your API keys regularly
  • Use environment variables to store sensitive credentials
  • Implement proper CORS policies for web applications

Rate Limiting

API requests are subject to rate limiting to ensure fair usage and system stability.

PlanRequests/MinuteRequests/HourRequests/Day
Free601,00010,000
Starter30010,000100,000
Pro60050,000500,000
EnterpriseCustomCustomCustom

Rate Limit Headers

Every API response includes headers with rate limit information:

  • X-RateLimit-Limit - Maximum requests allowed
  • X-RateLimit-Remaining - Requests remaining in current window
  • X-RateLimit-Reset - Unix timestamp when limit resets

Error Handling

Our API uses standard HTTP status codes to indicate success or failure of requests.

200 OK

Request completed successfully

201 Created

Resource created successfully

400 Bad Request

Invalid request parameters or malformed request body

401 Unauthorized

Missing or invalid API key

429 Too Many Requests

Rate limit exceeded

500 Internal Server Error

Unexpected server error

Error Response Format

JSON
{
  "error": {
    "code": "invalid_request",
    "message": "The 'file' parameter is required",
    "details": {
      "parameter": "file",
      "type": "missing_required_parameter"
    }
  },
  "request_id": "req_abc123xyz"
}

API Reference

Complete reference for all available endpoints, parameters, and response formats.

PDF Tools

Comprehensive tools for working with PDF documents including metadata extraction, text processing, and conversion.

Read PDF Metadata

POST /v1/pdf/metadata

Extract comprehensive metadata from PDF documents including title, author, creation date, and custom properties.

Request Parameters
ParameterTypeRequiredDescription
fileFileRequiredPDF file to analyze (max 50MB)
include_fontsBooleanOptionalInclude font information in response
include_imagesBooleanOptionalInclude image metadata
Example Request
cURL
curl -X POST https://api.privacykit.net/v1/pdf/metadata \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@document.pdf" \
  -F "include_fonts=true"
Response Example
JSON 200 OK
{
  "metadata": {
    "title": "Annual Report 2023",
    "author": "John Doe",
    "subject": "Financial Results",
    "keywords": ["finance", "annual", "report"],
    "creator": "Microsoft Word",
    "producer": "Adobe PDF Library 15.0",
    "creation_date": "2023-12-01T10:30:00Z",
    "modification_date": "2023-12-15T14:45:00Z",
    "pages": 42,
    "file_size": 2458624,
    "pdf_version": "1.7",
    "is_encrypted": false,
    "is_signed": false,
    "fonts": [
      {
        "name": "Helvetica",
        "type": "Type1",
        "embedded": true
      }
    ]
  },
  "request_id": "req_abc123xyz"
}

Extract Text

POST /v1/pdf/extract-text

Extract text content from PDF documents with support for OCR, layout preservation, and multiple output formats.

Web Tools

Tools for web-related operations including screenshot generation, PDF creation, and metadata extraction.

Create Screenshot Coming Soon

POST /v1/web/screenshot

Generate high-quality screenshots of web pages with customizable viewport, format, and quality settings.

Available Q4 2025

This endpoint is currently under development. Subscribe to our newsletter for updates.