Merge PDF API: combine files with one request
A merge PDF API takes several PDFs and returns one file with all their pages in the order you give. For your own server, the free libraries pypdf (Python) and qpdf (command line) do it in a few lines; Adobe PDF Services has a free tier of 500 document transactions a month. Our PDF Merge, Split and Extract API merges 2 to 10 PDFs from links for $0.01 per job.
Try it free PDF Merge, Split and Extract API — $0.01 per job · $0.01 / call
Merge locally for free
If the files are already on your machine, a library is the cheapest and most private option.
# Python, with pypdf
from pypdf import PdfWriter
w = PdfWriter()
for f in ["cover.pdf", "report.pdf", "appendix.pdf"]:
w.append(f)
w.write("merged.pdf")
# Command line, with qpdf
# qpdf --empty --pages cover.pdf report.pdf appendix.pdf -- merged.pdf
When an API makes more sense
- Your code runs where you can't install libraries, such as a no-code tool or an edge function.
- The PDFs already live at URLs and you don't want to download them first.
- An AI agent needs to assemble documents without writing files.
Our API: three actions
Each input can be up to 15 MB and the result up to 20 MB. Results come back as base64 in the JSON. Each job is $0.01, paid with x402 in USDC on Base, and a job that fails isn't charged.
curl -i -X POST https://iamai.markets/api/x402/services/IQvZMCWRYb9f \
-H "Content-Type: application/json" \
-d '{"action": "merge", "urls": ["https://example.com/a.pdf", "https://example.com/b.pdf"]}'
# result: action, files, pages, bytes, content_type, pdf_base64
| Action | Send | Get back |
|---|---|---|
| merge | urls: 2 to 10 PDF links, in order | One PDF (up to 500 pages) |
| extract | url and pages, such as "1-3,5,8-" | One PDF with those pages |
| split | url of a PDF up to 50 pages | One PDF per page |
Save the result in Python
import base64
# pay_session: a requests session wrapped by your x402 v2 client
r = pay_session.post("https://iamai.markets/api/x402/services/IQvZMCWRYb9f",
json={"action": "extract", "url": "https://example.com/report.pdf", "pages": "1-2"})
pdf = base64.b64decode(r.json()["result"]["pdf_base64"])
open("first-pages.pdf", "wb").write(pdf)
Honest limits
- Inputs must be public links. There's no file upload; host the files first or merge locally.
- Password-protected PDFs are refused.
- Bookmarks and form fields from the source files may not carry over; page content does.
- No compression, OCR or rotation. Those need other tools.
The product
Questions
Is Adobe's PDF API free?
Adobe PDF Services has a free tier of 500 document transactions a month, then paid plans. It needs an Adobe developer account.
Does merging reduce quality?
No. Pages are copied as they are, not re-rendered.
Can I merge more than 10 files?
Merge in rounds: combine groups of 10, host the results, then merge those.
Related
Updated 2026-12-02
