---
title: "Search DAG match snippets"
method: GET
path: "/search/dags/{fileName}/matches"
tags: ["search"]
---

# Search DAG match snippets

`GET /search/dags/{fileName}/matches`

Returns cursor-based snippets for one matching DAG definition.

## Path parameters

- `fileName` string, regex, required — Name of the DAG file

## Query parameters

- `remoteNode` string
- `q` string, required
- `labels` string
- `workspace` string
- `cursor` string
- `limit` integer

## Response `200`

Cursor-based DAG match snippets

- SearchMatchesResponse — Cursor-based search match snippets
  - `matches` SearchMatchItem[], required
    - `line` string, required — Matching line content
    - `lineNumber` integer, required — Line number where match was found
    - `startLine` integer, required — Start line for context
  - `hasMore` boolean, required
  - `nextCursor` string

## Other responses

- `400` — Invalid request
- `404` — DAG not found
- `default` — Generic error response

## Changes

- **2026-07-23** (v1) `75b8e91aaf57` — 9 warning
  - added the new `conflict` enum value to the `code` response property for the response status `400`
  - added the new `conflict` enum value to the `code` response property for the response status `404`
  - added the new `conflict` enum value to the `code` response property for the response status `default`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `400`
  - …5 more
- **2026-05-24** (v1) `8a2d5d3e9608` — 3 warning
  - added the new `rate_limited` enum value to the `code` response property for the response status `400`
  - added the new `rate_limited` enum value to the `code` response property for the response status `404`
  - added the new `rate_limited` enum value to the `code` response property for the response status `default`
- **2026-04-30** (v1) `50e1d517afc1` — 3 info
  - removed the `rate_limited` enum value from the `code` response property for the response status `400`
  - removed the `rate_limited` enum value from the `code` response property for the response status `404`
  - removed the `rate_limited` enum value from the `code` response property for the response status `default`

[Change history](https://skmtc.dev/dagucloud/apis/dagu/changes/search/dags/:fileName/matches/get.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) · [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/6f043af8f6d3/schema)
