---
title: "Search message anchors"
method: GET
path: "/api/v1/data/search"
---

# Search message anchors

`GET /api/v1/data/search`

## Request

- Base URL: `https://moda.dev`
- URL: `https://moda.dev/api/v1/data/search`
- Auth: API key in header `x-api-key`

Searches message content with keyword, semantic, or hybrid retrieval and returns anchors for opening trace context.

## Query parameters

- `q` string, required
- `mode` 'keyword' | 'semantic' | 'hybrid'
- `user_id` string
- `time_range` 'all' | '1h' | '24h' | '3d' | '7d' | '30d' | '90d'
- `since` string
- `until` string
- `limit` integer
- `include_tool_io` 'true' | 'false'

## Response `200`

Successful response.

- object: Message search matches with trace/message anchors, snippets, scores, and optional tool I/O.

## Other responses

- `401`: The x-api-key header is missing, invalid, or revoked.
- `404`: The requested resource was not found.

---

[API](https://skmtc.dev/moda-dev/apis/moda-data-api.md) - [All operations](https://skmtc.dev/moda-dev/apis/moda-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/moda-dev/apis/moda-data-api/revisions/19a11ad88cf6?raw)
