Merge PDF API
Send a list of PDF URLs and get one PDF back — in the order you choose, with only the pages you need from each file. Built for invoices, report packs and contract bundles.
- Free plan
- No credit card
Request
curl -X POST https://apdf.io/api/pdf/file/merge \
-H "Authorization: Bearer TOKEN" \
-d files[0][file]="FILE_1_URL" \
-d files[0][pages]="1,5-z" \
-d files[1][file]="FILE_2_URL"
const data = new FormData();
data.append('files[0][file]', 'FILE_1_URL');
data.append('files[0][pages]', '1,5-z');
data.append('files[1][file]', 'FILE_2_URL');
fetch('https://apdf.io/api/pdf/file/merge', {
headers: {'Authorization': 'Bearer TOKEN'},
method: 'POST',
body: data
})
.then(response => response.json())
.then(json => console.log(json));
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post(
'https://apdf.io/api/pdf/file/merge', [
'headers' => [
'Authorization' => 'Bearer TOKEN'
],
'form_params' => [
'files[0][file]' => 'FILE_1_URL',
'files[0][pages]' => '1,5-z',
'files[1][file]' => 'FILE_2_URL'
]
]);
$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'
response = RestClient.post(
'https://apdf.io/api/pdf/file/merge',
{
'files[0][file]' => 'FILE_1_URL',
'files[0][pages]' => '1,5-z',
'files[1][file]' => 'FILE_2_URL'
},
{
Authorization: "Bearer TOKEN"
}
)
puts response.body
import requests
response = requests.post(
'https://apdf.io/api/pdf/file/merge',
headers = {
'Authorization': 'Bearer TOKEN'
},
data = {
'files[0][file]': 'FILE_1_URL',
'files[0][pages]': '1,5-z',
'files[1][file]': 'FILE_2_URL'
}
)
print(response.text)
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func main() {
client := resty.New()
data := map[string]string{
"files[0][file]": "FILE_1_URL",
"files[0][pages]": "1,5-z",
"files[1][file]": "FILE_2_URL"
}
resp, _ := client.R().
SetFormData(data).
SetHeader("Authorization", "Bearer TOKEN").
Post("https://apdf.io/api/pdf/file/merge")
fmt.Println(resp.String())
}
import okhttp3.*;
class Pdf {
public static void main(String[] args) throws Exception {
OkHttpClient client = new OkHttpClient();
FormBody formBody = new FormBody.Builder()
.add("files[0][file]", "FILE_1_URL")
.add("files[0][pages]", "1,5-z")
.add("files[1][file]", "FILE_2_URL")
.build();
Request request = new Request.Builder()
.url("https://apdf.io/api/pdf/file/merge")
.addHeader("Authorization", "Bearer TOKEN")
.post(formBody)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
Pick the pages.
Set the order.
Every file in the request carries its own page selection.
The merged PDF follows your list exactly.
- 1,6,4
- Pages 1, 6 and 4, in exactly that order
- 3-7
- Pages 3 through 7
- 2,6-z
- Page 2, then page 6 to the end
- r3-r1
- The last three pages, counted from the back
- (left out)
- The whole file
One file instead of five.
Wherever your product sends several PDFs to one person, a merge turns them into a single document they actually open.
Invoice plus terms
Append your terms and conditions to every invoice your app generates, so the customer gets one attachment instead of two.
Monthly report packs
Collect the reports each team produces into one pack for the board, and keep only the summary pages of the long ones.
Contracts with annexes
Assemble the main contract with just the annex pages that apply to this customer, in the order your legal team expects.
Application dossiers
Turn a CV, a cover letter and a handful of certificates uploaded by an applicant into one file a reviewer can read top to bottom.
Merge from anywhere.
The same merge, wherever your files already live.
One account and one monthly allowance behind every route.
One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.
POST /api/pdf/file/merge
Pick the action in any Zap and map files from earlier steps. No code and no servers to run.
Merge PDFs
Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.
Merge PDF files
Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.
merge-pdf-files
1,000 merges
a month. Free.
Start on the free plan and move up only when your volume does — up to 1,000,000 operations a month on Business.
- One call is one operation, however many pages.
- Only calls that do the work are counted.
- Hard limits, so no surprise overage charges.
Merging PDFs, answered
Merge PDF tutorials
How to Merge PDFs by Asking Claude
Connect Claude to the Apdf MCP server once, and merging PDFs becomes a sentence: describe the result, the agent calls the merge tool, and the combined file comes back seconds later — including per-file page ranges and async jobs for big batches. No upload sites, no scripts.
Combine Monthly Reports into Quarterly Summaries with Go
Automate report compilation by merging multiple PDF files into quarterly or annual summaries using Go. Learn how to create cover pages, skip existing covers, and build professional combined reports automatically.
How to Merge Multiple PDF Reports into a Single File (Node.js & PHP)
This tutorial explains how to combine multiple PDF files into a single document using the Apdf Merge API with Node.js or PHP. By sending file URLs to the API, developers can avoid server memory issues and easily handle advanced tasks, such as excluding cover pages by specifying page ranges.
Your code made the PDF.
Then it went dark.
Opened, read, signed or ignored — you never see any of it. Send the PDFs you generate as personal links, and every open, page read, comment and signature comes back to your software as a webhook. Need it signed? Same link. Same account, same API key, one more call.
API · Webhook · MCP