Read the full analytics overview
get_site_analytics_overview
Reads everything the Analytics tab shows for a site in one call, from the headline totals and series to the top lists and live count.
The answer holds the six headline totals (visitors, visits, pageviews, viewsPerVisit, bounceRate and visitDuration), a time series with one entry per bucket, the top pages, sources, countries, browsers, operating systems and devices, the live visitor count, and the collection status. A site that was never published answers with zeros.
The range is a period, default 7d, or a custom from and to as YYYY-MM-DD, at most 3,660 days apart. interval is hour, day or month and must fit the range, see Analytics HTTP API, and leaving it out picks the default for the range. limit sets the rows per breakdown, 8 by default and at most 25.
filters narrows every number with up to 10 { dimension, operator, value } conditions, and a visit has to match all of them. dimension is page, source, country, browser, os or device, and operator is is, isNot or contains, defaulting to is. With is and contains a visit matching any of the values counts, with isNot one matching none of them, and country values are two-letter codes such as DE.
failed, status, realtime, totals and breakdowns come first and series comes last, as columns rather than points: time, visitors, visits, pageviews, viewsPerVisit, bounceRate, visitDuration and partial are lists of the same length, and entry i of each describes bucket i. time is the UTC start of the bucket and partial marks a bucket still filling, and this shape keeps a year of daily buckets or a month of hourly ones inside a single answer. A breakdown or the live count that could not be loaded comes back as null and is named in failed, while the totals and the series never fall back to zero, so if they cannot be loaded the call fails.
Each call costs 9 of the 1,200 analytics lookups access tokens share per site per hour, one for each part it reads, as Rate limits and result size explains. A part already cached costs nothing, and neither does a site that was never published. Over that limit it fails with Access tokens, through MCP clients or the API, used their 1,200 analytics lookups for this site this hour. Wait and try again! See Visitor analytics.
Request
Call it with a POST to https://api.modulify.ai/v1/get_site_analytics_overview, sending the inputs below as a JSON object. The token needs the analytics:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/get_site_analytics_overview \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the get_site_analytics_overview tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
period |
string | No | The window to report on: day (today so far), 24h, 7d, 30d, 90d, 12mo or all. Defaults to 7d. Leave it out when sending from and to. |
from |
string | No | The first day of a custom range as YYYY-MM-DD in UTC. Send it together with to. |
to |
string | No | The last day of a custom range as YYYY-MM-DD in UTC, included in the range. Send it together with from. |
interval |
string | No | The bucket size of the series, hour, day or month. It must fit the range, and leaving it out picks the default for the range. |
limit |
integer | No | Rows per breakdown, from 1 to 25. Defaults to 8. |
filters |
array of objects | No | Conditions that narrow every number, at most 10, and a visit has to match all of them. Each has a dimension (page, source, country, browser, os or device), an optional operator (is, isNot or contains, default is) and a value, one text or a list of up to 20. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.