Skip to content
Docs

Accessing Metrics with Vercel CLI

Use vercel metrics to query Speed Insights data from your terminal. You can reproduce common dashboard views, count collected data points, and order grouped results to find the best and worst performing pages.

Speed Insights metrics are available through vercel metrics without Observability Plus.

The schema is the source of truth for the metrics, dimensions, and aggregations available to your account. Start by inspecting the available Speed Insights metrics:

terminal
vercel metrics schema
vercel metrics schema vercel.speed_insights

Speed Insights exposes value metrics for Core Web Vitals and related Web Vitals. Use vercel.speed_insights.lcp_ms, vercel.speed_insights.inp_ms, and vercel.speed_insights.cls for Core Web Vitals. Use vercel.speed_insights.fcp_ms and vercel.speed_insights.ttfb_ms for the additional Speed Insights metrics.

Query P75 Largest Contentful Paint by route:

terminal
vercel metrics vercel.speed_insights.lcp_ms --aggregation p75 --group-by route --since 7d --project project-name --prod

When you group a Speed Insights value metric, vercel metrics orders results by collected data points for that metric. For the LCP query above, routes are ordered by count desc unless you pass --order-by value.

Query P75 Interaction to Next Paint by device type:

terminal
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --group-by deviceType --since 7d --order-by count --project project-name --prod

Query P75 Cumulative Layout Shift by country:

terminal
vercel metrics vercel.speed_insights.cls --aggregation p75 --group-by country --since 7d --limit 10 --project project-name --prod

Query daily P75 Largest Contentful Paint for one route:

terminal
vercel metrics vercel.speed_insights.lcp_ms --aggregation p75 --filter 'route:/dashboard' --since 7d --granularity 1d --project project-name --prod

Each Speed Insights value metric supports the count aggregation for collected data points. Use data point counts to evaluate how representative a metric value is. Fewer data points can make comparisons less reliable.

By default, grouped queries return the results with the most data points first. To make this explicit, use --order-by count.

Query collected LCP data points by route:

terminal
vercel metrics vercel.speed_insights.lcp_ms --aggregation count --group-by route --since 7d --project project-name --prod

Query collected CLS data points by country:

terminal
vercel metrics vercel.speed_insights.cls --aggregation count --group-by country --since 7d --limit 10 --project project-name --prod

Use --group-by route to compare pages, then use --order-by value to order the grouped results by the selected value metric instead of data point count. Lower values are better for LCP, FCP, INP, TTFB, and CLS.

Find the slowest production routes by P75 LCP:

terminal
vercel metrics vercel.speed_insights.lcp_ms --aggregation p75 --group-by route --since 7d --order-by value --order desc --limit 10 --project project-name --prod

Find the fastest production routes by P75 LCP:

terminal
vercel metrics vercel.speed_insights.lcp_ms --aggregation p75 --group-by route --since 7d --order-by value --order asc --limit 10 --project project-name --prod

Find the routes with the lowest P75 CLS:

terminal
vercel metrics vercel.speed_insights.cls --aggregation p75 --group-by route --since 7d --order-by value --order asc --limit 10 --project project-name --prod

Real Experience Score is not available through vercel metrics; use the Speed Insights dashboard to view Real Experience Score.

The following query shapes are not available in the Speed Insights dashboard. Use them when you need more precise filtering, multi-dimensional comparisons, or team-wide reporting.

Use a field-scoped OR expression to include multiple path prefixes, != to exclude a value, and repeated --group-by options to compare Core Web Vitals for selected path prefixes:

terminal
vercel metrics vercel.speed_insights.lcp_ms --aggregation p75 --filter 'requestPath:(/docs* OR /guides*)' --filter 'country != US' --group-by route --group-by deviceType --since 7d --project project-name --prod

Use --all with projectId to compare Speed Insights metrics across every project in the current team:

terminal
vercel metrics vercel.speed_insights.lcp_ms --all --aggregation p75 --group-by projectId --group-by country --since 7d --limit 20 --prod

For all options, see the vercel metrics reference. For what each dashboard metric measures, see Speed Insights Metrics.

Last updated September 10, 2026

Was this helpful?

supported.