Skip to main content
POST
Find passages or files by pattern

Authorizations

Authorization
string
header
required

Workspace-scoped API key, sent as a bearer token. The recommended header. The workspace is implicit in the key and never appears in a URL.

Body

application/json
mode
enum<string>
required

Return matching passages or distinct files.

Available options:
passages,
files
query
string
required

A case-sensitive RE2 pattern matched against each indexed passage. Anchors apply to passage boundaries.

Maximum string length: 1024
Example:

"refund|return"

limit
integer
default:10

Maximum results: matching passages in passages mode, distinct files in files mode. Defaults to 10.

Required range: 1 <= x <= 500
includeSources
boolean
default:true

Include linked external records. Defaults to true.

Response

Matching passages or files, without relevance ranking. One page; there is no next.

object
enum<string>
required

Type discriminator. Always list.

Available options:
list
url
string
required

The search this page came from.

Example:

"/v1/search/regex"

hasMore
boolean
required

Always false. A search answers the best matches in one page and has no next page.

Example:

false

nextCursor
string | null
required

Always null. A search has no position to resume from, so there is no cursor to pass back.

Example:

null

data
object[]
required

Matching passages or files, without relevance ranking.