Merge PDF API
Start building for free today – no credit card required.
Combine multiple PDF files into a single, seamless document with our API. Simply provide the PDFs you want to merge, and our API quickly creates a unified file. Ideal for consolidating reports, bundling invoices, or streamlining document management programmatically.
Claude, ChatGPT, Cursor or your own agent can call
merge-pdf-files directly.
Benefits of our PDF Merge API
Combine multiple PDF files into one unified document with our robust PDF Merge API.
Bring together reports, invoices, or any set of documents while preserving
professional formatting and order. Our API provides complete control over
the merging process, ensuring a polished, coherent file every time. Enjoy
a seamless integration that streamlines your document management
and reduces manual effort.
Read our API documentation to learn how to merge PDFs.
Multi-language Code Example
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());
}
}
No-Code PDF Merging
Integrate our PDF API with Zapier Webhooks to automate your PDF merging workflows effortlessly. Whether you're combining contracts, invoices, or multi-page reports, you can trigger PDF merging from hundreds of apps supported by Zapier. Automatically consolidate multiple files into one cohesive document, streamlining your document management and reducing manual work.
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, re-read, dropped on page 4 — you never see any of it. Share the PDFs you generate through Apdf recipient links, and every signal becomes something you can act on: ping Slack, update the CRM, let an agent follow up. Same account, same API token, one more call.
API · Webhook · MCP