Get site stats
Read the top stats of a site dashboard for a date range, optionally compared with an earlier one.
GET https://cotlet.dev/api/v1/plausible/site-stats
read
Returns unique visitors, visits, pageviews, views per visit, bounce rate and visit duration for the range, the same numbers as the graph at the top of the dashboard. With compare, it adds the same numbers for the matching earlier range and the change in visitors. The current day is incomplete, so a range that ends today understates it.
Parameters
| Name | Type | Description |
|---|---|---|
| site string required | string | Domain of the site as the Sites page lists it, e.g. acme-shop.example. |
| from string | string | First day of the date range, YYYY-MM-DD. Default: the last 30 days. |
| to string | string | Last day of the date range, YYYY-MM-DD. Default: today. |
| compare string | string | previous_period or year_over_year. Leave out for no comparison. |
Request
curl "https://cotlet.dev/api/v1/plausible/site-stats?site=acme-shop.example&from=2026-10-12&to=2026-10-18&compare=previous_period" \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("plausible", "get_site_stats", {"site":"acme-shop.example","from":"2026-10-12","to":"2026-10-18","compare":"previous_period"}) const result = await cotlet.call('plausible', 'get_site_stats', {"site":"acme-shop.example","from":"2026-10-12","to":"2026-10-18","compare":"previous_period"}); cotlet call plausible get_site_stats --data '{"site":"acme-shop.example","from":"2026-10-12","to":"2026-10-18","compare":"previous_period"}' Example response
{
"site": "acme-shop.example",
"from": "2026-10-12",
"to": "2026-10-18",
"visitors": 4210,
"visits": 5033,
"pageviews": 9120,
"views_per_visit": 1.81,
"bounce_rate": "58%",
"visit_duration": "1m 34s",
"compared_to": {
"from": "2026-10-05",
"to": "2026-10-11",
"visitors": 3890,
"pageviews": 8410
},
"visitors_change": "+8%"
}