---
title: "Get project realtime analytics"
method: GET
path: "/v1/projects/{project_id}/analytics/realtime"
tags: ["analytics"]
---

# Get project realtime analytics

`GET /v1/projects/{project_id}/analytics/realtime`

## Request

- Base URL: `https://api.lovable.dev`
- URL: `https://api.lovable.dev/v1/projects/{project_id}/analytics/realtime`
- Auth: one of:
  - API key in header `Lovable-API-Key`
  - HTTP bearer

**Plan:** `Business or higher`

**Scope:** `projects:read`

Returns visitor counts for a published project over the last 30 minutes in one-minute buckets, plus the number of visitors active in the last 5 minutes.

## Path parameters

- `project_id` string, required: Project ID.

## Headers

- `Lovable-Version` string
- `Lovable-Beta` string

## Response `200`

OK

- ProjectRealtimeAnalytics
  - `buckets` RealtimeDataPoint[], required: One-minute buckets over the last 30 minutes, ordered oldest first. Minutes without visits are not included.
    - `timestamp` string, date-time, required: Bucket start in RFC 3339 format, UTC.
    - `visitors` integer, required: Unique visitor sessions with a page view in this minute. A session can appear in multiple buckets.
  - `current_visitors` integer, required: Unique visitor sessions with a page view in the last 5 minutes.

## Other responses

- `400`: The request body or parameters are malformed or fail validation. Each failing field is listed in errors.
- `401`: Missing or invalid API key, session token, or OAuth access token.
- `402`: Public API access requires Business or higher. Some operations or configurations require an additional feature entitlement.
- `403`: The key or caller lacks the required scope or permission. For email_not_verified, verify the account email before retrying.
- `404`: The project does not exist, has been deleted, or is not accessible to the authenticated client. Analytics are also unavailable when the project is not published.
- `406`: The Accept header excludes every media type this endpoint produces.
- `429`: Too many requests. Retry after the interval in Retry-After when present.
- `503`: The service is temporarily unavailable, or the processing deadline expired (request_timeout). A mutation may still complete; check resource state before retrying.
- `default`: Error. The response body uses the standard error envelope; status matches the HTTP status code and type is a machine-readable error code.

## Changes

- **2026-09-18** `a83f0776a896`: 2 info
  - for the `header` request parameter `Lovable-Version`, the format was generalized from `date` to no format
  - added the non-success response with the status `503`
- **2026-09-17** `63e95b862209`: 1 info
  - added the non-success response with the status `404`
- **2026-09-16** `1eba97261efb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lovable/apis/lovable-api/changes/v1/projects/:project_id/analytics/realtime/get.md)

---

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