---
title: "Search APM traces"
method: POST
path: "/applications/{application-identifier}/apm/traces/search"
tags: ["apm"]
---

# Search APM traces

`POST /applications/{application-identifier}/apm/traces/search`

Returns a filtered, ordered, and paged set of APM trace summaries for the specified application. The end of the search window is exclusive.

## Request body

- ApmTraceSearchRequest
  - `start` string, date-time, required — Start of the trace search window.
  - `end` string, date-time, required — Exclusive end of the trace search window. The window cannot exceed 30 days.
  - `query` string, nullable — Optional request text with at most 20 whitespace-separated terms. Every term must occur in the HTTP method or trace name.
  - `minimumDurationMilliseconds` integer, nullable — Optional minimum trace duration in milliseconds.
  - `statusCodes` integer[], nullable — Optional HTTP status codes to include.
  - `offset` integer — Zero-based result offset.
  - `count` integer — Maximum traces to return.
  - `sortBy` 'occurredOn' | 'duration' | 'name' | 'statusCode' — Field to order by.
  - `sortDirection` 'ascending' | 'descending' — Direction to order matching traces.

## Response `200`

OK

- ApmTraceSearchResponse
  - `items` ApmTrace[], required — The matching traces in the requested page.
    - `identifier` string, required — The trace identifier in base36, as shown in Raygun URLs.
    - `applicationIdentifier` string, required — The Raygun application identifier in base36.
    - `name` string, required — A privacy-safe request or transaction name. URL path segments are redacted.
    - `httpMethod` string, nullable, required — The HTTP method when the trace represents an HTTP request.
    - `occurredOn` string, date-time, required — When the trace occurred, in UTC.
    - `durationMilliseconds` number, double, required — The total trace duration in milliseconds.
    - `statusCode` integer, nullable, required — The response status code recorded for an HTTP trace, or null for a non-HTTP transaction.
    - `applicationUrl` string, uri, required — A link to the trace in the Raygun application.
  - `totalResults` integer, required — The total number of traces matching the search.
  - `offset` integer, required — The zero-based offset of this page.
  - `count` integer, required — The number of traces returned in this page.
  - `hasMore` boolean, required — Whether another page of matching traces is available.
  - `start` string, date-time, required — The start of the searched window, in UTC.
  - `end` string, date-time, required — The exclusive end of the searched window, in UTC.

## Other responses

- `400` — Problem Details
- `401` — Problem Details
- `403` — Problem Details
- `404` — Problem Details
- `422` — Validation problem details
- `429` — Too Many Requests

---

[API](https://skmtc.net/raygun/apis/raygun-api.md) · [All operations](https://skmtc.net/raygun/apis/raygun-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/raygun/raygun-api/revisions/45caf50be25e/schema)
