Get project analytics breakdowns
Changed onPlan: 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.
Request
- Base URLhttps://api.lovable.dev
- Auth
- API key in header Lovable-API-Key
- or HTTP bearer
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.
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.
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.
Response
OK
Example response
{
"countries": [
{
"label": "United States",
"visitors": 540
}
],
"devices": [
{
"label": "Desktop",
"visitors": 820
}
],
"pages": [
{
"label": "/pricing",
"visitors": 1280
}
],
"sources": [
{
"label": "google.com",
"visitors": 640
}
]
}Changes
- breaking
added the new required
queryrequest parameterends_at - breaking
added the new required
queryrequest parameterstarts_at - warning
deleted the
queryrequest parameterend_date - warning
deleted the
queryrequest parameterstart_date - info
for the
headerrequest parameterLovable-Version, the format was generalized fromdateto no format - info
added the non-success response with the status
- breaking
- info
added the non-success response with the status
- info