> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapengine.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Stat Path

> Return metadata for a workspace path (type, size, mode, mtime, uid/gid).

## Overview

Returns `stat(2)`-style metadata for a workspace path. Works for files, directories, and symlinks. Use this to check existence without pulling content, or to branch on `type` before calling the read vs. list endpoints.

## Path Parameters

<ParamField path="id" type="string" required={true}>
  Browser session ID (UUID).
</ParamField>

## Query Parameters

<ParamField query="path" type="string" required={true}>
  Workspace-relative path to stat.
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -G "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/fs/info" \
    -H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
    --data-urlencode "path=notes/todo.txt"
  ```
</CodeGroup>

## Response

### Success Response (200)

<ResponseField name="path" type="string">
  The workspace-relative path that was stat'd.
</ResponseField>

<ResponseField name="type" type="string">
  One of `file`, `dir`, `symlink`, `other`.
</ResponseField>

<ResponseField name="size" type="integer">
  Size in bytes. For directories this is the directory entry size, not the tree size.
</ResponseField>

<ResponseField name="mode" type="integer">
  Unix mode.
</ResponseField>

<ResponseField name="mtime" type="string">
  Last modified timestamp (ISO 8601).
</ResponseField>

<ResponseField name="uid" type="integer">
  Owner UID.
</ResponseField>

<ResponseField name="gid" type="integer">
  Owner GID.
</ResponseField>

**Example Response:**

```json theme={null}
{
  "path": "notes/todo.txt",
  "type": "file",
  "size": 11,
  "mode": 420,
  "mtime": "2026-04-24T09:12:44Z",
  "uid": 1000,
  "gid": 1000
}
```

### Error Responses

| Status | Description                                |
| ------ | ------------------------------------------ |
| `400`  | Invalid path.                              |
| `401`  | Unauthorized — invalid or missing API key. |
| `404`  | Session or path not found.                 |
