Search file text

http
POST /projects/{project_reference}/files/search

Search file text. Requires project.files.read.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.

Request body

FieldTypeRequiredDescription
querystringYesSearch query (text or regex pattern) across textual project files. Matches contain only the matching line; surrounding context is unsupported.
patternstringFile path pattern filter (for example, *.tsx).
is_regexbooleanTreat query as regex (default: false)
case_sensitivebooleanCase sensitive search (default: false)
limitintegerMaximum matching files, from 1 to 100 (default: 50). Limits files, not lines.
max_resultsintegerEarlier spelling of limit. Maximum matching files, from 1 to 100 (default: 50). Limits files, not lines.
maxResultsintegerCompatibility alias for max_results. Maximum matching files, from 1 to 100 (default: 50). Limits files, not lines.

Responses

StatusDescription
200Search results.
400Invalid query, regex, or limit; unsupported input fields; or conflicting limit aliases.
401Unauthorized
403Forbidden - insufficient permissions
404Not found
500Server error