Skip to main content
Try it live: Split PDF by Text Search → API Tester — send a real request from your browser.

POST /v1/pdf/split2

When splitting a document the pages parameter controls which pages to split out into individual documents. The page limit should not exceed the number of pages in the document - for example, you cannot split a 100 page document into 200 individual documents, however you can split it into 100 individual documents.
The pages parameter is 1-based, meaning the first page is 1 and not 0.

Attributes

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" }

Query parameters

No query parameters accepted.

Responses

searchString

Text to search for on pages. Must be a string. To search for a barcode use the following macros string: [[barcode:<barcodeTypesSeparatedByComma> <barcodeValue>]]. To search for barcode type without analyzing its value, use this notation instead: [[barcode:<barcodeTypesSeparatedByComma>]]. Example #1, split by QR code: “searchString”: “[[barcode:qrcode]]”. Example #2, split by QR code with value: “searchString”: “[[barcode:qrcode pdfco]]”. Example #3, split by QR code with value search with regex: “searchString”: “[[barcode:qrcode /pdf.co/]]”. Example #4, split by QR code or datamatrix with value search with regex: “searchString”: “[[barcode:qrcode,datamatrix /pdf.co/]]”.

Example Payload

To see the request size limits, please refer to the Request Size Limits.

Example Response

To see the main response codes, please refer to the Response Codes page.
Inconsistent URL Encoding in cURL Output: When using cURL to make API requests, the output JSON may show URL characters encoded as Unicode escape sequences. For example, the ampersand character (&) may appear as \u0026 in the cURL output. This is normal JSON encoding behavior and does not affect the validity of the URL. The URL will function correctly when used, as JSON parsers automatically decode these escape sequences. If you’re parsing the response programmatically, your JSON parser will handle this conversion automatically.

Code Samples