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.
Get your API key
Sign up for a free account and generate your API key from the dashboard.
Install the SDK
Choose your preferred language and install our official SDK.
Make your first request
Use the code example below to make your first API call.
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
Authorization: Bearer YOUR_API_KEY
Query Parameter
Alternative method for testing (not recommended for production)
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.
Plan | Requests/Minute | Requests/Hour | Requests/Day |
---|---|---|---|
Free | 60 | 1,000 | 10,000 |
Starter | 300 | 10,000 | 100,000 |
Pro | 600 | 50,000 | 500,000 |
Enterprise | Custom | Custom | Custom |
Rate Limit Headers
Every API response includes headers with rate limit information:
X-RateLimit-Limit
- Maximum requests allowedX-RateLimit-Remaining
- Requests remaining in current windowX-RateLimit-Reset
- Unix timestamp when limit resets
Error Handling
Our API uses standard HTTP status codes to indicate success or failure of requests.
Request completed successfully
Resource created successfully
Invalid request parameters or malformed request body
Missing or invalid API key
Rate limit exceeded
Unexpected server error
Error Response Format
{
"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
/v1/pdf/metadata
Extract comprehensive metadata from PDF documents including title, author, creation date, and custom properties.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
file | File | Required | PDF file to analyze (max 50MB) |
include_fonts | Boolean | Optional | Include font information in response |
include_images | Boolean | Optional | Include image metadata |
Example Request
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
{
"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
/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
/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.