Get workspace analytics
Changed onPlan: Business or higher
Scope: workspaces:read
Returns website traffic time series for the workspace, including historical traffic from projects that have since been deleted. The response covers the requested date range without pagination. Date ranges are limited to 365 days, or 31 days with hourly granularity.
Request
- Base URLhttps://api.lovable.dev
- Auth
- API key in header Lovable-API-Key
- or HTTP bearer
Path parameters
Workspace ID.
Query parameters
Start of the time range as an RFC 3339 timestamp, such as 2026-07-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-07-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