Skip to main content
POST
/
local-folders
/
{local_folder_id}
/
grep
Search in local folder
curl --request POST \
  --url https://apigcp.trynia.ai/v2/local-folders/{local_folder_id}/grep \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pattern": "<string>",
  "path": "<string>",
  "case_sensitive": false,
  "context_lines": 2,
  "max_matches": 100
}
'
{
  "matches": [
    {
      "file_path": "<string>",
      "line_number": 123,
      "content": "<string>",
      "context_before": [
        "<string>"
      ],
      "context_after": [
        "<string>"
      ]
    }
  ],
  "total_matches": 123
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

local_folder_id
string
required

Local folder ID

Body

application/json
pattern
string
required

Regex pattern to search

path
string

Path prefix filter

case_sensitive
boolean
default:false
context_lines
integer
default:2

Lines of context around matches

max_matches
integer
default:100

Maximum matches to return

Response

Search results

matches
object[]
total_matches
integer