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"
}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.
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
Lovable API key. Send its value in the Lovable-API-Key header.
Headers
Stable API version to serve, as a YYYY-MM-DD date. Omit for the oldest supported stable version, currently 2026-09-11.
Comma-separated beta revision strings to enable on top of the stable version.
Path Parameters
Project ID.
Query Parameters
Start of the time range as an RFC 3339 timestamp, such as 2026-04-01T00:00:00Z. Any offset is accepted and converted to UTC before the range is applied.
"2026-04-01T00:00:00Z"
End of the time range as an RFC 3339 timestamp, such as 2026-04-08T00:00:00Z. Any offset is accepted and converted to UTC before the range is applied.
"2026-04-08T00:00:00Z"
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.
hourly, daily Response
OK
Website traffic metrics over the requested date range.
Show child attributes
Show child attributes
Was this page helpful?