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"
const data = new FormData();
data.append('file', 'FILE_URL');
data.append('pages', '1-3,z');
fetch('https://apdf.io/api/pdf/page/delete', {
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/page/delete', [
'headers' => [
'Authorization' => 'Bearer TOKEN'
],
'form_params' => [
'file' => 'FILE_URL',
'pages' => '1-3,z'
]
]);
$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'
response = RestClient.post(
'https://apdf.io/api/pdf/page/delete',
{
'file' => 'FILE_URL',
'pages' => '1-3,z'
},
{
Authorization: "Bearer TOKEN"
}
)
puts response.body
import requests
response = requests.post(
'https://apdf.io/api/pdf/page/delete',
headers = {
'Authorization': 'Bearer TOKEN'
},
data = {
'file': 'FILE_URL',
'pages': '1-3,z'
}
)
print(response.text)
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func main() {
client := resty.New()
data := map[string]string{
"file": "FILE_URL",
"pages": "1-3,z"
}
resp, _ := client.R().
SetFormData(data).
SetHeader("Authorization", "Bearer TOKEN").
Post("https://apdf.io/api/pdf/page/delete")
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("file", "FILE_URL")
.add("pages", "1-3,z")
.build();
Request request = new Request.Builder()
.url("https://apdf.io/api/pdf/page/delete")
.addHeader("Authorization", "Bearer TOKEN")
.post(formBody)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
Drop the pages.
Close the gaps.
Name the pages to remove, by number or from the end.
Everything else stays, in its original order.
- 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.
One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.
POST /api/pdf/page/delete
Pick the action in any Zap and map files from earlier steps. No code and no servers to run.
Delete PDF Pages
Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.
Delete PDF pages
Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.
delete-pdf-pages
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.
Deleting pages, answered
Delete pages tutorials
Automatically Deleting Sensitive Pages from PDFs
Learn how to automatically remove Terms & Conditions, internal notes, or other sensitive pages from PDFs before sharing with third parties. Using Node.js and the Apdf Delete Pages API, you can batch-process documents and strip confidential information in seconds.
Building a Document Previewer: Extract PDF First Page as a Thumbnail
Learn how to build a fast PDF previewer for Document Management Systems using PHP. Extract only the first page as a lightweight thumbnail preview without forcing users to download the entire 50MB file. Perfect for improving DMS user experience and reducing bandwidth.
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.
API · Webhook · MCP