Skip to main content

Search Documents

Search documents by title prefix and/or tag. At least one of q or tag is required. Results are scoped to the authenticated user.

Query Parameters

ParameterTypeRequiredDescription
qstringNo*Title prefix to search for (case-insensitive)
tagstringNo*Exact tag to match from metadata.tags
folder_idstringNoScope results to a specific folder
limitintegerNoMax results (default: 20, max: 50)
offsetintegerNoNumber of results to skip
At least one of q or tag is required.
Required role: documents:read

Example Request

Response

Response Fields

FieldTypeDescription
resultsarrayList of matching documents
countintegerNumber of results returned
querystring | nullThe title query used
tagstring | nullThe tag filter used
folder_idstring | nullThe folder scope used
Each result in results contains:
FieldTypeDescription
idstringDocument ID
urlstringURL to view the document
folder_idstringParent folder ID
titlestringDocument title
content_typestringContent type (markdown, html, text)
block_countintegerNumber of content blocks
metadataobject | nullDocument metadata including tags
visibilitystringDocument visibility
current_versioninteger | nullCurrent version number
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last update timestamp

Search Behavior

  • Title search (q): Case-insensitive prefix match. Searching q=api matches “API Documentation”, “api-guide”, etc.
  • Tag search (tag): Exact match against the metadata.tags array.
  • Combined: When both q and tag are provided, results must match both (AND logic).
  • Folder scope: When folder_id is provided, only documents in that folder are searched.

Errors

CodeDescription
422Neither q nor tag provided
401Invalid or missing API key
403API key lacks documents:read role
404Specified folder_id not found