Initiate Text Extraction Action

Extract text from an uploaded document by using the Amazon Textract API.

You can automate the Intelligent Form Reader’s text detection and extraction steps using this invocable action.

This action is available in API version 58.0 and later for users with the AWSTextract1000LimitAddOn or IntelligentDocumentReaderAddOn license.

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

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a variable.

InputTypeDescription
configurationAPINamestringFor internal use only.
contentDocumentIdstringRequired. The unique content document ID of the uploaded document to initiate text extraction.
You can specify up to 20 content Document IDs.
documentTypeIdstringOptional. The ID of the document type that contains the queries. These queries are used to retrieve the OCR Service. Available in API version 60.0 and later.
endPageIndexintegerOptional. The page number up to which the text must be extracted. The default value is the last page number in the specified document.
ocrServicepicklistOptional. The name of the OCR service that extracts text from the document. Valid values are:
  • AMAZON_TEXTRACT—Indicates the AWS Document service.
  • AMAZON_TEXTRACT_ANALYZE_ID—Indicates the AWS Analyze ID service.
  • AMAZON_TEXTRACT_DETECT_TEXT—Indicates the AWS Detect service that displays the text detected in a document.
  • PDF_DOCX_EXTRACT_TEXT—Indicates the AWS Extract service that automatically extracts content from PDF files.
startPageIndexintegerOptional. The page number to start text extraction. By default, the starting page number is 1.
You can extract text from up to 20 pages in a specified document.
OutputTypeDescription
ocrDocumentScanResultDetailsstringA comma-separated list containing an OcrDocumentScanResult ID and a page number for each extracted page of the specified document.

Sample Request

Sample Response