Back to APIs
AnalyticsBearer Token
Plausible
Plausible is a GDPR-compliant web analytics tool with no cookies, no personal data collection, and a clean API for stats.
Base URL
https://plausible.io/api/v1privacy-firstGDPRno cookieslightweightopen source
Endpoints
GET
/stats/aggregateGet aggregate stats for a site over a time period.
const response = await fetch("https://plausible.io/api/v1/stats/aggregate?site_id=yoursite.com&period=30d&metrics=visitors,pageviews,bounce_rate", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
console.log(data);Response Preview
{
"results": {
"visitors": { "value": 14230 },
"pageviews": { "value": 38140 },
"bounce_rate": { "value": 52.4 }
}
}