Search app files
<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Searches the app's files for a pattern and returns the matching lines.
Every sandbox-bridge endpoint runs against the app's live sandbox, the same filesystem the Base44 builder edits, so a change here is visible in the builder immediately.
The pattern is a regular expression by default; set is_regex: false to match it literally. Narrow the search with path to a subtree and glob to a filename pattern. Matching is case-insensitive unless you set case_sensitive.
Finding nothing is a 200 with an empty matches, not a 404. Results are capped at max_results (200 by default, 1000 at most) and the output at 1 MB, and truncated tells you when either cap bit, so treat a true there as "narrow the search" rather than "no more matches".
Base44 keeps its own protected trees out of the results, so a pattern that exists only there returns nothing.
This endpoint is limited to 120 requests per minute per app, shared with the other sandbox-bridge endpoints that only read.
<Note>The sandbox bridge needs a Builder plan or higher on the app's workspace, and answers 402 below that. Workspace API keys are not authorized and are rejected with a 403, and it is unavailable for agent apps. A personal API key works as-is. An OAuth access token needs the apps:read scope; the read endpoints don't require sandbox:write.</Note>
<Tip>Every error response carries a stable extra_data.code alongside the human-readable message. Branch on the code rather than on the message text or the status.</Tip>
Path parameters
ID of the app whose sandbox to operate on.
ID of the app whose sandbox to operate on.
Request body
Response
The matching lines, empty when nothing matched.
Example response
{
"matches": [
{
"line": 2,
"path": "src/pages/Home.jsx",
"text": " return <h1>Hello</h1>;"
}
],
"returned_matches": 1
}