Skip to main content
Version: v2023.18.0

GET Text Positions with Search on Page

This API allows you to search for text positions within a specific page of a document.

API Description

Endpoint:

GET /documents/{documentId}/pages/{page}/text

Resource path:

VariableRequiredDescription
documentIdYesThe ID of a document
pageYesThe index of the page where you want to search for the text

Query params:

VariableRequiredDescription
searchTextYesThe text to search
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
PageSearchResultThe search result containing the positions of the text within the page

Examples

Search Page for Text Positions

The following example demonstrates how to search for the text "example" within page 2 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/pages/2/text?searchText=example&caseSensitive=false&accentSensitive=false&regex=false' \
-H 'accept: application/json'