NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

PDF Merge API

POST

Combine 2 to 10 PDFs into a single document, in the order you send them.

PDF Merge combines 2 to 10 PDFs into one file, keeping their order, and returns a download link valid for 2 days. Upload the files or send their URLs. Paid plans add a breakdown of where each source document starts and ends in the merged file.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/pdfmerge
Body
pdfs
Click or drag a file to upload.pdf · max 400KB for live testing
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "pdfName": "a356acc9-c44f-4363-9cda-14ed160d5f5d.pdf",
    "fileCount": 2,
    "pageCount": 5,
    "size": 13539,
    "expires": 1792230036453,
    "downloadURL": "https://storage.googleapis.com/apiverve/APIData/pdfmerge/a356acc9-c44f-4363-9cda-14ed160d5f5d.pdf?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1792230036&Signature=R5%2B9%2FIKgsCiWQ7ibAS4Z%2B%2FLpYbNYc7hbAQGI%2FUtvmietXWHJxZK9x4%2FYYdLR6OXAVfvasiSNV2S8iie1Hz7xBGlTJMN8db%2BJ2tkE7GTnOXItMqMU8nuB0z6eddkoQmBESG8EOBr3AEG4x7XaEmP47FqUFsWoikKL2yhwZ9VHL%2F5ANZbvYnfbY1WBjVVOY4wQE1T6CDHM6En2Ov%2FzbTUENH7dasoIaJKWCXa7b1hBhc5MLOMB0MUQWRjb3cVoTHkZ1IRKh3InOdUduyORXOJpwLBTfLu6Q7%2FMEASTXd2j1N9F3OSJ7LYpOfiVhSvA%2FIW6CT2srzKniP5KgeX%2BYKTnNQ%3D%3D",
    "sources": [
      {
        "index": 1,
        "name": "rotation.pdf",
        "pageCount": 2,
        "startPage": 1,
        "endPage": 2
      },
      {
        "index": 2,
        "name": "sizes.pdf",
        "pageCount": 3,
        "startPage": 3,
        "endPage": 5
      }
    ]
  }
}

About the PDF Merge API

A PDF merge API for combining PDFs into one file without installing a PDF library. Upload 2 to 10 PDFs as multipart files, or send their public URLs, and they are joined in the order you give them. Pages are copied whole, so text, images, fonts and page sizes are kept as they were.

The response gives a signed download link to the merged file, valid for two days, along with its file name, page count, size in bytes and the number of files merged. It suits invoice and statement bundles, report packs assembled from several generators, contract packets, and a merge PDF files step in a no-code workflow that already has the documents online.

Each call accepts up to 10 PDFs, 10 MB each and 25 MB in total, with at most 500 pages in the merged file. Encrypted PDFs are rejected; remove the password first. The Free plan returns the merged file and its totals. Paid plans add a breakdown of where each source document starts and ends in the merged PDF, which helps when you build a table of contents or link back to the originals.

How it works

Merging uses the pdf-lib library. A new, empty document is created, and for each input in order every page is copied into it, bringing the page's content and the fonts and images it uses. Only pages are copied: document-level bookmarks and the source files' metadata are not carried into the result.

Input arrives one of two ways. A multipart request is read file by file in form order, and each part must contain a %PDF- header in its first kilobyte. Otherwise urls is read as a JSON array or a comma-separated string of http(s) links, downloaded one after another with a 10 MB limit each and a 20-second timeout; links must point to public hosts. Fewer than 2 or more than 10 PDFs returns 400. A file over 10 MB, a combined size over 25 MB, or a merge that would pass 500 pages returns 413. A password-protected file returns 400 naming that file, and nothing is merged.

fileCount is the number of inputs, pageCount the pages in the result, and size the byte length of the merged file. pdfName is a random file name, downloadURL a signed link to the stored copy, and expires the moment the link stops working, as Unix time in milliseconds, two days after the call. The PDF is not in the response body, so download it before then.

sources lists each input with its 1-based index, name, pageCount, and the startPage and endPage it occupies in the merged file. For URL inputs, name is the last segment of the URL path. On the Free plan sources is null.

What people use it for

Document Packets
Bundle a contract, its schedules and supporting documents into one PDF for signing or archiving.
Report Assembly
Join generated report sections, cover pages and appendices into a single deliverable.
Invoice Batches
Combine a customer's invoices or statements for the month into one file to send.
Application Uploads
Merge the separate scans a user uploads into one document before storing it.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use PDF Merge

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the PDF Merge API.

Read the docs →
How many merges does the Starter plan cover?
Starter covers 20,000 merges each month. At 10 credits per request, that works out to $1.50 per 1,000 merges, or about $0.0015 per merge, however many files each one combines. The Free plan includes 20 merges per month for testing.
What does the Free plan return?
The Free plan returns the merged PDF's download link, file name, page count, file count, size and link expiry. Paid plans add sources, which lists each input file with its page count and the pages it occupies in the merged file.
What are the limits per call?
Each call merges 2 to 10 PDFs, up to 10 MB each and 25 MB in total, and the merged file can have at most 500 pages. Uploads on the Free plan are limited to 400 KB.
What happens with password-protected PDFs?
Encrypted PDFs are rejected with a 400 that names the file. Remove the password first, then merge.
How long is the merged file kept?
The download link is a signed URL that expires after 2 days, given in the expires field as a Unix timestamp in milliseconds.

Ready to build with PDF Merge? Start with 200 free credits — one key unlocks all 404+ APIs.

Explore the catalog

404+ APIs on the same key and the same response shape.

Browse all APIs