# Search

> The Search operations of the Hub REST API (4 operations).

URL: https://docs.synap.live/docs/reference/hub-api/search · Generated from Synap-core/backend@c31e261ab (main)

Paths are relative to `/api/hub` on a pod.

## GET /search/collection

Search a single Typesense collection

DEPRECATED — prefer POST /knowledge/ask, which routes across all substrates. Still functional for existing integrations.

Deprecated.

Parameters:

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | query | string | yes |  |
| `collection` | query | SearchCollection | yes |  |
| `query` | query | string | yes |  |
| `workspaceId` | query | string |  |  |
| `limit` | query | string |  |  |
| `page` | query | string |  |  |

Responses:

- `200`: Search results
- `400`: Bad request
- `403`: Forbidden
- `500`: Internal error

## GET /search

Cross-collection Typesense search

DEPRECATED — prefer POST /knowledge/ask, which routes across all substrates. Still functional for existing integrations.

Deprecated.

Parameters:

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | query | string | yes |  |
| `query` | query | string | yes |  |
| `workspaceId` | query | string |  |  |
| `collections` | query | string |  | Comma-separated list of collections (e.g. entities,documents). |
| `limit` | query | string |  |  |
| `page` | query | string |  |  |

Responses:

- `200`: Search results
- `400`: Bad request
- `403`: Forbidden
- `500`: Internal error

## GET /search/documents

Search documents only

DEPRECATED — prefer POST /knowledge/ask, which routes across all substrates. Still functional for existing integrations.

Deprecated.

Parameters:

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | query | string | yes |  |
| `query` | query | string | yes |  |
| `type` | query | "text" \| "markdown" \| "code" \| "pdf" \| "docx" |  |  |
| `limit` | query | string |  |  |

Responses:

- `200`: Document hits
- `400`: Bad request
- `403`: Forbidden
- `500`: Internal error

## GET /vector-search

PGVector semantic search

DEPRECATED — prefer POST /knowledge/ask (the SRE already uses pgvector internally as one signal). Disabled on shared pods (returns empty / 503 when VECTOR_SEARCH_ENABLED=false).

Deprecated.

Parameters:

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | query | string | yes |  |
| `query` | query | string | yes |  |
| `types` | query | string |  | Comma-separated subject types to search (e.g. entity,document). |
| `workspaceId` | query | string |  |  |
| `limit` | query | string |  |  |

Responses:

- `200`: Vector search hits
- `400`: Bad request
- `403`: Forbidden
- `500`: Internal error
