GET /api/timeseries
Returns daily pageview counts grouped by calendar day (UTC) for the given domain and optional date range. Only$pageview events are counted. Results are ordered chronologically ascending, making this endpoint ideal for rendering line charts.
Days with zero pageviews are not included in the response — the array contains only days that have at least one event. If you are rendering a chart over a fixed date window, you will need to fill in the missing dates with zero values on the client.
Query parameters
The domain to query (e.g.
example.com). Must match the d field sent in event payloads exactly.Start of the date range, inclusive. ISO 8601 date string (
YYYY-MM-DD). If omitted, results cover all time up to to.End of the date range, inclusive. ISO 8601 date string (
YYYY-MM-DD). If omitted, results cover all time from from.Response
Returns a JSON array of daily buckets, ordered bydate ascending.
Calendar date in
YYYY-MM-DD format (UTC). Computed via strftime('%Y-%m-%d', timestamp) in SQLite.Number of
$pageview events recorded on that date.Response shape
| Status | Meaning |
|---|---|
200 OK | Query succeeded (empty array if no data) |
400 Bad Request | domain query parameter is missing |
500 Internal Server Error | Database query failed |