Get an analytics time series
websiteAnalytics_timeseries_getReturns one traffic time series bucketed by unit (year, month, day, hour, or minute). series selects which: pageviews returns parallel pageviews and sessions arrays with one point per time bucket (and accepts compare — prev or yoy — to request comparison data for the previous period or year), while events returns tracked custom-event counts as one events point per event name per time bucket. Only the requested series' fields are present in the response. startAt and endAt are Unix epoch milliseconds; timezone is an IANA name (e.g. America/New_York) that controls bucket boundaries; optional filter parameters narrow the data. The series is capped to the most recent maxPoints time buckets (default 30, max 500); a truncated field reports when the cap was applied. Requires a plan that includes analytics (403 otherwise); empty until the website is published and has traffic.
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": {
"websiteId": "<websiteId>",
"startAt": "<startAt>",
"endAt": "<endAt>",
"unit": "<unit>",
"series": "<series>"
},
"name": "websiteAnalytics_timeseries_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| os | No | ||
| tag | No | ||
| city | No | ||
| path | No | ||
| unit | Yes | ||
| endAt | Yes | ||
| event | No | ||
| query | No | ||
| title | No | ||
| cohort | No | ||
| device | No | ||
| region | No | ||
| series | Yes | Which time series to return: `pageviews` for page views and sessions per bucket, `events` for tracked custom-event counts per event name per bucket. | |
| browser | No | ||
| compare | No | Request comparison data alongside the primary series: `prev` for the previous period, `yoy` for the same range one year earlier. Only valid when `series` is `pageviews`. | |
| country | No | ||
| segment | No | ||
| startAt | Yes | ||
| utmTerm | No | ||
| hostname | No | ||
| language | No | ||
| referrer | No | ||
| timezone | No | ||
| maxPoints | No | ||
| utmMedium | No | ||
| utmSource | No | ||
| websiteId | Yes | ||
| distinctId | No | ||
| utmContent | No | ||
| utmCampaign | No |