Skip to main content

Analytics

Analytics overview

Traffic totals, a bucketed timeseries, and the AI-vs-human split for a time window. Defaults to the last 30 days. Bot traffic is excluded from totals and timeseries unless bots=included; the AI split always counts both sides.

GET/projects/{id}/analytics/overview
Analytics overview
curl --request GET \
  --url 'https://api.nookdocs.com/v1/projects/{id}/analytics/overview' \
  --header 'Authorization: Bearer <token>'
{
  "range": {
    "to": "2023-11-07T05:31:56Z",
    "tz": "<string>",
    "from": "2023-11-07T05:31:56Z",
    "unit": "<string>"
  },
  "totals": {
    "views": 123,
    "searches": 123,
    "feedback_up": 123,
    "feedback_down": 123,
    "unique_visitors": 123
  },
  "ai_split": [
    {
      "count": 123,
      "family": "<string>"
    }
  ],
  "timeseries": [
    {
      "views": 123,
      "bucket": "2023-11-07T05:31:56Z",
      "unique_visitors": 123
    }
  ],
  "exclude_bots": true
}

Authorizations

Authorizationstringheaderrequired

API key issued from your dashboard (Settings → API Keys). Format: nook_... — pass as Authorization: Bearer nook_.... Keys carry scopes (projects:read/write, pages:read, deployments:read/trigger, analytics:read) — calls without the required scope return 403.

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path parameters

idstring (uuid)pathrequired
Project UUID

Query parameters

fromstring (date-time)query
Window start (inclusive), ISO 8601. Default: 30 days ago.
tostring (date-time)query
Window end (exclusive), ISO 8601. Default: now.
unitenum<string>querydefault: day
Timeseries bucket size
options:minutehourdayweekmonth
tzstringquerydefault: UTC
IANA timezone for bucket boundaries (e.g. `Europe/Istanbul`)
botsenum<string>querydefault: excluded
Include or exclude UA-classified bot traffic
options:includedexcluded

Response

application/json

Overview for the window

rangeobject
The resolved window the data covers
totalsobject
ai_splitobject[]
Views grouped by visitor family — AI crawlers vs humans. Always includes bot traffic regardless of the `bots` param.
timeseriesobject[]
exclude_botsboolean
Whether bot traffic was excluded from totals and timeseries