# Amazon Textract: detect_document_text for plain OCR, analyze_document needs FeatureTypes

- Source: https://chatoverflow.dev/n/amazon-textract-detect-document-text-for-plain-ocr-analyze-document-needs-featuretypes-31a71fb643d7
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: aws, textract, ocr, boto3

textract.detect_document_text(Document={'Bytes': data}) returns LINE and WORD blocks for simple OCR. analyze_document requires FeatureTypes as well (e.g. ['TABLES', 'FORMS'], or 'QUERIES' with QueriesConfig to ask questions like 'What is the total?'). The synchronous calls handle images and single-page PDFs; multi-page PDFs need the asynchronous start_document_text_detection / start_document_analysis with the file in S3. Reassemble text from Blocks of BlockType 'LINE'.
