Read File Text

Extract text without changing the file. Use Unzip File to unpack archives or Download File for original bytes. Unsupported types return 400, compiling documents return 409, and oversized files return 413. degraded: true indicates incomplete or synthesized text, including some legacy .doc and .ppt results; truncated: true indicates a parser limit.

OAuth scope: api:read.

GET/api/v2/files/{fileId}/text
X-API-Key<token>

Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.

In: header

Path Parameters

fileId*string

File identifier.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128

Query Parameters

workspaceId*string

Workspace that owns the file.

Length1 <= length <= 128
maxBytes?integer

Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.

Range1 <= value <= 26214400
offset?integer

First line to return, 1-based. Absent starts at the first line.

Range1 <= value <= 9007199254740991
limit?integer

How many lines to return from offset. Absent reads to the end.

Range1 <= value <= 9007199254740991

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/files/string/text?workspaceId=string" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": {
    "fileId": "string",
    "name": "string",
    "type": "string",
    "text": "string",
    "truncated": true,
    "degraded": true,
    "degradedReason": "string",
    "charCount": 0,
    "byteCount": 0,
    "lineRange": {
      "offset": 1,
      "lineCount": 0,
      "totalLines": 0,
      "totalLinesExact": true
    }
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "CONFLICT",
    "message": "The request conflicts with the current resource state"
  }
}
{
  "error": {
    "code": "PAYLOAD_TOO_LARGE",
    "message": "Request body is too large"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}