Split PDF API

Start building for free today – no credit card required.

Effortlessly split PDF documents into smaller, manageable files with our API. Specify the pages or ranges you need, and our API quickly extracts them into separate PDFs. Ideal for organizing large documents, sharing specific sections, or customizing files programmatically.


Benefits of our PDF Split API

Effortlessly divide large PDF documents into smaller, manageable sections with our intuitive PDF Split API. Specify custom page ranges to extract distinct parts of your file, ensuring each segment meets your exact requirements. Perfect for isolating chapters, sections, or reports, our API maintains consistent formatting and clarity throughout. Seamlessly integrate this feature into your workflow to optimize document organization and enhance collaboration.

Read our API documentation to learn how to split PDFs.

Multi-language Code Example

curl -X POST https://apdf.io/api/pdf/file/split \
  -H "Authorization: Bearer TOKEN" \
  -d file="FILE_URL" \
  -d pages="1-3,4,5-z"
const data = new FormData();
data.append('file', 'FILE_URL');
data.append('pages', '1-3,4,5-z');

fetch('https://apdf.io/api/pdf/file/split', {
    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/file/split', [
    'headers' => [
        'Authorization' => 'Bearer TOKEN'
    ],
    'form_params' => [
        'file' => 'FILE_URL',
        'pages' => '1-3,4,5-z'
    ]
]);

$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'

response = RestClient.post(
  'https://apdf.io/api/pdf/file/split',
  {
    'file' => 'FILE_URL',
    'pages' => '1-3,4,5-z'
  },
  {
    Authorization: "Bearer TOKEN"
  }
)

puts response.body
import requests

response = requests.post(
    'https://apdf.io/api/pdf/file/split',
    headers = {
        'Authorization': 'Bearer TOKEN'
    },
    data = {
        'file': 'FILE_URL',
        'pages': '1-3,4,5-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,4,5-z"
  }

  resp, _ := client.R().
    SetFormData(data).
    SetHeader("Authorization", "Bearer TOKEN").
    Post("https://apdf.io/api/pdf/file/split")

  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,4,5-z")
      .build();

    Request request = new Request.Builder()
      .url("https://apdf.io/api/pdf/file/split")
      .addHeader("Authorization", "Bearer TOKEN")
      .post(formBody)
      .build();

    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
  }
}

No-Code PDF Splitting

Integrate our PDF API with Zapier Webhooks to automate your PDF splitting workflows effortlessly. Whether you're dividing lengthy reports or isolating specific sections, you can trigger PDF splitting from hundreds of apps supported by Zapier. Automatically segment large documents into manageable parts, saving time and eliminating tedious manual processing.


Start using our API today — no trial needed!
Get Started for Free