Fetch Extracted Text Action

Fetch the text extracted from an uploaded document.

This action is available in API version 58.0 and later.

This action is available for users with the AWSTextract1000LimitAddOn or IntelligentDocumentReaderAddOn license.

URI: /services/data/vXX.X/actions/standard/fetchExtractedText

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a variable.

InputTypeDescription
contentDocumentIdstringRequired. The unique content document ID of the uploaded document to get the extracted text.
Note: You can specify up to 20 content document IDs.
endPageIndexIntegerOptional. The page number up to which the extracted text must be retrieved. The default value is the last page number in the specified document.
startPageIndexIntegerOptional. The page number to start fetching the extracted text. The default value is 1.
Note: You can fetch the extracted text from up to 20 pages of a specified document.
OutputTypeDescription
ocrDocumentScanResultDetailsstringThe details of the extracted document including key value pairs of the extracted text, bounding box coordinates, and extraction confidence for the specified documents.
This output is an Apex output type that contains nested arrays in JSON format. The ocrDocumentScanResultDetails output contains an array of the OcrDocumentScanResultDetailsList Apex class.

Sample Request

Sample Response