
Merge PDF API
File Tools
Combine several PDFs into one file. Drag them into order, pick pages from each if you like, and download. Your files never leave your browser.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
20 requests per minute
Endpoints
1 endpoint available
Overview
Combine PDFs into one file, in the order you send them. Optionally take only some pages from each file.
Request
Send multipart/form-data with each PDF in a files field. The response body is the merged PDF (Content-Type: application/pdf).
Limits
- 1 to 20 files, up to 25 MB each.
- The merged PDF can have at most 500 pages.
- Password-protected or damaged PDFs, and page ranges that don't exist, return 422.
Endpoints
POST
https://opentools.ca/api/v1/tools/merge-pdfMerge PDFs into one PDF
Request Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| files | file[] | Required | The PDFs to merge, 1 to 20, in the order they should appear. Repeat the field once per file. |
| ranges | string (JSON array) | Optional | Pages to take from each file, one string per file in the same order, e.g. ["1-3", "", "5, 8-"]. An empty string or "all" means every page. Ranges accept "5", "1-3", "8-" (to the end) and "-4" (from the start). Omit to merge every page of every file. |
Response Example
The merged PDF file (Content-Type: application/pdf, filename merged.pdf).Error Codes
400
Bad Request - missing or invalid fields (see details)401
Unauthorized - missing or invalid API key403
Forbidden - API key inactive or expired, or request IP not allowed413
Payload Too Large - a file is over 25 MB415
Unsupported Media Type - a file is not a PDF422
Unprocessable - a PDF is damaged or password-protected, a page range is invalid, or the result would exceed 500 pages429
Too Many Requests - more than 20 requests per minute for this key500
Internal Server ErrorCode Examples
curl -X POST https://opentools.ca/api/v1/tools/merge-pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files=@cover.pdf" \
-F "files=@report.pdf" \
-F 'ranges=["all", "1-3"]' \
-o merged.pdfRather use it in your browser? Open the Merge PDF