---
title: "Search Resources"
method: GET
path: "/search"
tags: ["Search"]
---

# Search Resources

`GET /search`

Unified search endpoint for agents, tasks, and workspaces.

    Searches by name using case-insensitive matching.
    Results are sorted by relevance (exact matches first, then prefix matches, then contains).

## Query parameters

- `q` string, required — Search query (minimum 2 characters)
- `types` string, nullable — Comma-separated list of types to search (agents,tasks,workspaces). If not provided, searches all types.
- `namespace_id` string, nullable — Optional namespace ID to filter results
- `limit` integer — Maximum number of results per type (max 50)

## Response `200`

Successful Response

- SearchResponse — Response from the search endpoint.
  - `query` string, required — The search query that was used
  - `results` SearchResultItem[] — List of search results
    - `id` string, required — The unique identifier
    - `name` string, required — The display name
    - `namespace_id` string, nullable — The namespace this resource belongs to
    - `status` string, nullable — The current status
    - `type` 'agent' | 'task' | 'workspace', required — Types of resources that can be returned in search results.
  - `total` integer, required — Total number of results across all types

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/terminaluse/apis/sb0-api.md) · [All operations](https://skmtc.net/terminaluse/apis/sb0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/terminaluse/sb0-api/revisions/f24a474dc415/schema)
