Skip to main content
GET
/
v0
/
top_events
Get top events by frequency
curl --request GET \
  --url https://api.formo.so/v0/top_events \
  --header 'Authorization: Bearer <token>'
{
  "meta": [
    {
      "name": "project_id",
      "type": "String"
    },
    {
      "name": "type",
      "type": "String"
    },
    {
      "name": "event",
      "type": "String"
    },
    {
      "name": "hits",
      "type": "UInt64"
    }
  ],
  "data": [
    {
      "project_id": "proj_abc",
      "type": "page",
      "event": "",
      "hits": 4128
    },
    {
      "project_id": "proj_abc",
      "type": "identify",
      "event": "",
      "hits": 1284
    },
    {
      "project_id": "proj_abc",
      "type": "track",
      "event": "wallet_connect",
      "hits": 612
    },
    {
      "project_id": "proj_abc",
      "type": "track",
      "event": "swap",
      "hits": 248
    },
    {
      "project_id": "proj_abc",
      "type": "track",
      "event": "stake",
      "hits": 86
    }
  ],
  "rows": 5,
  "rows_before_limit_at_least": 14
}
Returns the most frequently fired events in the project, by total event count. Pass type=custom to restrict results to custom events (events tracked via formo.track(...)). This replaces the previous top_custom_events endpoint.

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.

limit
integer
default:50

Maximum results to return (default 50, max 1000)

Required range: 1 <= x <= 1000
offset
integer
default:0

Number of results to skip for pagination (default 0)

Required range: 0 <= x <= 100000
type
enum<string>

Pass 'custom' to filter to custom track events only (events with type='track' and a non-empty event name). Omit for all events.

Available options:
custom

Response

Top events

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