REST API endpoint
GET /v1/overview
Daily pageviews and visits for the last N completed history rows.
Request
GET
https://api.nowmetrix.com/v1/overview?site=TRACKER_ID&days=7
Use this endpoint for compact trend reports, BI imports, spreadsheet exports, and simple weekly or monthly summaries.
Authentication
Requires an API key in the Authorization header: Authorization: Bearer nm_YOUR_KEY.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
site |
string |
required | Tracker ID. The API key must have access to this tracker. |
days |
integer |
optional | Number of days to return. Values are clamped to 1-30. Default: 30. |
cURL example
curl -H "Authorization: Bearer nm_YOUR_KEY" \
"https://api.nowmetrix.com/v1/overview?site=TRACKER_ID&days=7"
Example response
{
"site": "TRACKER_ID",
"timezone": "Europe/Zurich",
"range": {
"from": "2026-06-20",
"to": "2026-06-26",
"days": 7
},
"daily": [
{
"date": "2026-06-20",
"pageviews": 81240,
"visits": 53210
},
{
"date": "2026-06-21",
"pageviews": 77480,
"visits": 50195
},
{
"date": "2026-06-22",
"pageviews": 48215,
"visits": 31890
}
],
"totals": {
"pageviews": 206935,
"visits": 135295
}
}
Response fields
| Field | Type | Description |
|---|---|---|
site |
string |
Tracker ID used for the request. |
timezone |
string |
Tracker timezone used to resolve local dates. |
range.from |
string |
First date in the returned daily array. |
range.to |
string |
Last date in the returned daily array. |
range.days |
integer |
Number of daily rows returned. |
daily[] |
array<object> |
Daily rows sorted ascending by date. |
daily[].date |
string |
Date in YYYY-MM-DD format. |
daily[].pageviews |
integer |
Pageviews for the date. |
daily[].visits |
integer |
Visits for the date. |
totals.pageviews |
integer |
Sum of pageviews across the returned daily rows. |
totals.visits |
integer |
Sum of visits across the returned daily rows. |
Freshness and caching
Responses are microcached per tracker and days value for 60 seconds, with a short stale window for burst protection.
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | site_required |
The site query parameter is missing. |
| 401 | missing_token |
The Authorization header is missing. |
| 401 | invalid_token |
The token is invalid or revoked. |
| 403 | site_not_authorized |
The API key has no access to this tracker. |
| 429 | rate_limit_exceeded |
The rate limit has been exceeded. |
| 503 | redis_unavailable |
The realtime backend is temporarily unavailable. |
{
"error": {
"code": "invalid_token",
"message": "Bearer token is invalid or revoked."
}
}