Spoar
Reads

One metric over time

GET
/v2/projects/{project}/timeseries

Buckets by interval (hour, day, week, month) in UTC; compare=previous adds the previous period.

Authorization

AuthorizationBearer <token>

An API token from POST /v2/tokens (at_live_...), or a project's secret key (sk_...) for server-side ingest.

In: header

Path Parameters

project*string

The project id, as listed by GET /v2/projects.

Length1 <= length

Query Parameters

from?string

Start of the range; send with to.

Formatdate-time
to?string

End of the range, exclusive.

Formatdate-time
period?string

A range ending at the start of today in UTC (24h ends at the start of this hour). Ignored when from and to are sent; 30d by default.

Value in

  • "24h"
  • "7d"
  • "30d"
  • "90d"
  • "12mo"
  • "all"
traffic?string

Which traffic is counted. human (the default) leaves out bot scores of 50 and up, your own visits and localhost; bots keeps only scores of 50 and up; internal keeps only your own visits; all keeps everything.

Value in

  • "human"
  • "bots"
  • "internal"
  • "all"
environment?string

production (the default) leaves preview deployments out, preview keeps only them, all keeps both.

Value in

  • "production"
  • "preview"
  • "all"
filter?

Sent as filter[<dimension>]=value, or !value to exclude; repeatable across dimensions.

metric?string

Required. A built-in metric (visitors, sessions, pageviews, events, bounce_rate, session_duration, pages_per_session, time_on_page, scroll_depth, conversion_rate) or sum:prop.<key> and avg:prop.<key> over a numeric prop. conversion_rate needs filter[event].

Length1 <= length
interval?string

Bucket size: hour by default for a range of 24 hours or less, day otherwise.

Value in

  • "hour"
  • "day"
  • "week"
  • "month"
compare?string

Adds the previous range's value to each bucket as previous.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/projects/string/timeseries"
{  "data": [    {      "bucket": "2026-09-20T00:00:00.000Z",      "value": 61    },    {      "bucket": "2026-09-21T00:00:00.000Z",      "value": 48    },    {      "bucket": "2026-09-22T00:00:00.000Z",      "value": 97    },    {      "bucket": "2026-09-23T00:00:00.000Z",      "value": 102    },    {      "bucket": "2026-09-24T00:00:00.000Z",      "value": 88    },    {      "bucket": "2026-09-25T00:00:00.000Z",      "value": 76    },    {      "bucket": "2026-09-26T00:00:00.000Z",      "value": 70    }  ],  "metric": "visitors",  "interval": "day",  "range": {    "from": "2026-09-20T00:00:00.000Z",    "to": "2026-09-27T00:00:00.000Z"  },  "traffic": "human",  "environment": "production",  "filters": {    "country": "NL"  }}