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.
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
AuthorizationstringheaderrequiredAPI 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)pathrequiredProject UUID
Query parameters
fromstring (date-time)queryWindow start (inclusive), ISO 8601. Default: 30 days ago.
tostring (date-time)queryWindow end (exclusive), ISO 8601. Default: now.
unitenum<string>querydefault: dayTimeseries bucket size
options:
minutehourdayweekmonthtzstringquerydefault: UTCIANA timezone for bucket boundaries (e.g. `Europe/Istanbul`)
botsenum<string>querydefault: excludedInclude or exclude UA-classified bot traffic
options:
includedexcludedResponse
Overview for the window
rangeobjectThe resolved window the data covers
totalsobjectai_splitobject[]Views grouped by visitor family — AI crawlers vs humans. Always includes bot traffic regardless of the `bots` param.
timeseriesobject[]exclude_botsbooleanWhether bot traffic was excluded from totals and timeseries
errorstringrequiredMachine-readable error code (e.g. `invalid_request`, `unauthorized`, `not_found`)
messagestringrequiredHuman-readable error description
errorstringrequiredMachine-readable error code (e.g. `invalid_request`, `unauthorized`, `not_found`)
messagestringrequiredHuman-readable error description
errorstringrequiredMachine-readable error code (e.g. `invalid_request`, `unauthorized`, `not_found`)
messagestringrequiredHuman-readable error description