Get pageview time series
umami_get_pageviews_seriesRetrieve pageviews and sessions bucketed over time to analyze traffic trends, spikes, and seasonal patterns. Choose custom date ranges, units, and filters for targeted insights.
Instructions
Get pageviews and sessions bucketed over time, for trend and seasonality questions.
Use this when the question is about shape over time rather than a single total: which day spiked, whether traffic is trending up, what the weekday pattern looks like.
Args:
website (string, optional): Website ID, name, or domain.
range (string): Date range, default '7d'.
start_date / end_date (string, optional): Explicit bounds, overriding 'range'.
unit ('minute' | 'hour' | 'day' | 'month' | 'year', optional): Bucket size. Chosen automatically if omitted. Umami caps minute at 60 minutes, hour at 30 days, day at 6 months.
filters (object, optional): Segment filters.
timezone (string, optional): IANA timezone for bucket boundaries.
response_format ('markdown' | 'json'): Output format (default: 'markdown').
Returns: JSON shape: { "website_id": string, "unit": string, "points": [ { "timestamp": string, "pageviews": number, "sessions": number } ], "totals": { "pageviews": number, "sessions": number }, "peak": { "timestamp": string, "pageviews": number } }
Examples:
"Show daily traffic for the last 30 days" -> range="30d", unit="day"
"What hour of the day is busiest?" -> range="24h", unit="hour"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Bucket size for the series. Omit to pick automatically from the range. Umami caps: minute up to 60 minutes, hour up to 30 days, day up to 6 months. | |
| range | No | Date range for the query, default '7d'. Relative ("30m", "24h", "7d", "4w", "3mo", "1y"), named ("today", "yesterday", "this_week", "last_week", "this_month", "last_month", "this_year", "last_year", "mtd", "ytd", "all_time"), or an explicit ISO date via start_date/end_date. | |
| filters | No | Optional segment filters. Supported keys: path, referrer, title, query, browser, os, device, country, region, city, language, hostname, tag, event, distinctId, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, segment, cohort. Example: { country: 'US', device: 'mobile' }. | |
| website | No | Website ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values. | |
| end_date | No | Explicit end date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| timezone | No | IANA timezone for bucketing and day boundaries, e.g. 'America/New_York'. Defaults to UMAMI_TIMEZONE. | |
| start_date | No | Explicit start date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| response_format | No | Output format: 'markdown' for a readable summary, 'json' for raw structured data. | markdown |