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.


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.

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.

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());
  }
}

Start using our API today — no trial needed!
Get Started for Free