pageviews and sessions — where each element is a {x, y} point with a date string and a count. Choose your bucket size with the unit parameter (minute, hour, day, month, or year) and optionally request a comparison series for trend overlays.
GET /api/websites/{websiteId}/pageviews
Request
Headers
string
required
Bearer token. Pass your API key:
Authorization: Bearer <api-key>Path Parameters
string
required
The unique UUID of the website to query.
Query Parameters
Date Range & Grouping
number
Start of the date range as a Unix timestamp in milliseconds. Use this or
startDate.number
End of the date range as a Unix timestamp in milliseconds. Use this or
endDate.string
Start of the date range as an ISO 8601 date or datetime. Use this or
startAt.string
End of the date range as an ISO 8601 date or datetime. Use this or
endAt.string
Time bucket size for grouping data points. One of
minute, hour, day, month, or year. Defaults to day.string
IANA time zone for date bucketing, e.g.
Europe/London. Defaults to UTC.string
Attach a comparison series to the response.
prev uses the immediately preceding period; yoy uses the same period one year ago.Filters
string
Filter to a specific URL path, e.g.
/pricing.string
Filter by referring URL.
string
Filter by page title.
string
Filter by URL query string.
string
Filter by operating system.
string
Filter by browser name.
string
Filter by device category:
desktop, mobile, or tablet.string
Filter by ISO 3166-1 alpha-2 country code.
string
Filter by visitor region or subdivision.
string
Filter by visitor city.
string
Filter by browser language, e.g.
fr-FR.string
Filter by custom event name.
string
Filter by UTM campaign source.
string
Filter by UTM campaign medium.
string
Filter by UTM campaign name.
string
Filter by UTM campaign content.
string
Filter by UTM campaign search term.
string
Filter by a tag attached to tracked activity.
string
Filter by hostname.
string
Filter by a custom visitor identifier.
integer
Filter by event type:
1 for pageviews, 2 for custom events.string
Set to any non-empty value to exclude single-pageview visits.
string
UUID of a saved segment to apply as a filter.
string
UUID of a saved cohort to filter visitors by.
string
How multiple filters combine:
all (AND logic, default) or any (OR logic).Response
200 – SuccessTimeSeriesPoint[]
required
Array of
{x, y} data points representing pageview counts over time.string
Date label for the bucket, formatted according to the chosen
unit, e.g. "2024-08-01".number
Pageview count for this time bucket.
TimeSeriesPoint[]
required
Array of
{x, y} data points representing session (visit) counts over time. Same structure as pageviews.string
ISO 8601 start of the resolved date range.
string
ISO 8601 end of the resolved date range.
object
Present when
compare is specified. Contains pageviews, sessions, startDate, and endDate for the comparison period, in the same format as the primary series.200 Response