Overview
BetaThe totals, the chart’s series, and the comparison for one site, as its Overview shows them.
GET/api/v1/sites/{site}/overview
Parameters
NameWhat it does
siteIn the path, requiredThe site’s ID, as in its address in the app:
app.lyli.io/sites/<id>. /sites lists the ones your key can read.periodOptional
today, yesterday, 7d, 30d, 90d, 52w, or a range of days or hours. The last 30 days if left out. PeriodsagainstOptional
previous, month, or year. Adds compared to the response.timezoneOptionalA time zone name, such as
America/New_York. The site’s own if left out.channel … contentOptionalAny of the 14 filters, such as
country=SE. They combine. Filterssegment, cohortOptionalA saved segment’s or cohort’s ID.
Request
An example site, the last 30 days, read in its own time zone.
Your terminal
curl -G https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/overview \
-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/overview?${params}`, {
headers: { Authorization: `Bearer ${process.env.LYLI_API_KEY}` },
});
if (!res.ok) throw new Error(`Lyli API: ${res.status}`);
const { totals, series } = await res.json();import os
import requests
res = requests.get(
"https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/overview",
params={"period": "30d", "timezone": "Europe/Stockholm"},
headers={"Authorization": f"Bearer {os.environ['LYLI_API_KEY']}"},
timeout=10,
)
res.raise_for_status()
totals = res.json()["totals"]Response
200 OK · application/json
{
"site": "s_k3m9x2p7qa",
"period": {
"key": "30d",
"from": "2026-09-09",
"to": "2026-10-08",
"timezone": "Europe/Stockholm",
"interval": "day"
},
"totals": {
"views": 503,
"visits": 259,
"visitors": 258,
"bounce_rate": 52.9,
"visit_duration": 365,
"revenue": null
},
"series": [
{ "date": "2026-09-09", "views": 0, "visits": 0, "visitors": 0 },
{ "date": "2026-09-10", "views": 0, "visits": 0, "visitors": 0 },
{ "date": "2026-09-11", "views": 0, "visits": 0, "visitors": 0 },
// … 26 more days
{ "date": "2026-10-08", "views": 4, "visits": 3, "visitors": 3 }
],
"compared": null
}An example site’s numbers. The series is shortened here; the response has all 30 days.
FieldWhat it holds
periodThe period read: its first and last day in
timezone, and the series’ step, interval: hour for today, yesterday, and ranges of up to 2 days, week for 52 weeks and ranges over 120 days, else day.totals.viewsPage loads and single-page-app route changes, repeats included.
totals.visitsVisits started in the period. A visit ends after 30 minutes without activity.
totals.visitorsDistinct visitors in the period. On sites that recognize returning visitors, someone who comes on three days counts once here and once on each day in the series, so the series adds up to more.
totals.bounce_rateThe share of visits with one page view and no custom events, in percent.
null with fewer than 50 visits.totals.visit_durationThe average visit duration, in seconds.
null without visits.totals.revenueRevenue from custom events, in the site’s currency, refunds taken off.
null for a site that has never sent an amount.seriesOne entry per step of the period, oldest first.
compared
null, or with against: the other period’s from, to, totals, and series, in the same shape. Also null when that period starts before the site’s data does.Errors
StatusCodeWhen
400invalid_parameterA period, filter, or time zone we can’t parse.
402workspace_pausedThe workspace is paused.
403site_not_allowedYour key doesn’t have access to this site.
404not_foundNo site with this ID in the workspace.
Every endpoint can also return 401 (missing, revoked, or expired key) and 429 (rate limit reached). All errors
Start from a report
Any Overview’s Share menu has Copy as API request: the view 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.

