---
title: "Split a PDF by page ranges"
method: POST
path: "/pdf/split"
tags: ["PDF"]
---

# Split a PDF by page ranges

`POST /pdf/split`

## Request

- Base URL: `https://abundanceapis.com`
- URL: `https://abundanceapis.com/pdf/split`
- Auth: none declared

Returns one PDF per range (e.g. '1-3,5'), or one PDF per page if ranges is omitted.

## Request body

- object
  - `file` object, required
    - `base64` string: Base64-encoded PDF (data URIs ok)
    - `url` string: Public URL of a PDF (fetched server-side)
  - `ranges` string: e.g. '1-3,5'. Omit to get one file per page.

## Response `200`

Default Response

- object
  - `count` number
  - `files` object[]
    - `pages` string
    - `pdfBase64` string

## Other responses

- `400`: Bad input
- `413`: Too large
- `502`: Upstream fetch failed
- `504`: Upstream timed out

---

[API](https://skmtc.dev/abundanceapis/apis/web-toolbox.md) · [All operations](https://skmtc.dev/abundanceapis/apis/web-toolbox/llms.txt) · [OpenAPI document](https://skmtc.dev/abundanceapis/apis/web-toolbox/revisions/ada2893fef43?raw)
