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

# Search Symbols - POST /v1/workspaces/:workspace_id/code-repos/:repo_id/search

> Semantic-search symbols within a repo via POST /v1/workspaces/:workspace_id/code-repos/:repo_id/search. Minimum role viewer.

Run semantic search within a code repository, returning the most relevant symbols.

## Endpoint

```http theme={null}
POST /v1/workspaces/:workspace_id/code-repos/:repo_id/search
```

## Authentication

`Authorization: Bearer <jwt>` or `X-API-Key <sk_...>`. Minimum role: **viewer**.

## Path parameters

**workspace\_id** `string` *required*

Workspace id.

**repo\_id** `string` *required*

Repo id.

## Request body

**query** `string`

Search text (falls back to the `query` query param when omitted).

**k** `integer`

Number of most-similar symbols to return.

## Response

The response is an array; each element is a symbol (fields identical to [List Symbols](https://docs.ariacompute.com/api-reference/memo/code-repos/symbols.md)).

## Example

```bash cURL theme={null}
curl -X POST https://memo.ariacompute.com/v1/workspaces/ws_01a2b3c4d5e6/code-repos/repo_01a2b3c4d5e6/search \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"query":"register API routes","k":5}'
```

```json 200 theme={null}
[
  {
    "id": "sym_01a2b3c4d5e6",
    "repo_id": "repo_01a2b3c4d5e6",
    "file_path": "internal/api/api.go",
    "name": "RegisterRoutes",
    "kind": "function",
    "signature": "func RegisterRoutes(r *gin.Engine, s *Services)",
    "content": "func RegisterRoutes(...) { ... }",
    "line_start": 50,
    "line_end": 129
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.