apyhub
Back

Export Selected PDF Pages API

What it does

PDF Page Extractor lets you send a PDF and specify which pages to pull out. The /extract endpoint accepts a binary PDF file, up to 20 MB, plus a pages string with comma-separated page numbers and ranges such as 1,3-5,8.

Use it when you need to split a larger document into a smaller one without rebuilding the PDF yourself. Common cases include isolating signed pages, pulling a few sections from a report, or extracting only the pages relevant to a support ticket, audit, or review workflow.

The response is a binary PDF containing just the selected pages. Because the output is a file, you can pass it straight into storage, download handling, document processing, or a second transformation step.

PDF Page Extractor is a straightforward file utility: no extra metadata, no intermediate JSON, just the extracted PDF bytes returned from the pages you asked for.

POST
Extract pages from a PDF
https://api.eu.apyhub.com/freedailypro/export-selected-pdf-pages/extract

QUICKSTART

GUIDE

Quickstart

Upload a PDF and specify which pages to extract.

curl -X POST "https://api.eu.apyhub.com/freedailypro/export-selected-pdf-pages/extract" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.pdf" \
  -F "pages=1,3-5,8"

What you'll get back

Returns the extracted PDF as a binary file stream.

(binary file)
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
The PDF. Up to 20 MB.
Comma-separated pages or ranges, for example 1,3-5,8

About this endpoint

What it does

Extracts selected pages from an uploaded PDF and returns the resulting PDF as a binary file.

Request Body

ParameterTypeMandatoryDescription
fileStringYesThe PDF file. Up to 20 MB.
pagesStringYesComma-separated pages or ranges, for example 1,3-5,8.

Response

Returns a binary PDF file containing only the selected pages. The success response is a binary payload with no JSON object wrapper or named fields.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.