---
title: "Return usage analytics grouped into time buckets"
method: GET
path: "/api/trpc/usageAnalytics.getTimeseries"
tags: ["Usage Analytics"]
---

# Return usage analytics grouped into time buckets

`GET /api/trpc/usageAnalytics.getTimeseries`

## Request

- Base URL: `https://api.kilocode.ai`
- URL: `https://api.kilocode.ai/api/trpc/usageAnalytics.getTimeseries`
- Auth: HTTP bearer

Returns usage analytics grouped into time buckets. Use this for trend charts and optional split-by series views.

## Response `200`

Successful tRPC response

- object
  - `result` object, required
    - `data` object, required
      - `timeseries` object[], required
        - `datetime` string, required
        - `value` number, required
        - `label` string
      - `effectiveGranularity` 'hour' | 'day' | 'week' | 'month', required

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `500`: Unexpected server error

---

[API](https://skmtc.dev/kilocode/apis/kilo-code-api.md) - [All operations](https://skmtc.dev/kilocode/apis/kilo-code-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kilocode/apis/kilo-code-api/revisions/9eac48d444a0?raw)
