Skip to main content
Version: v3

Search the app's code for literal text.

POST 

/ai-builder-api/cli/projects/:projectId/sandbox/search

Finds where text appears in the app's source files (ts, tsx, js, jsx, vue, json, md, css), with dependencies and build output left out. The text is matched literally, not as a pattern. Read the files it finds with POST .../sandbox/view.

Request​

Version stringrequired

The API version.

Available optionsv3
projectId stringrequired

Project identifier.

Possible values: Value must match regular expression ^prj_[A-Za-z0-9]+$

application/json

Bodyrequired

    querystringrequired

    The text to find, matched literally. It cannot start with '-'.

    Possible values: >= 2 characters and <= 200 characters

    pathsstring[]

    Folders to search, relative to the workspace root; the whole app when absent.

    Possible values: <= 2

    ignoreCaseboolean

    Match regardless of case.

    maxResultsinteger

    The most matching lines to return; 30 by default.

    Possible values: >= 1 and <= 60

application/json

The matching lines, at most maxResults.

Schema
    querystringrequired

    The text searched for.

    hitsobject[]required

    The matching lines.

    hitCountintegerrequired

    How many lines matched, up to maxResults.

    truncatedbooleanrequired

    True when more lines matched than were returned.

    searchedPathsstring[]required

    The folders searched.