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

# Search Instructions

> Search accessible instruction pages with bounded snippets.

Searches current working-draft instruction pages the caller can read, returning ranked results with bounded snippets. Scope with `workspaceId`/`manualId`; filter drafts by exact audience with `audience`. This endpoint does not search immutable publication snapshots.

**Requirements:** `instructions:read`.

## Request

<ParamField query="q" type="string" required>
  The search query.
</ParamField>

<ParamField query="workspaceId" type="string">
  Restrict to one workspace.
</ParamField>

<ParamField query="manualId" type="string">
  Restrict to one manual.
</ParamField>

<ParamField query="audience" type="string">
  Only draft pages whose audience exactly equals this value.
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor.
</ParamField>

## Response

<ResponseField name="results" type="object[]">
  `{pageId, manualId, workspaceId, title, snippet, score, publicationNumber}`. Because this endpoint searches the working tree only, `publicationNumber` is currently `null`.
</ResponseField>

<ResponseField name="nextCursor" type="string | null">
  Pagination continuation.
</ResponseField>
