Skip to main content
GET
/
v0
/
kpis
Get KPIs (visitors, pageviews, bounce rate, session duration)
curl --request GET \
  --url https://api.formo.so/v0/kpis \
  --header 'Authorization: Bearer <token>'
{
  "meta": [
    {
      "name": "date",
      "type": "Date"
    },
    {
      "name": "project_id",
      "type": "String"
    },
    {
      "name": "visitors",
      "type": "UInt64"
    },
    {
      "name": "pageviews",
      "type": "UInt64"
    },
    {
      "name": "bounce_rate",
      "type": "Float64"
    },
    {
      "name": "avg_session_sec",
      "type": "Float64"
    }
  ],
  "data": [
    {
      "date": "2025-10-15",
      "project_id": "proj_abc",
      "visitors": 412,
      "pageviews": 1187,
      "bounce_rate": 0.31,
      "avg_session_sec": 142.6
    },
    {
      "date": "2025-10-16",
      "project_id": "proj_abc",
      "visitors": 487,
      "pageviews": 1402,
      "bounce_rate": 0.28,
      "avg_session_sec": 156.2
    },
    {
      "date": "2025-10-17",
      "project_id": "proj_abc",
      "visitors": 533,
      "pageviews": 1610,
      "bounce_rate": 0.26,
      "avg_session_sec": 168.4
    }
  ],
  "rows": 3,
  "rows_before_limit_at_least": 3,
  "statistics": {
    "elapsed": 0.041,
    "rows_read": 12340,
    "bytes_read": 482310
  }
}
Returns the same KPI series that powers the Formo dashboard’s overview chart. Use group_by to break results down by referrer, location, device, browser, os, or any UTM dimension. Set include_previous_period=true to also receive the equivalent prior window for week-over-week comparisons.

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API Keys.

Query Parameters

date_from
string<date>

Inclusive start date (YYYY-MM-DD). Defaults to 7 days before date_to.

date_to
string<date>

Inclusive end date (YYYY-MM-DD). Defaults to today.

group_by
enum<string>

Dimension to break down by

Available options:
referrer,
location,
device,
browser,
os,
utm_source,
utm_medium,
utm_campaign
limit
integer
include_previous_period
boolean

Return current and previous period for WoW comparison

Response

KPI time-series

Raw Tinybird pipe response. The data array contains the analytics rows; the exact row shape depends on the endpoint.

data
object[]
meta
object[]
rows
integer
rows_before_limit_at_least
integer
statistics
object