---
title: "Grep repository (deprecated)"
method: GET
path: "/repositories/{id}/grep"
tags: ["repositories"]
deprecated: true
---

# Grep repository (deprecated)

`GET /repositories/{id}/grep`

> **Deprecated.**

Deprecated: use GET /api/v1/search/grep instead. Searches file contents in a repository using git grep.

## Path parameters

- `id` integer, required

## Query parameters

- `pattern` string, required
- `glob` string
- `limit` integer

## Response `200`

OK

- DtoGrepResponse
  - `data` DtoGrepFileSchema[]
    - `language` string
    - `links` DtoGrepFileLinks
      - `file` string
    - `matches` DtoGrepMatchSchema[]
      - `content` string
      - `line` integer
    - `path` string

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-03-26** `57ca08879f22` — 1 info
  - endpoint added
- **2026-02-19** `41466db231c5` — 1 info
  - api path removed with deprecation

[Change history](https://skmtc.dev/helixml/apis/kodit-api/changes/repositories/:id/grep/get.md)

---

[API](https://skmtc.dev/helixml/apis/kodit-api.md) · [All operations](https://skmtc.dev/helixml/apis/kodit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/helixml/kodit-api/revisions/3f72fa58f3fb/schema)
