get_pageviews
Retrieves pageviews and sessions as a time series for a Umami website, letting you chart traffic trends across custom ranges and minute-to-year buckets.
Instructions
Return pageviews and sessions as a time series.
Args:
website_id: Website id from list_websites.
start_at: Range start (ISO date/datetime or epoch milliseconds).
end_at: Range end; defaults to now.
days: Length of the default range when start_at is omitted.
unit: Bucket size: minute, hour, day, month or year.
Returns {"unit": ..., "pageviews": [{"x": bucket, "y": count}, ...], "sessions": [...]}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"website_id": "<website_id>"
},
"name": "get_pageviews"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| unit | No | day | |
| end_at | No | ||
| start_at | No | ||
| website_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||