Speed Insights

GET /v1/applications/{uuid}/speed-insights

Real-user Core Web Vitals (RUM) for an application — the p75 of LCP, CLS, INP, FCP, and TTFB, with a good / needs-improvement / poor rating for each. Metrics are measured in real visitors' browsers; there are no cookies and no identifiers.

Speed Insights is a paid feature (the speed_insights entitlement) and is enabled per app with the speed_insights_enabled setting (see below). With it off there are no samples to return.

Query parameters

range string
The time window: 24h, 7d, 30d, or 90d. Default 24h.

Response (200 OK)

total_samples int
How many real-user measurements were collected in the range.
metrics object
Per metric (lcp, cls, inp, fcp, ttfb): the p75 value, a rating of good / needs-improvement / poor, and the good / needs_improvement / poor sample counts.
timeseries array
The p75 of LCP, INP, and CLS bucketed over time across the range (for the trend charts).

Enabling collection

Turn Speed Insights on for an app by sending speed_insights_enabled: true to PUT /v1/applications/{uuid}. Enabling requires the speed_insights entitlement (a 403 otherwise); disabling is always allowed.

Once enabled, the edge serves the collector at GET /_ngris/speed-insights/script.js on the app's own domain and accepts the browser beacon at POST /_ngris/vitals. It auto-injects the collector into served HTML for static apps and fullstack static front-ends — nothing to add by hand. For backend-rendered (dynamic managed-backend) HTML, the edge does not rewrite the response body, so add the one line yourself before </body>:

<script src="/_ngris/speed-insights/script.js" defer></script>

Errors

403
The plan lacks the speed_insights entitlement (on read, or when enabling the setting).
404
Unknown application.
Request
curl "https://api.ngris.com/v1/applications/019be838-d261-7d9b-9499-71995a3a91c6/speed-insights?range=7d" \ -H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "total_samples": 5218, "metrics": { "lcp": { "p75": 1840, "rating": "good", "good": 4102, "needs_improvement": 780, "poor": 336 }, "cls": { "p75": 0.06, "rating": "good", "good": 4890, "needs_improvement": 240, "poor": 88 }, "inp": { "p75": 210, "rating": "needs-improvement", "good": 3120, "needs_improvement": 1600, "poor": 498 }, "fcp": { "p75": 1210, "rating": "good", "good": 4530, "needs_improvement": 520, "poor": 168 }, "ttfb": { "p75": 620, "rating": "good", "good": 4700, "needs_improvement": 410, "poor": 108 } }, "timeseries": [ { "t": "2026-09-14T00:00:00Z", "lcp_p75": 1790, "inp_p75": 205, "cls_p75": 0.05 }, { "t": "2026-09-15T00:00:00Z", "lcp_p75": 1880, "inp_p75": 216, "cls_p75": 0.07 } ] }
Enable it — PUT /v1/applications/{uuid}
curl -X PUT "https://api.ngris.com/v1/applications/019be838-d261-7d9b-9499-71995a3a91c6" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "speed_insights_enabled": true }'
On this page
Speed Insights