---
title: "Get chat analytics"
method: GET
path: "/api/v2/projects/{slug}/analytics/chat/"
tags: ["Analytics"]
---

# Get chat analytics

`GET /api/v2/projects/{slug}/analytics/chat/`

## Request

- Base URL: `https://app.biel.ai`
- URL: `https://app.biel.ai/api/v2/projects/{slug}/analytics/chat/`
- Auth: API key in header `Authorization`

Aggregate KPIs and daily activity for the AI chat over a date range. MCP-only conversations are excluded. For those, see [`GET /api/v2/projects/{slug}/analytics/mcp/`](/api/get-mcp-analytics).

**Required permission:** `analytics_read`

## Path parameters

- `slug` string, required

## Query parameters

- `from` string, date
- `to` string, date

## Response `200`

Chat analytics retrieved successfully

- ChatAnalytics: KPIs and daily activity for the AI chat in the requested date range. MCP-only conversations are excluded.
  - `kpis` object, required
    - `chats_count` integer, required: Total number of chats in the date range.
    - `messages_count` integer, required: Total number of messages (human + AI) across those chats.
    - `unique_users_count` integer, required: Distinct end users (resolved by IP, with chats lacking an IP each counting as one user).
    - `positive_count` integer, required: Number of AI messages with a thumbs-up reaction.
    - `negative_count` integer, required: Number of AI messages with a thumbs-down reaction.
    - `satisfaction_rate` integer, required: Percentage 0-100. Treats neutral (no feedback) AI messages as positive.
  - `activity` object, required
    - `chats_per_day` DailyCount[], required: Chats created per day. Always covers every day of the range.
      - `day` string, date, required: ISO-8601 date (`YYYY-MM-DD`).
      - `count` integer, required: Number of events recorded on this day.
    - `top_urls` TopUrl[], required: Top 10 URLs from which chats were initiated.
      - `url` string, required: Page URL where the chat was initiated. `Unknown` when not reported.
      - `count` integer, required
    - `top_countries` TopCountry[], required: Top 10 countries by chat volume.
      - `name` string, required: Country name. `Unknown` when the IP could not be resolved.
      - `flag` string, required: Country flag emoji. Empty string for `Unknown`.
      - `count` integer, required

## Other responses

- `400`: Bad request. Invalid or missing data.
- `403`: Forbidden. Missing permissions.
- `404`: Resource not found.

---

[API](https://skmtc.dev/biel/apis/biel-ai-api.md) · [All operations](https://skmtc.dev/biel/apis/biel-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/biel/apis/biel-ai-api/revisions/ac7034d82696?raw)
