Stats

Visitor analytics for any site (admin drill-down)

Admin-only per-site visitor analytics over a lookback window. Unlike the owner-facing GET /sites/:id/analytics, this works for any site regardless of ownership or the account’s plan — it powers the directory drill-down. Reads live from the analytics warehouse; counts are sampling estimates.

get/stats/sites/{id}/analytics

Request

  • Base URL: https://api.nippy.host
  • URL: https://api.nippy.host/stats/sites/{id}/analytics
  • Auth: bearer (a scheme the document does not define)

Path parameters

idstring required

Site UUID

Query parameters

fromstring

Window start, ISO 8601. Omit for "all time" — the server starts the window at the earliest recorded event for the site.

tostring

Window end, ISO 8601. Defaults to now; clamped to now.

interval'1m' | '5m' | '15m' | '1h' | '3h' | '6h' | '1d' | '1w'

Series bucket width (spacing between chart points). Must be one of the widths allowed for the window's duration; an unsupported value is clamped to that duration's default. Defaults to the duration's default.

tzOffsetnumber

Viewer's UTC offset in minutes, east-positive (i.e. -new Date().getTimezoneOffset(); e.g. 60 for UTC+1, -300 for UTC−5). Series buckets are aligned to the viewer’s local day/hour boundaries using this. Defaults to 0 (UTC).

Response

interval'1m' | '5m' | '15m' | '1h' | '3h' | '6h' | '1d' | '1w' required

Series bucket width actually used (echoes the request, clamped to a width allowed for the window duration; falls back to that duration's default).

granularity'minute' | 'hour' | 'day' | 'week' required

Class of the bucket interval (minute | hour | day) — drives axis-label formatting on the dashboard.

fromstring required

Window start, ISO timestamp (UTC).

tostring required

Window end, ISO timestamp (UTC).

Example response

{
  "series": [
    {
      "date": "2026-05-20"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.