cURL
curl --request GET \
--url 'https://api.lovable.dev/v1/projects/project-id/analytics?ends_at=2026-04-08T00:00:00Z&starts_at=2026-04-01T00:00:00Z' \
--header 'Lovable-API-Key: lov_your-api-key' \
--header 'Lovable-Version: 2026-09-11'{
"time_series": {
"bounce_rate": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"pageviews": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"pageviews_per_visit": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"session_duration": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"visitors": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
}
}
}{
"detail": "validation failed",
"errors": [
{
"location": "body.members",
"message": "expected array length >= 1"
}
],
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 400,
"title": "Bad Request",
"type": "invalid_request"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 401,
"title": "Authorization header required",
"type": "unauthorized"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 402,
"title": "You need to upgrade your plan to access this feature",
"type": "payment_required"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 403,
"title": "You don't have the permissions to perform this action",
"type": "forbidden"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 404,
"title": "Not Found",
"type": "analytics_not_found"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 406,
"title": "This endpoint produces application/json. Send a matching Accept header, */*, or omit the header.",
"type": "not_acceptable"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 503,
"title": "Request timed out",
"type": "request_timeout"
}{
"detail": "validation failed",
"errors": [
{
"location": "body.workspace_id",
"message": "expected string"
}
],
"props": {
"finding_refs": [
"supabase/finding-1"
]
},
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}Analytics
Get project analytics
Plan: Business or higher
Scope: projects:read
Returns website traffic for a published project over a date range as a time series. Date ranges are limited to 365 days, or 31 days with one-hour buckets. Some projects retain analytics for 90 days; older buckets are returned with zero values.
GET
https://api.lovable.dev
/
v1
/
projects
/
{project_id}
/
analytics
cURL
curl --request GET \
--url 'https://api.lovable.dev/v1/projects/project-id/analytics?ends_at=2026-04-08T00:00:00Z&starts_at=2026-04-01T00:00:00Z' \
--header 'Lovable-API-Key: lov_your-api-key' \
--header 'Lovable-Version: 2026-09-11'{
"time_series": {
"bounce_rate": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"pageviews": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"pageviews_per_visit": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"session_duration": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
},
"visitors": {
"data": [
{
"timestamp": "2026-01-15T00:00:00Z",
"value": 1280
}
],
"label": "visitors",
"total": 1280
}
}
}{
"detail": "validation failed",
"errors": [
{
"location": "body.members",
"message": "expected array length >= 1"
}
],
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 400,
"title": "Bad Request",
"type": "invalid_request"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 401,
"title": "Authorization header required",
"type": "unauthorized"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 402,
"title": "You need to upgrade your plan to access this feature",
"type": "payment_required"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 403,
"title": "You don't have the permissions to perform this action",
"type": "forbidden"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 404,
"title": "Not Found",
"type": "analytics_not_found"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 406,
"title": "This endpoint produces application/json. Send a matching Accept header, */*, or omit the header.",
"type": "not_acceptable"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 503,
"title": "Request timed out",
"type": "request_timeout"
}{
"detail": "validation failed",
"errors": [
{
"location": "body.workspace_id",
"message": "expected string"
}
],
"props": {
"finding_refs": [
"supabase/finding-1"
]
},
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}Authorizations
LovableAPIKeyBearerAuth
Headers
Query Parameters
Time-bucket size: hourly or daily. Defaults to daily when omitted; any other value returns 400. Daily buckets cover complete UTC calendar dates from the UTC date of starts_at through the UTC date of ends_at; hourly buckets use the supplied instants inclusively and support at most 31 days.
Available options:
hourly, daily Example:
"daily"
Was this page helpful?