Search source files
Finds text across every source file and returns one entry per matching line with its file name, line, and column. Call this first to locate code, then read only the files it names with websiteSourceCode.files.read. pattern is literal text unless isRegex is set, and matching is line by line, so a pattern cannot span a newline. Narrow with nameGlob and type, ask for surrounding lines with contextLines, or set filesOnly for the cheapest orientation. Results are cursor-paginated over matches.
Authorizations
Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.
Body
1Text to find. Literal unless isRegex is set. Matched line by line, so ^ and $ anchor to line boundaries and a pattern cannot span a newline.
1 - 500Version alias to read: head (default) or published.
head, published Explicit source version. Takes precedence over target.
x <= 9007199254740991Read pattern as a regular expression. JavaScript syntax works, including \b, \d, lookahead, and lazy quantifiers; named capture groups are not supported.
Match case exactly. Defaults to true.
Only search names matching this glob. * and ? stop at a /; ** crosses them, for example blog/**.
1 - 255Only search files of this type.
page, component, module, global_css, not_found, website_config, custom_head_start, custom_head_end, custom_body_start, custom_body_end Return one entry per matching file, with no line detail.
Surrounding lines to return on each side of a match (0 to 3). Defaults to 0.
0 <= x <= 3Maximum matches from any one file (up to 50). Defaults to 10.
1 <= x <= 50Opaque cursor from the previous page. Pass the returned version too to keep the search pinned.
Maximum matches to return per page. Defaults to 20, maximum 100.
1 <= x <= 100Response
A page of matches for the requested source version.
Opaque cursor for the next page. Pass it as the cursor parameter on the next request. null when this is the last page.
Id of the website.
Source version that was searched. Pass it as version when continuing.
true when a file on this page had more matches than maxMatchesPerFile. Raise it, or narrow the pattern, to see the rest.