Get project analytics
Changed onPlan: 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.
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 before the range is applied.
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.
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.
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
{
"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
}
}
}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