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

Parameters: get_site_stats
NameTypeDescription
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
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"
Python
result = client.call("plausible", "get_site_stats", {"site":"acme-shop.example","from":"2026-10-12","to":"2026-10-18","compare":"previous_period"})
Node.js
const result = await cotlet.call('plausible', 'get_site_stats', {"site":"acme-shop.example","from":"2026-10-12","to":"2026-10-18","compare":"previous_period"});
CLI
cotlet call plausible get_site_stats --data '{"site":"acme-shop.example","from":"2026-10-12","to":"2026-10-18","compare":"previous_period"}'

Example response

JSON

{
  "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%"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.