---
title: "GET /v1/projects/{projectsId}/locations/{locationsId}/conversations:calculateStats"
method: GET
path: "/v1/projects/{projectsId}/locations/{locationsId}/conversations:calculateStats"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/locations/{locationsId}/conversations:calculateStats

`GET /v1/projects/{projectsId}/locations/{locationsId}/conversations:calculateStats`

## Request

- Base URL: `https://contactcenterinsights.googleapis.com`
- URL: `https://contactcenterinsights.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/conversations:calculateStats`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Gets conversation statistics.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `filter` string

## Response `200`

Successful response

- GoogleCloudContactcenterinsightsV1CalculateStatsResponse: The response for calculating conversation statistics.
  - `averageDuration` string, google-duration: The average duration of all conversations. The average is calculated using only conversations that have a time duration.
  - `averageTurnCount` integer: The average number of turns per conversation.
  - `conversationCount` integer: The total number of conversations.
  - `conversationCountTimeSeries` GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries: A time series representing conversations over time.
    - `intervalDuration` string, google-duration: The duration of each interval.
    - `points` GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval[]: An ordered list of intervals from earliest to latest, where each interval represents the number of conversations that transpired during the time window.
      - `conversationCount` integer: The number of conversations created in this interval.
      - `startTime` string, google-datetime: The start time of this interval.
  - `customHighlighterMatches` object: A map associating each custom highlighter resource name with its respective number of matches in the set of conversations.
  - `issueMatches` object: A map associating each issue resource name with its respective number of matches in the set of conversations. Key has the format: `projects//locations//issueModels//issues/` Deprecated, use `issue_matches_stats` field instead.
  - `issueMatchesStats` object: A map associating each issue resource name with its respective number of matches in the set of conversations. Key has the format: `projects//locations//issueModels//issues/`
  - `smartHighlighterMatches` object: A map associating each smart highlighter display name with its respective number of matches in the set of conversations.

---

[API](https://skmtc.dev/google/apis/contactcenterinsights.md) - [All operations](https://skmtc.dev/google/apis/contactcenterinsights/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/contactcenterinsights/revisions/895c3ce55ea0?raw)
