Your first analysis
Try a PDF analysis without an account. Add a token for your account limits and saved results.
/api/v1/pdf/analyzecurl -X POST https://pdfcheck.online/api/v1/pdf/analyze \
-H "Accept: application/json" \
-F "file=@document.pdf"
Copy failed. Select the code and copy it manually.
- Authentication
- Optional
- Upload limit
- 50 MB
- Base URL
- https://pdfcheck.online/api/v1
Authentication
A token is optional for PDF analysis. Account details, saved analyses and token management require a bearer token.
Treat tokens as secrets. Use an environment variable and revoke unused tokens in your account. Manage API Tokens
curl -X POST https://pdfcheck.online/api/v1/pdf/analyze \
-H "Accept: application/json" \
-H "Authorization: Bearer $PDFCHECK_API_TOKEN" \
-F "file=@document.pdf"
Copy failed. Select the code and copy it manually.
Usage and limits
Guests can upload one file. Verified free accounts share 100 uploads per calendar month across the website, REST and MCP. Pro and AI use their purchased allowances. Processing endpoints also accept up to 30 requests per minute.
| Access | Account uploads | Upload limit |
|---|---|---|
| No token required | One guest upload | 50 MB |
| Free | 100 uploads/month | 50 MB |
| Pro / AI | No daily limit | 100 MB |
Processing endpoints accept up to 30 requests per minute. An upload allowance or a request-rate limit can return HTTP 429.
POST/pdf/analyze
Upload and analyze a PDF file. Returns detailed metadata extracted from the PDF.
| Name | Type | Description |
|---|---|---|
file | multipart/form-data | Required. PDF file to analyze: up to 50 MB for anonymous and Free users; 100 MB for Pro and AI. |
Example response; values vary by document.
{
"success": true,
"data": {
"id": "example-analysis-token",
"view_key": "example-view-key",
"filename": "document.pdf",
"file_size": 1048576,
"file_size_formatted": "1.00 MB",
"metadata": {
"basic": {
"pages": 10,
"pdf_version": "1.7",
"analysis_mode": "lightweight",
"partial_analysis": true
},
"document": {
"title": "Example document",
"author": "Example author",
"creator": "Microsoft Word",
"producer": "Adobe PDF Library"
}
},
"analyzed_at": "2026-09-29T12:00:00+00:00"
},
"remaining_checks": 0
}
Copy failed. Select the code and copy it manually.
A PDF that needs a password to open, or cannot be read at all, is refused before analysis. The error is password_protected or corrupted_pdf, with a message, and no check is used. A PDF that opens without a password but has permission restrictions is analyzed normally.
{
"success": false,
"error": "password_protected",
"message": "This PDF is password-protected. Please unlock it first or use our Password Unlock tool.",
"remaining_checks": 1
}
Copy failed. Select the code and copy it manually.
API metadata analysis uses a bounded, lightweight mode. Detailed font, image and color analysis is skipped; metadata.basic.partial_analysis is true.
Metadata and software indicators do not prove authorship, authenticity or standards compliance.
Upload bytes are deleted after processing; analysis results and metadata may remain. See the privacy policy. Privacy policy
GET/user
Read the account upload allowance, period and remaining checks.
Token required. Example response; values vary by document.
{
"success": true,
"data": {
"name": "Example user",
"email": "user@example.com",
"limit": 100,
"limit_period": "month",
"daily_limit": 100,
"remaining_checks": 99,
"used_in_period": 1
}
}
Copy failed. Select the code and copy it manually.
GET/pdf
List all PDF analyses for the authenticated user with pagination.
Token required
| Query Parameters | Default | Description |
|---|---|---|
per_page | 20 | Number of results per page (1-100) |
page | 1 | integer |
{
"success": true,
"data": [
{
"id": "example-analysis-token",
"filename": "document.pdf",
"file_size": 1048576,
"file_size_formatted": "1.00 MB",
"analyzed_at": "2026-09-29T12:00:00+00:00"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
Copy failed. Select the code and copy it manually.
GET/pdf/{token}
Get detailed analysis results by the analysis ID (share token).
Token required
curl https://pdfcheck.online/api/v1/pdf/example-analysis-token \
-H "Accept: application/json" \
-H "Authorization: Bearer $PDFCHECK_API_TOKEN"
Copy failed. Select the code and copy it manually.
Endpoint reference
POST/pdf/extract-text
Extract text from a PDF. Send the file in the pdf field; this endpoint uses a 50 MB upload limit and returns data.pages.
curl -X POST https://pdfcheck.online/api/v1/pdf/extract-text \
-H "Accept: application/json" \
-F "pdf=@document.pdf"
Copy failed. Select the code and copy it manually.
POST/pdf/to-markdown
Send the PDF in the pdf field (50 MB limit). The general upload allowance applies, plus a Markdown tool limit of 10 conversions per day for Free and 100 per day for Pro and AI. A guest can try one file. The response includes remaining_conversions.
curl -X POST https://pdfcheck.online/api/v1/pdf/to-markdown \
-H "Accept: application/json" \
-F "pdf=@document.pdf"
Copy failed. Select the code and copy it manually.
The text and Markdown endpoints refuse a PDF that needs a password to open (password_protected), cannot be read (corrupted_pdf) or has permission restrictions (permission_restricted). They answer HTTP 422 with a message, read nothing, send nothing to OCR and use no allowance. Their text readers cannot decrypt a file, so unlock a restricted PDF first.
Token Management
Creating tokens through the API requires an existing token. Create your first token in your account. Manage API Tokens
| Endpoints | Description |
|---|---|
GET /tokens | List all API tokens for the authenticated user. |
POST /tokens | Create a new API token. The token is only shown once in the response. name: string (max: 255) |
DELETE /tokens/{tokenId} | Revoke (delete) an API token permanently. |
curl -X POST https://pdfcheck.online/api/v1/tokens \
-H "Accept: application/json" \
-H "Authorization: Bearer $PDFCHECK_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My integration"}'
Copy failed. Select the code and copy it manually.
Error Codes
| HTTP Code | Error Code | Description |
|---|---|---|
| 401 | Unauthenticated. | Invalid or missing API token |
| 404 | not_found | Resource not found or access denied |
| 422 | message / errorscorrupted_pdfpassword_protectedpermission_restrictedanalysis_failed | Invalid request or PDF processing failure, including an unsupported file, upload too large, corrupted PDF or password protection |
| 429 | daily_limit_exceededmessage | Daily or per-minute limit exceeded; retry when the applicable limit resets |
Code Examples
Read the result from data.metadata.basic.pages. All response snippets are illustrative.
Node.js 20 or later; uses native fetch, FormData and Blob.
import { readFile } from 'node:fs/promises';
const form = new FormData();
form.append('file', new Blob([await readFile('document.pdf')], {
type: 'application/pdf'
}), 'document.pdf');
const headers = { Accept: 'application/json' };
if (process.env.PDFCHECK_API_TOKEN) {
headers.Authorization = `Bearer ${process.env.PDFCHECK_API_TOKEN}`;
}
const response = await fetch('https://pdfcheck.online/api/v1/pdf/analyze', {
method: 'POST', headers, body: form
});
const result = await response.json();
if (!response.ok || !result.success) throw new Error(JSON.stringify(result));
console.log(result.data.metadata.basic.pages);
console.log(result.remaining_checks);
Copy failed. Select the code and copy it manually.
Python (requests)
import os
import requests
headers = {'Accept': 'application/json'}
if os.getenv('PDFCHECK_API_TOKEN'):
headers['Authorization'] = f"Bearer {os.environ['PDFCHECK_API_TOKEN']}"
with open('document.pdf', 'rb') as pdf:
response = requests.post(
'https://pdfcheck.online/api/v1/pdf/analyze',
headers=headers,
files={'file': ('document.pdf', pdf, 'application/pdf')},
timeout=120,
)
response.raise_for_status()
result = response.json()
print(result['data']['metadata']['basic']['pages'])
print(result['remaining_checks'])
Copy failed. Select the code and copy it manually.
PHP (cURL)
<?php
$headers = ['Accept: application/json'];
if ($token = getenv('PDFCHECK_API_TOKEN')) {
$headers[] = 'Authorization: Bearer ' . $token;
}
$curl = curl_init('https://pdfcheck.online/api/v1/pdf/analyze');
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => ['file' => new CURLFile('document.pdf', 'application/pdf')],
]);
$body = curl_exec($curl);
if ($body === false) throw new RuntimeException(curl_error($curl));
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
$result = json_decode($body, true, flags: JSON_THROW_ON_ERROR);
if ($status >= 400 || !($result['success'] ?? false)) {
throw new RuntimeException($body);
}
echo $result['data']['metadata']['basic']['pages'];
Copy failed. Select the code and copy it manually.