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

# Search

> API reference for the POST /api/v1/search endpoint

## Search API

### POST /api/v1/search

Search through memos using semantic search.

**Authentication:** Project API Key from [https://platform.useskald.com](https://platform.useskald.com)

**Request (using Project API Key):**

```json theme={null}
{
    "query": "quarterly goals",
    "limit": 10,
    "filters": [
        {
            "field": "source",
            "operator": "eq",
            "value": "notion",
            "filter_type": "native_field"
        },
        {
            "field": "level",
            "operator": "eq",
            "value": "beginner",
            "filter_type": "custom_metadata"
        },
        {
            "field": "tags",
            "operator": "in",
            "value": ["meeting", "q1"],
            "filter_type": "native_field"
        }
    ]
}
```

**Request (using Token Authentication):**

```json theme={null}
{
    "query": "quarterly goals",
    "project_id": "project-uuid",
    "limit": 10,
    "filters": [
        {
            "field": "source",
            "operator": "eq",
            "value": "notion",
            "filter_type": "native_field"
        }
    ]
}
```

**Parameters:**

* `query` (string, required): The search query.
* `project_id` (UUID, optional): **Only required when using Token Authentication**.
* `limit` (integer, optional): Max results to return (1-50, default 10).
* `filters` (array of filter objects, optional): Array of filters to apply. See [Filters](/docs/api-reference/filters) for detailed documentation.

**Response:**

```json theme={null}
{
    "results": [
        {
            "memo_title": "Meeting Notes",
            "memo_uuid": "memo-uuid",
            "chunk_uuid": "chunk-uuid",
            "chunk_content": "Full content of the chunk...",
            "memo_summary": "Discussion about Q1 goals",
            "distance": 0.234
        }
    ]
}
```

**Notes:**

* `distance` is the vector similarity distance (lower is more similar).
* Empty filters array is equivalent to no filters.

**Error Responses:**

Missing query (400):

```json theme={null}
{
    "error": "Query is required"
}
```

Invalid search method (400):

```json theme={null}
{
    "error": "Search method is required and must be one of: title_contains, title_startswith, chunk_vector_search"
}
```

Limit too high (400):

```json theme={null}
{
    "error": "Limit must be less than or equal to 50"
}
```

Invalid filter (400):

```json theme={null}
{
    "error": "Invalid filter: <specific error message>"
}
```

See [Filters](/docs/api-reference/filters) for complete filter documentation and examples.
