Skip to main content
Version: v2023.18.0

GET Text Positions with Search in Document

This API searches for text positions within a specified page range, returning an object that contains the text position found, the last page searched before the process timed out (since the backend has a defined timeout configuration), and the overall status of the search.

Available starting since version 2023.12.0.

API Description

Endpoint:

GET /documents/{documentId}/search

Resource path:

VariableRequiredDescription
documentIdYesThe ID of a document

Query params:

VariableRequiredDescription
searchTextYesThe text to search
fromPageYesThe starting page number for the search. Index starting from 0
toPageNoThe ending page number for the search. If this parameter is set to -1, the search will continue until the last page of the document. Default to -1
caseSensitiveNoDetermines if the search is case-sensitive
accentSensitiveNoDetermines if the search is accent-sensitive
regexNoDetermines if the search text is a regular expression

Response :

TypeDescription
MultiPagesSearchResultThe search result containing the positions of the text within the document

Examples

Search Page for Text Positions

The following example demonstrates how to search for the text "example" from page 2 to page 5 of the document with the ID b64_bm9yZS92SDMtMS0xMTh1735080237. The search is case-insensitive and accent-insensitive.

curl -X 'GET' \
'http://localhost:8761/documents/b64_bm9yZS92SDMtMS0xMTh1735080237/search?searchText=example&fromPage=2&toPage=5&caseSensitive=false&accentSensitive=false&regex=false' \
-H 'accept: application/json'