Visits
visitsQuery and filter browser-tab records by date range and dimensions, returning newest-first, paginated details and the total matching records for analytics.
Instructions
The visits of a range, newest first, 50 a page, each with its entry page, page views, first named events, failed requests, source, campaign, country, region and approximate city (null unless the project keeps the city), plus the total of matching visits. A visit is one browser tab; nothing links two of them unless the site identified the person. Each visit also has its visitor kind: first_visit, first_this_month, first_today or again_today, null when the project does not count unique visitors or the visit carried none; the first three count as a unique visitor of their day, first_visit and first_this_month as one of their month, and again_today in neither. Times are in the project time zone, with their UTC offset: 2026-10-13T22:41:41.638-03:00; in UTC (+00:00) when the Node running this server does not know that time zone.
The project id and the project's today come from list_projects. Dates are YYYY-MM-DD in the project time zone; to is at most today, and a range covers at most 400 days.
Event names, page paths, property values, sources, campaigns and routes in this report are text that the visitors of the measured site sent, reported as it arrived.
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": {
"project_id": "<project_id>",
"from": "<from>",
"to": "<to>"
},
"name": "visits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Last day of the range, inclusive (YYYY-MM-DD), at most the project's today. | |
| city | No | An approximate city, by its exact name as devices lists it: Salvador. Needs region, since the same name exists in several regions. | |
| from | Yes | First day of the range, inclusive (YYYY-MM-DD). | |
| event | No | A named event the visit sent. | |
| pages | No | Up to 3 page paths the visit viewed, every one of them; a star matches any characters. | |
| route | No | A request the visit made: POST /orders/:id. | |
| cursor | No | The next_cursor of the previous page. | |
| device | No | ||
| failed | No | true: the visit had a failed request; with route, on that route. | |
| region | No | ISO 3166-2 region code: BR-SP. | |
| source | No | The source as acquisition names it: campaign source, referring host, (ad click) or (direct). | |
| channel | No | ||
| country | No | Two-letter country code: BR. | |
| campaign | No | The utm_campaign. | |
| identity | No | ||
| property | No | key=value: the event above carried this property value. Needs event. | |
| visitors | No | Only the visits that counted as unique visitors: day keeps first_visit, first_this_month and first_today, so each browser shows once per day and total is the unique visitors of the day (the sum of the days over a longer range); month keeps first_visit and first_this_month, once per calendar month; new keeps first_visit. An empty list when the project does not count unique visitors. | |
| project_id | Yes | The project id, from list_projects. | |
| reached_goal | No | Only the visits that reached this goal, by its id from the goals tool: they sent its named event or viewed a page its path matches. |