---
title: Search Spans
description: >-
  Filter spans to narrow down, broaden, or shift your focus on the subset of
  spans of current interest.
breadcrumbs: Docs > APM > Trace Explorer > Search Spans
---

# Search Spans

## Overview{% #overview %}

While information from individual spans can be useful visualized as a list, sometimes valuable information can be accessed through aggregation. To access this information, search spans in the Trace Explorer and display them as timeseries, top lists, or tables.

Trace Explorer search consists of a time range and a search query that combines `key:value` and full-text search. Choose which dimension to visualize (count of spans, count of unique values, measure of a quantitative dimension), select a time frame, and group the query by one or multiple dimensions.

## Search query{% #search-query %}

For example, to find spans from a web store service and production environment, over the past thirty minutes, create a custom query like `service:web-store env:prod`, and set the time range to the `Past 30 minutes`:

{% image
   source="https://datadog-docs.imgix.net/images/tracing/trace_explorer/search/trace_explorer_search.0322184607c51a6c9771090526bb2a30.png?auto=format"
   alt="Trace Explorer list search, where user has searched for 'service:web-store' and 'env:prod'" /%}

Group the query by `http.route` to see which specific endpoints are most affected. Read more in trace groups.

{% image
   source="https://datadog-docs.imgix.net/images/tracing/trace_explorer/search/trace_explorer_group_by.bae32a93fb451dea0ec323e90ae5fa27.png?auto=format"
   alt="Trace Explorer list search. The Visualize As option is set to Top List." /%}

## Query Syntax{% #query-syntax %}

To begin searching for spans in the Trace Explorer, read the [query syntax documentation](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax) and the [time frame documentation](https://docs.datadoghq.com/dashboards/guide/custom_time_frames) for more details on custom time frames.

## Further Reading{% #further-reading %}

- [Query Syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax)
- [Getting Started with Search in Datadog](https://docs.datadoghq.com/getting_started/search/)
