Skip to main content
GET
/
api
/
v2
/
analytics
/
topics
Get topics analytics
curl --request GET \
  --url https://app.livechatai.com/api/v2/analytics/topics \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": [
    {
      "date": "2024-01-15",
      "Pricing": 25,
      "Features": 18,
      "Support": 12
    }
  ],
  "keys": [
    "Pricing",
    "Features",
    "Support",
    "Billing",
    "Integration",
    "Account"
  ],
  "allTopics": [
    {
      "name": "Pricing",
      "count": 425
    }
  ],
  "areAllTopicsVisible": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

agentId
string
required

The ID of the agent/chatbot

Example:

"clx1234567890abcdef"

startDate
string<date>
required

Start date for analytics (ISO 8601 format)

Example:

"2024-01-01"

endDate
string<date>
required

End date for analytics (ISO 8601 format)

Example:

"2024-01-31"

showAllTopics
boolean
default:false

Show all topics instead of just top 6

Example:

false

timezone
string

Timezone for date calculations (defaults to system timezone)

Example:

"America/New_York"

Response

Successfully retrieved topics analytics data

status
string
Example:

"success"

data
object[]

Daily breakdown of conversation topics (dynamic properties based on topics)

keys
string[]

Top topic names (top 6 by default, all if showAllTopics=true)

Example:
[
"Pricing",
"Features",
"Support",
"Billing",
"Integration",
"Account"
]
allTopics
object[]

All topics with their total counts across the entire period

areAllTopicsVisible
boolean

Whether all topics are currently visible or filtered to top 6

Example:

false