---
title: "Get OCR text for a file"
method: GET
path: "/files/{file_id}/text_extraction"
tags: ["Files"]
---

# Get OCR text for a file

`GET /files/{file_id}/text_extraction`

Returns the OCR status and normalized plain text for a task, assignee task, or drive folder file. OAuth clients must have the files_read scope. Text is null while OCR is still processing or when OCR failed.

## Path parameters

- `file_id` integer, required

## Response `200`

successfully returns the text extraction

- object
  - `data` TextExtraction
    - `attachment_id` integer, required
    - `status` 'in_progress' | 'ocr_complete' | 'ocr_failed' | 'complete' | 'viewed', required
    - `text_extraction_type` 'document_analysis' | 'document_text_detection', required
    - `is_blurry` boolean, required
    - `text` string, nullable, required — Normalized plain OCR text, or null until text is available.
    - `updated_at` string, date-time, required

## Other responses

- `403` — missing files_read scope or access is restricted
- `404` — file or text extraction not found

---

[API](https://skmtc.net/gettruss/apis/api-v1.md) · [All operations](https://skmtc.net/gettruss/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gettruss/api-v1/versions/7c956b3d1bdf/schema)
