Logo
POST /api/pdf/page/delete

Delete PDF Pages API

Send a PDF URL and the pages to drop, get back the same document without them — the rest in their original order. Made for cover sheets, boilerplate and appendices.

  • Free plan
  • No credit card

Request

curl -X POST https://apdf.io/api/pdf/page/delete \
  -H "Authorization: Bearer TOKEN" \
  -d file="FILE_URL" \
  -d pages="1-3,z"

Drop the pages.
Close the gaps.

Name the pages to remove, by number or from the end. Everything else stays, in its original order.

scan-batch.pdf pages=1-3,z example
Before · 12 pages
1 2 3 4 5 6 7 8 9 10 11 12
4 5 6 7 8 9 10 11
After · 8 pages
The pages parameter
1,4,6
Pages 1, 4 and 6
1-3,z
The first three pages and the last one
2,6-z
Page 2, and page 6 to the end
r3-r1
The last three pages, counted from the back
z
Only the last page

Only what belongs there.

Many PDFs arrive with pages nobody needs. Remove them on the way in, before they reach your users.

Scanner cover sheets

Batch scans often start with a cover or separator sheet. Drop it before the document lands in your archive.

Generated boilerplate

Your report tool always adds a title page and an appendix. Remove them for readers who only need the content.

Filled-in forms

Remove the instructions page from a completed form before you send it back or file it with the rest of the case.

Supplier documents

Drop the marketing pages a supplier appends to every price list or datasheet before you share it with your team.

Delete from anywhere.

Trim files in the same step that receives them. One account and one monthly allowance behind every route.

Your code

One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.

POST /api/pdf/page/delete
Open the endpoint docs
Zapier

Pick the action in any Zap and map files from earlier steps. No code and no servers to run.

Delete PDF Pages
Use it in Zapier
n8n

Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.

Delete PDF pages
Use it in n8n
AI agents

Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.

delete-pdf-pages
See what agents can do

1,000 trimmed PDFs
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.
Plan PDF operations / month
Hobby Free
$0 / month
1,000
Pro
$39–$99 / month
20,000 – 60,000
Business
$149–$899 / month
100,000 – 1,000,000

Deleting pages, answered

The call fails with a 422 response, because a PDF needs at least one page left.
Use delete when you know what to drop, like a cover sheet or the last page. Use extract when you know exactly which pages to keep.
The response includes the page count and file size of the new PDF, next to its download URL.
As a URL: Apdf downloads the file, up to 100 MB. In Zapier and n8n you can map the file from an earlier step instead.
The download URL in the response stays valid for 60 minutes. Store the file on your side if you need it longer.
After the API call

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.

Your PDF, after sending Live
document:loaded CFO
page:read p4 · 38s
signature:signed 11:48

API · Webhook · MCP

Leave out the pages
nobody needs.