Performance
BetaThe Performance score and the five Web Vitals at the 75th percentile, over the period and by page and device, as the Performance page shows them. They come from real visits: the tracking script measures each page load.
Parameters
It takes the parameters every report takes, and none of its own.
app.lyli.io/sites/<id>. /sites lists the ones your key can read.today, yesterday, 7d, 30d, 90d, 52w, or a range of days or hours. The last 30 days if left out. Periodsprevious, month, or year. Adds compared to the response.America/New_York. The site’s own if left out.device=mobile. They combine. FiltersRequest
An example site, the last 30 days, read in its own time zone.
curl -G https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/performance \
-H "Authorization: Bearer $LYLI_API_KEY" \
-d period=30d \
-d timezone=Europe/Stockholm// Node 18 or later, on your server
const params = new URLSearchParams({
period: "30d",
timezone: "Europe/Stockholm",
});
const res = await fetch(`https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/performance?${params}`, {
headers: { Authorization: `Bearer ${process.env.LYLI_API_KEY}` },
});
if (!res.ok) throw new Error(`Lyli API: ${res.status}`);
const { score, vitals } = await res.json();import os
import requests
res = requests.get(
"https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/performance",
params={
"period": "30d",
"timezone": "Europe/Stockholm",
},
headers={"Authorization": f"Bearer {os.environ['LYLI_API_KEY']}"},
timeout=10,
)
res.raise_for_status()
score = res.json()["score"]Response
{
"site": "s_k3m9x2p7qa",
"period": {
"key": "30d",
"from": "2026-10-24",
"to": "2026-11-22",
"timezone": "Europe/Stockholm",
"interval": "day"
},
"score": 93,
"rating": "good",
"loads": 1109,
"vitals": {
"lcp": { "p75": 2513, "rating": "needs_work", "samples": 1109 },
"inp": { "p75": 187, "rating": "good", "samples": 776 },
"cls": { "p75": 0.066, "rating": "good", "samples": 1109 },
"fcp": { "p75": 1420, "rating": "good", "samples": 1109 },
"ttfb": { "p75": 515, "rating": "good", "samples": 1109 }
},
"series": [
{ "date": "2026-10-24", "loads": 31, "score": 89 },
{ "date": "2026-10-25", "loads": 37, "score": 89 },
// … 27 more days
{ "date": "2026-11-22", "loads": 28, "score": 95 }
],
"pages": [
{ "page": "/pricing", "loads": 390, "score": 94,
"lcp": 2417, "inp": 183, "cls": 0.066, "fcp": 1365, "ttfb": 516 },
{ "page": "/", "loads": 261, "score": 94,
"lcp": 2386, "inp": 186, "cls": 0.067, "fcp": 1366, "ttfb": 520 }
// … 3 more pages
],
"devices": [
{ "device": "desktop", "loads": 583, "score": 97,
"lcp": 2135, "inp": 143, "cls": 0.049, "fcp": 1172, "ttfb": 433 },
{ "device": "mobile", "loads": 444, "score": 82,
"lcp": 3183, "inp": 272, "cls": 0.108, "fcp": 1843, "ttfb": 663 },
{ "device": "tablet", "loads": 82, "score": 97,
"lcp": 2142, "inp": 154, "cls": 0.051, "fcp": 1195, "ttfb": 439 }
],
"compared": null
}An example site’s numbers. The series and pages are shortened here; the response has all of them.
timezone, and the series’ step, interval, as in the Overview.null with fewer than 20 measured page loads.good (90 and up), needs_work (50 to 89), or poor (below 50). null without a score.null with fewer than 20 samples.good, needs_work, or poor, by the vital’s own thresholds. null without a p75.null with fewer than 10 loads in the step.null with fewer than 20 samples).desktop, mobile, and tablet.null, or with against: the other period’s from, to, score, rating, loads, and vitals. Also null when that period starts before the site’s data does.How it’s measured
Each vital is rated with web.dev’s thresholds. The score gives each vital’s p75 a score on a curve where its good threshold scores 90 and its poor one 50, then weights them as the table says. A vital with too few samples for a p75 (fewer than 20, or 10 in a step of series) drops out, and the others count for more.
- Each page load sends its vitals once, when the visitor leaves the page or switches away. On a single-page app, the whole load’s vitals, interactions and layout shifts after a route change included, count for the page the load started on; a route change gets no vitals of its own.
- Samples differ by vital. INP needs a click, tap, or key press, and a browser that can’t measure a vital leaves it out.
- Filters work as in every report. A page or hostname filter keeps the loads of matching pages.
- Web Vitals never count toward your plan’s usage. What counts toward usage
Errors
against=month for a period over 5 weeks.Every endpoint can also return 401 (missing, revoked, or expired key) and 429 (rate limit reached). All errors
Start from a report
In the app, open Performance, then the Share menu’s Copy as API request: the page on your screen as a curl request, with its period, comparison, and filters as parameters. It reads your API key from the LYLI_API_KEY environment variable, so a copied request never contains a key.