# Search

One cross-module lookup endpoint backing the app’s global search box — students, guardians, staff, groups, courses and invoice numbers, filtered to the entity types the caller may read.

Generated from `apps/api/openapi.json`. HTML version: https://docs.institflow.com/en/reference/search

1 operation.

## GET /api/v1/search

Global search across students, guardians, staff, groups, courses and invoice numbers. Each entity type is included only if the caller holds its read permission; at most `limit` (default 5) hits per type.

- Operation id: `SearchController_search_v1`
- Permission: —
- Auth: credential required
- `Idempotency-Key`: not required

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | yes | 2–100 chars |
| `limit` | query | integer | no | 1–10 · default: 5 |

### Responses

**200** — Matching records, grouped by entity type.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `results` | array<object> | yes |  |
| `truncatedTypes` | array<enum: "student" \| "guardian" \| "staff" \| "group" \| "course" \| "invoice"> | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X GET "https://your-institute.example/api/v1/search?q=string" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY"
```
