Logo
POST /api/pdf/page/extract

Extract PDF Pages API

Send a PDF URL and a list of pages, get back a new PDF with just those pages — in the order you list them. Built for summaries, single invoices and previews.

  • Free plan
  • No credit card

Request

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

Pull out the pages.
Keep the original.

List the pages you want, in the order you want them. They come back as a new PDF next to your original.

annual-report.pdf unchanged example
1
2
3
4
5
6
7
8
9
10
11
12
pages=1-3,6,9-z
extracted.pdf 8 pages
1
2
3
6
9
10
11
12
The pages parameter
1,6,4
Pages 1, 6 and 4, in exactly that order
3-7
Pages 3 through 7
7-3
Pages 7 down to 3, in reverse
2,6-z
Page 2, then page 6 to the end
r3-r1
The last three pages, counted from the back

Only the pages that matter.

Long documents carry more than most readers need. Extract the part they care about and send just that.

Executive summaries

Pull the summary and the key figures out of a long report and send stakeholders a short PDF they will actually read.

One invoice from a statement

Take the pages of a single invoice out of a monthly statement and attach them to that customer's record in your app.

Free previews

Give prospects the first pages of a paid report or ebook as a preview, generated straight from the full file.

Signature pages

Lift just the signature pages out of a signed contract and file them where your team checks for completed deals.

Extract from anywhere.

Pull pages out of files wherever they already live. 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/extract
Open the endpoint docs
Zapier

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

Extract 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.

Extract 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.

extract-pdf-pages
See what agents can do

1,000 page extractions
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

Extracting pages, answered

Extract returns one new PDF built from the pages you list. Split returns several PDFs from one call, one for each range.
The call fails with a 422 response, and the error on the pages field says the number is out of range.
No. Pages are copied over as they are rather than re-rendered, so text stays selectable and images keep their quality.
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 response contains a download URL that stays valid for 60 minutes, plus the page count and size of the new file. Store it 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

Send just the pages
that matter.