curl --request GET \
--url 'https://api.lovable.dev/v1/projects/project-id/analytics/breakdowns?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'{
"countries": [
{
"label": "/pricing",
"visitors": 1280
}
],
"devices": [
{
"label": "/pricing",
"visitors": 1280
}
],
"pages": [
{
"label": "/pricing",
"visitors": 1280
}
],
"sources": [
{
"label": "/pricing",
"visitors": 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 breakdowns
Plan: Business or higher
Scope: projects:read
Returns the top pages, referring domains, device types, and visitor countries for a published project over a range of complete UTC calendar dates, up to 10 items each. Date ranges are limited to 365 days. Some projects retain analytics for 90 days; older days contribute no visitors.
curl --request GET \
--url 'https://api.lovable.dev/v1/projects/project-id/analytics/breakdowns?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'{
"countries": [
{
"label": "/pricing",
"visitors": 1280
}
],
"devices": [
{
"label": "/pricing",
"visitors": 1280
}
],
"pages": [
{
"label": "/pricing",
"visitors": 1280
}
],
"sources": [
{
"label": "/pricing",
"visitors": 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; the range covers complete UTC calendar dates from the UTC date of starts_at through the UTC date of ends_at.
"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; the range covers complete UTC calendar dates from the UTC date of starts_at through the UTC date of ends_at.
"2026-04-08T00:00:00Z"
Response
OK
Top visitor countries by visitor sessions, up to 10 items ordered from highest to lowest. Unknown means the country could not be determined.
Show child attributes
Show child attributes
Top device types by visitor sessions, up to 10 items ordered from highest to lowest.
Show child attributes
Show child attributes
Top page paths by visitor sessions, up to 10 items ordered from highest to lowest.
Show child attributes
Show child attributes
Top referring domains by visitor sessions, up to 10 items ordered from highest to lowest. Direct means no referring domain was recorded.
Show child attributes
Show child attributes
Was this page helpful?