query
Run raw Plausible Stats API v2 queries for custom property breakdowns, multi-dimension time series, and comparisons. Friendly date keywords like 'yesterday' are automatically resolved.
Instructions
Run a raw Plausible Stats API v2 query for anything the other tools don't cover (custom property breakdowns, multi-dimension + time series, comparisons, imports, behavioral filters). Friendly date keywords like 'yesterday' and 'last_week' ARE resolved here too (in the site's timezone), so you never need to know the date format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | No | Site domain (e.g. example.com). | |
| metrics | Yes | Metrics to retrieve. | |
| date_range | Yes | 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. | |
| dimensions | No | Dimensions to group by. | |
| filters | No | Plausible v2 filters. | |
| order_by | No | e.g. [["visitors", "desc"]]. | |
| pagination | No | ||
| include | No |