---
title: "Fs Grep"
method: POST
path: "/fs/{source_id}/grep"
tags: ["Usage"]
---

# Fs Grep

`POST /fs/{source_id}/grep`

## Path parameters

- `source_id` string, required

## Request body

- GrepRequestBody
  - `pattern` string, required — Regex pattern
  - `path` string — Path prefix filter
  - `case_sensitive` boolean
  - `whole_word` boolean
  - `fixed_string` boolean
  - `max_total_matches` integer
  - `max_matches_per_file` integer
  - `context_lines` integer
  - `lines_before` integer, nullable
  - `lines_after` integer, nullable
  - `highlight` boolean
  - `include_line_numbers` boolean
  - `output_mode` string — content|files_with_matches|count
  - `multiline_content` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/trynia/apis/nia-ai-api.md) · [All operations](https://skmtc.net/trynia/apis/nia-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trynia/nia-ai-api/versions/d216ffc3efb6/schema)
