About this endpoint
What it does
Splits a PDF into single pages and returns each page as its own PDF. Send the PDF as a public URL or base64 in a JSON body, and choose how the pages come back.
Request Body
| Parameter | Type | Description |
|---|---|---|
| pdf_url | String | Required if pdf_base64 is not set. Public URL of the PDF to split. Must be http or https. Max length 2083 characters. Provide exactly one of pdf_url or pdf_base64. |
| pdf_base64 | String | Required if pdf_url is not set. Base64-encoded PDF to split. |
| filename | String | Name prefix for the page files. Max length 255 characters. Default: page. |
| response_mode | String | How the pages are returned. Allowed values: binary, base64, json, url. Default: binary. |
| output_mode | String | Legacy container option for older clients. Allowed values: zip, array. Default: zip. Use response_mode instead. |
Response
Returns the pages in the shape set by response_mode. In json mode, returns a JSON object with the page count and one entry per page.
| Parameter | Type | Description |
|---|---|---|
| page_count | Integer | Number of pages produced. |
| pages | Object | Map of page file name to the base64-encoded single-page PDF. |
Notes
- Provide exactly one of
pdf_urlorpdf_base64. - Every page is returned. There is no page range option.
binaryreturns a file, not JSON.base64returns onlypages.urlreturns afilesarray withpage,name,file_url,expires_atandexpires_in_secondsfor each page. The links need no authentication and stop working after they expire.- The request body must be under 5 MB. Larger bodies return
413. - A password-protected PDF returns
422. pdf_urlmust be a public address.



