Skip to main content
POST
Preview. This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive 403 mcp_not_enabled. See the preview overview.
Searches one repository by meaning and returns the best-matching passages, highest score first. A passage matches when it says what query asks about, even in different words. The call is synchronous: results come back in the same response. Only documents that are indexed are searched. Documents still pending are skipped without an error. To search many repositories at once, use Search Knowledge. With folder_id, the search ranks the repository’s 100 best passages and keeps the ones in the folder and its subfolders. A folder search can therefore return fewer than limit results.

Authentication

Requires an API key, or an OAuth token with repositories:read.

Path parameters

string
required
The repository id.

Body parameters

string
required
What to look for, up to 1,000 characters. A question or a phrase both work, for example "break clause notice period".
string
Only return passages from this folder and its subfolders.
integer
default:"10"
The most results to return, from 1 to 50.

Response

Returns 200 with { "items": [...] }. There is no cursor: raise limit for more results.
object[]
Best match first. Each item is one passage, so one document can appear more than once.

Errors