---
title: "Search through service logs with a string query"
method: GET
path: "/srch/index/search/service_logs"
tags: ["indexSearch"]
---

# Search through service logs with a string query

`GET /srch/index/search/service_logs`

## Query parameters

- `search_query` string, required
- `mode` string, required
- `worker_group` string
- `hostname` string, required
- `min_ts` string, date-time
- `max_ts` string, date-time

## Response `200`

search results

- object
  - `query_parse_errors` string[] — a list of the terms that couldn't be parsed (and thus ignored)
  - `hits` LogSearchHit[] — the log lines that matched the query, newest first
    - `ts` string, date-time, required — timestamp of the log line itself, not of the file containing it
    - `host` string, required
    - `level` 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', required
    - `target` string, nullable — the tracing target that emitted the line
    - `message` string, required
    - `file_path` string, required — the log file the line came from
    - `line_no` integer, required — offset of the line within its file

## Changes

- **2026-08-29** `7b281701c340` — 1 warning, 7 info
  - removed the optional property `hits/items/dancer` from the response with the `200` status
  - added the optional property `hits/items/target` to the response with the `200` status
  - added the required property `hits/items/file_path` to the response with the `200` status
  - added the required property `hits/items/host` to the response with the `200` status
  - …4 more

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/srch/index/search/service_logs/get.md)

---

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