Aggregate (Plausible)
Plausible's GET /api/v1/stats/aggregate: totals of the chosen metrics for a period, with change when compare=previous_period. site_id is the website's domain. Unsupported metrics, properties and periods answer 400. See the Switch from Plausible guide.
Related: Timeseries (Plausible) and Breakdown (Plausible) in Plausible compatibility.
Request
Query parameters
site_idstringrequired1–253 characters
periodstringoptionalUp to 16 characters
datestringoptionalUp to 32 characters
fromstringoptionalUp to 10 characters
tostringoptionalUp to 10 characters
metricsstringoptionalUp to 512 characters
filtersstringoptionalUp to 4096 characters
comparestringoptionalUp to 32 characters
Headers
AuthorizationstringrequiredBearer followed by a site key, an account token or an OAuth access token with the analytics:read scope.
Response
`{ results: { <metric>: { value, change? } } }` (no envelope).
{
"openapi": "3.1.0",
"info": {},
"paths": {}
}Response fields
| Field | Type | Description |
|---|---|---|
| results | object<string, object> |