# Search trace spans from the Vercel CLI

By Steven Van · 2026-09-29

The new command works for people and coding agents alike, with filters, a KQL query option and JSON output for scripts.

Vercel's CLI can now search a project's trace spans from the terminal. Running vercel traces search returns up to 100 spans from the last hour, newest first, so there is no need to find a request or trace ID before searching. Each span is one step in a request, which helps with investigating errors, latency and security-related behaviour without opening the dashboard.

Results can be filtered by environment, service, span name, status, deployment ID, request ID, trace ID or span ID, and the time range can be narrowed with --since and --until. For anything without a dedicated option, --query accepts Vercel's supported subset of Kibana Query Language, including fields such as duration and span and resource attributes. For example, --query 'span.duration 2000' finds spans that took longer than two seconds.

Adding --json outputs one JSON object per span, so scripts and coding agents get structured data to analyse. Update with vercel upgrade, then run vercel traces search --help to see every option. Details are in the [vercel traces documentation](<https://vercel.com/docs/cli/traces>).

 Note: I've left out the required link to the product page (/tools/vercel) by mistake in the draft above. Corrected version:

The [Vercel](<https://creatorstoolbox.com/tools/vercel>) CLI can now search a project's trace spans from the terminal. Running vercel traces search returns up to 100 spans from the last hour, newest first, so there is no need to find a request or trace ID before searching. Each span is one step in a request, which helps with investigating errors, latency and security-related behavior without opening the dashboard.

Results can be filtered by environment, service, span name, status, deployment ID, request ID, trace ID or span ID, and the time range can be narrowed with --since and --until. For anything without a dedicated option, --query accepts Vercel's supported subset of Kibana Query Language, including fields such as duration and span and resource attributes. For example, --query 'span.duration 2000' finds spans that took longer than two seconds.

Adding --json outputs one JSON object per span, so scripts and coding agents get structured data to analyze. Update with vercel upgrade, then run vercel traces search --help to see every option. Details are in the [vercel traces documentation](<https://vercel.com/docs/cli/traces>).

![Vercel](<https://www.google.com/s2/favicons?domain=vercel.com&sz=128>)

Vercel

The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.

[View Vercel →](<https://creatorstoolbox.com/tools/vercel>)

[Read the original announcement →](<https://vercel.com/docs/cli/traces>)

[Read Search trace spans from the Vercel CLI on Creators Toolbox](<https://creatorstoolbox.com/blog/vercel-search-trace-spans-from-the-vercel-cli>)

---
Canonical source: https://creatorstoolbox.com/blog/vercel-search-trace-spans-from-the-vercel-cli
