get_stats
Retrieve aggregate site metrics (visitors, pageviews, bounce rate, visit duration) for any time period using plain-English date ranges like 'yesterday' or 'last 30 days'.
Instructions
Get aggregate stats (single totals) for a site over a period — visitors, pageviews, bounce rate, visit duration, etc. Use for overview/summary questions like 'how did we do yesterday?'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | No | Site domain (e.g. example.com). | |
| date_range | No | Time period. Friendly keywords (resolved in the site's own timezone): today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year, last_7_days, last_30_days, last_90_days, last_12_months. Also accepts Plausible presets (day, 7d, 30d, month, 6mo, 12mo, year, all), a single date "YYYY-MM-DD", or an explicit range "YYYY-MM-DD,YYYY-MM-DD". For "yesterday"/"last week" etc., prefer the keyword — the server computes the exact dates so you don't have to know today's date. | 30d |
| metrics | No | Metrics to retrieve. | |
| filters | No | Plausible v2 filters, e.g. [["is", "event:page", ["/pricing"]]] or [["contains", "event:page", ["/blog"]]]. |