analytics

Get project realtime analytics

Changed on

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.

get/v1/projects/{project_id}/analytics/realtime

Request

  • Base URL
    https://api.lovable.dev
  • Auth
    • API key in header Lovable-API-Key
    • or HTTP bearer

Path parameters

project_idstring required

Project ID.

Example:prj_01jw3k9m2xq8r5v0c7d4e6f2gh

Headers

Lovable-Versionstring

Stable API version to serve, as a YYYY-MM-DD date. Omit for the oldest supported stable version, currently 2026-09-11.

Lovable-Betastring

Comma-separated beta revision strings to enable on top of the stable version.

Response

OK

current_visitorsinteger required

Unique visitor sessions with a page view in the last 5 minutes.

Example response

{
  "buckets": [
    {
      "timestamp": "2026-01-15T00:00:00Z",
      "visitors": 42
    }
  ],
  "current_visitors": 12
}

Changes

    • info

      for the header request parameter Lovable-Version, the format was generalized from date to no format

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status