Endpoint
Authentication
All requests must include your API key in theAuthorization header:
Query Parameters
string
required
The domain of your site as configured in Plausible. Example:
example.comstring
required
The dimension to break down the stats by.See the Properties section for all available dimensions.Note:
event:hostname is currently not supported for breakdowns.string
The time period for the query. Valid values:
day- Current day7d- Last 7 days30d- Last 30 daysmonth- Current month6mo- Last 6 months12mo- Last 12 monthscustom- Custom date range (requiresdateparameter)
30d if not specified.string
Date or date range in ISO-8601 format.For single date periods:
2024-01-01For custom periods: 2024-01-01,2024-01-31 (comma-separated start and end dates)Required when period=custom.string
Comma-separated list of metrics to retrieve. Defaults to
visitors if not specified.Available metrics:visitors- Unique visitorsvisits- Total visits (sessions)pageviews- Total pageviewsevents- Total eventsbounce_rate- Bounce rate percentagevisit_duration- Average visit duration in secondsconversion_rate- Goal conversion ratetime_on_page- Average time on page in seconds (only forevent:pagebreakdown)
visitors,pageviews,bounce_rateNote: Each metric can only be specified once.integer
Maximum number of results to return per page. Must be between 1 and 1000.Default:
100integer
Page number for pagination. Use with
limit to paginate through results.Default: 1string
Filter the data by specific dimensions. Format:
dimension==value for equality or dimension!=value for negation.Multiple filters can be combined with semicolons (;).Multiple values for the same dimension can be combined with pipes (|).Wildcard matching is supported using asterisks (*).Examples:event:page==/blog- Filter to a specific pagevisit:country==US- Filter to United States trafficvisit:source==Google|Twitter- Filter to Google or Twitter trafficevent:page==/blog**- Wildcard match for blog pagesvisit:country!=US;visit:source==Google- Combine multiple filters
string
Enable comparison with previous period. Set to
previous_period to compare with the equivalent previous time period.Properties
Available dimensions for breaking down stats:Event Properties
event:page- Page pathevent:name- Custom event nameevent:goal- Goal name (pageview or custom event goal)event:props:*- Custom event properties (e.g.,event:props:author,event:props:button_id)
Visit (Session) Properties
visit:source- Traffic sourcevisit:channel- Traffic channelvisit:country- Country code (ISO 3166-1 alpha-2)visit:region- Region codevisit:city- City namevisit:entry_page- Entry page pathvisit:exit_page- Exit page pathvisit:referrer- Referrer URLvisit:utm_medium- UTM mediumvisit:utm_source- UTM sourcevisit:utm_campaign- UTM campaignvisit:utm_content- UTM contentvisit:utm_term- UTM termvisit:device- Device type (Desktop, Mobile, Tablet)visit:os- Operating systemvisit:os_version- Operating system versionvisit:browser- Browser namevisit:browser_version- Browser version
Metric Constraints
Certain metrics have specific requirements in breakdown queries:time_on_page- Only supported forevent:pagebreakdownviews_per_visit- Not supported in breakdown queriesconversion_rate- When breaking down by dimensions other thanevent:goalor custom properties, this represents the percentage of total visitors in that segment- Session metrics (
visits,bounce_rate,visit_duration) - Cannot be used when breaking down byevent:name,event:goal, or custom event properties (event:props:*)
Response
array
Array of breakdown entries, ordered by the primary metric in descending order.
string
Optional warning message (e.g., when imported stats are excluded)
Examples
Top Pages
Traffic Sources with Comparison
Countries Breakdown
Custom Event Property
Pagination
Error Responses
string
Error message describing what went wrong