---
title: "Get a realtime traffic snapshot"
method: GET
path: "/websites/{websiteId}/analytics/realtime"
tags: ["Analytics"]
---

# Get a realtime traffic snapshot

`GET /websites/{websiteId}/analytics/realtime`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websites/{websiteId}/analytics/realtime`
- Auth: HTTP bearer

Returns a compact snapshot of traffic over Umami's trailing 30-minute realtime window: total page views, distinct visitors, tracked custom events, and distinct countries, plus the snapshot timestamp. The visitor total is not directly comparable to the removed `active` endpoint's five-minute count. Use it to see recent activity; use the query endpoint for historical ranges. Requires a plan that includes analytics (403 otherwise); all-zero totals until the website is published and has traffic.

## Path parameters

- `websiteId` string, required

## Response `200`

Traffic totals for the trailing 30-minute window.

- object
  - `views` number, required: Page views in the trailing 30-minute window.
  - `visitors` number, required: Distinct visitors in the trailing 30-minute window.
  - `events` number, required: Tracked custom events in the trailing 30-minute window.
  - `countries` number, required: Distinct countries in the trailing 30-minute window.
  - `timestamp` string, required: Snapshot time as an ISO 8601 timestamp.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
