---
title: "POST /api/files/search"
method: POST
path: "/api/files/search"
---

# POST /api/files/search

`POST /api/files/search`

## Request body

- FileSearchRequest
  - `depth` integer
  - `includeDirectories` boolean
  - `includeFiles` boolean
  - `limit` integer
  - `path` string, nullable
  - `query` string, required

## Response `200`

Search for files and directories matching a query

- FileSearchResponse
  - `files` FileInfo[], required
    - `children` FileInfo[]
    - `id` string, required
    - `isDirectory` boolean, required
    - `isMarimoFile` boolean, required
    - `lastModified` number, nullable
    - `name` string, required
    - `opengraph` OpenGraphMetadata — OpenGraph-style metadata for a notebook. The `image` field may be either: - a relative path (typically under `__marimo__/`), or - an absolute HTTPS URL.
      - `description` string, nullable
      - `image` string, nullable
      - `title` string, nullable
    - `path` string, required
    - `size` integer, nullable
  - `query` string, required
  - `totalFound` integer, required

## Changes

> 60 revisions in range; 3 could not be searched.

- **2026-07-24** `a6054d54dad6` — 1 info
  - added the optional property `files/items/size` to the response with the `200` status

[Change history](https://skmtc.dev/marimo-team/apis/marimo-api/changes/api/files/search/post.md)

---

[API](https://skmtc.dev/marimo-team/apis/marimo-api.md) · [All operations](https://skmtc.dev/marimo-team/apis/marimo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marimo-team/marimo-api/revisions/a39082aac3ce/schema)
