viakite
Dashboard

API/Reports/The visitors behind a number

The visitors behind a number

POST/v1/projects/{project}/analytics/visitors

The visitors with an event that passes the filters in the range, latest first, up to limit (100 at most), with how many there are in all: drill-down from any number of a report. A visitor id lasts one day, so a person who came on two days is two rows.

Secret keyNeeds analytics.viewus.api.vk.viabio.me

Path parameters

projectstringrequired
The project's id (prj_…).

Body

filtersFilter[]up to 20 items
A dimension matching any of up to 20 values, or or, a list of such filters (not nested). Filters in a list are ANDed; up to 20 in all. goal matches the names of the project's saved goals an event reaches (is_not: none of them); page_group matches the name of the first of the project's saved page groups whose pattern the event's path matches (empty when none does); new_returning is New or Returning.
Show 4 fields
dimensionstring
A dimension's name; keyed ones take a key: props.plan.
operatorstring
isis_notcontainsnot_containsstarts_withregex
valuesstring[]1–20 items
orFilter[]
date_rangeobjectrequired
A preset, or from and to as dates (2026-11-01, whole days in the project's time zone, to included) or RFC 3339 times (to excluded). Empty means the last 30 days. A range starting before the first day the plan keeps (retention_days of F47: the last N days, today included, in the project's time zone) starts on that day instead: the answer's date_range shows where it starts, and F1, F2 and the public queries add a range_clamped warning. A range wholly before it is empty.
Show 3 fields
presetstring
todayyesterday7d30d90dthis_monthlast_monththis_yearall
fromstring
tostring
limitinteger1–100
How many visitors to list; 100 when left out.

Responses

The visitors, latest first.

dataVisitor[]required
One visitor of a drill-down, summed over the events that passed the filters.
Show 14 fields
visitorstringrequired
The visitor's id for the day: a number, as text.
user_idstringrequired
The user the visitor identified as (identify), or empty.
first_seenstring · date-timerequired
last_seenstring · date-timerequired
visitsnumberrequired
pageviewsnumberrequired
eventsnumberrequired
Custom events.
entry_pagestringrequired
The first page of their first matching visit.
sourcestringrequired
The source of their first matching visit.
countrystringrequired
citystringrequired
device_typestringrequired
browserstringrequired
osstringrequired
totalnumberrequired
Every visitor that passed the filters in the range.
date_rangeobjectrequired
A resolved range [from, to) in UTC.
Show 2 fields
fromstring · date-timerequired
A time in UTC, ISO 8601.
tostring · date-timerequired
A time in UTC, ISO 8601.
Example response
1{
2 "data": [
3 {
4 "visitor": "string",
5 "user_id": "id_01JD8Q2M4W9XK3T7B5",
6 "first_seen": "2026-11-21T09:30:00Z",
7 "last_seen": "2026-11-21T09:30:00Z",
8 "visits": 1.5,
9 "pageviews": 1.5,
10 "events": 1.5,
11 "entry_page": "string",
12 "source": "string",
13 "country": "IN",
14 "city": "string",
15 "device_type": "string",
16 "browser": "string",
17 "os": "string"
18 }
19 ],
20 "total": 1.5,
21 "date_range": {
22 "from": "2026-11-21T09:30:00Z",
23 "to": "2026-11-21T09:30:00Z"
24 }
25}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
422validation_error
503clickhouse_not_configured