Skip to main content
POST
Search file lines with a regular expression

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
query
string
required

An RE2 regular expression, matched line by line. One line, no backreferences, no lookahead or lookbehind.

Maximum string length: 1024
Example:

"refund|return"

limit
integer
default:50

Maximum files to return. Defaults to 50.

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

Cite the file each result came from. Defaults to true.

Response

Files in the live files with matching lines, not ranked. 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

Files with matching lines.