Skip to content
Bitaloka Docs
Extract pages

Extract pages

Extract selected pages as a new PDF.

Request

POST https://api.bitaloka.io/v1/pdf/extract
Multipart form→ application/pdf

Parameters

NameTypeDescription
filerequired PDF file The PDF to process (multipart file field).Example: document.pdf
pagesrequired text Pages to keep, e.g. 1-3,5.Example: 1-2

Code samples

Generated from one source and tested against the live API.

curl -sS -X POST "https://api.bitaloka.io/v1/pdf/extract" \
  -H "X-API-Key: $BITALOKA_API_KEY" \
  -F "file=@document.pdf;type=application/pdf" \
  -F 'pages=1-2' \
  --fail-with-body -o extracted.pdf

Uses: curl 7.x+ · example.sh

Response

Returns the processed file as application/pdf. The samples save it as extracted.pdf.

Use from an AI agent

On the Bitaloka MCP server this service is the pdf_extract tool. MCP server →

Related services