Skip to main content

Click Analytics API

The Click Analytics API allows you to programmatically retrieve aggregated click analytics for your application. It provides insights into how users interact with search results, helping you analyze engagement, ranking effectiveness, and content gaps.

Supported Metrics

  • ClickAnalytics – Searches with and without clicks (time-series)
  • AvgClickStats – Click engagement depth
  • AvgClickPosition – Average position of clicked results
  • ClickPositionDistribution – Click distribution by result rank
  • TopQueriesNoClicks – Queries with no clicks (content gap detection)

Specifications

FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/bot/{{AppID}}/search/clickAnalytics
Content-Typeapplication/json
Authorizationauth: {{JWT}}
API ScopeAnswer Insights

Query Parameters

ParameterDescriptionMandatory
AppIDProvide your application ID here.Yes

Request Parameters

ParameterDescriptionMandatory
typeProvide the metric Type. It can take the following values:
ClickAnalytics, AvgClickStats, AvgClickPosition, ClickPositionDistribution, TopQueriesNoClicks
Yes
filtersDate range (from, to) in UTC. Defaults to last 7 days if not provided.No.
groupThis field is applicable to following metrics.No
limitPagination limitNo
offsetPagination offsetNo

Sample Request Body

{
  "type": "<MetricType>",
  "filters": {
    "from": "2026-03-01T00:00:00Z",
    "to": "2026-03-17T23:59:59Z"
  },
  "group": "date",
  "limit": 10,
  "offset": 0
}

Metric Types

ClickAnalytics

Shows how many searches resulted in a user clicking a result versus not clicking anything, over the given period of time, grouped by hour/day/week. Sample Request
{
  "type": "ClickAnalytics",
  "filters": {
    "from": "2026-03-10T00:00:00Z",
    "to": "2026-03-17T23:59:59Z"
  },
  "group": "date",
  "limit": 10,
  "offset": 0
}
Sample Response
{
  "result": [
    { "period": "2026-03-17 00:00:00", "searches_with_clicks": 4, "searches_without_clicks": 15 },
    { "period": "2026-03-18 00:00:00", "searches_with_clicks": 7, "searches_without_clicks": 9 },
    { "period": "2026-03-20 00:00:00", "searches_with_clicks": 0, "searches_without_clicks": 2 }
  ]
}
Response Parameters
FieldTypeDescription
resultArrayOne entry per time period in the requested date range
result[].periodStringUTC timestamp truncated to the requested group granularity (day/hour/week)
result[].searches_with_clicksNumberDistinct searches where at least one citation was clicked in this period
result[].searches_without_clicksNumberSearches with no click events in this period (total − with_clicks)
Error Response Results array is empty. The error is shared in analyticsError field.
{ 
    "result": [], 
    "analyticsError": "Click analytics data is temporarily unavailable." 
}

AvgClickStats

Measures click engagement depth by showing how many times users click per search and how many different results they click on, on average. Sample Request
{
  "type": "AvgClickStats",
  "filters": {
    "from": "2026-03-10T00:00:00Z",
    "to": "2026-03-17T23:59:59Z"
  }
}
Sample Response
{
  "avg_clicks_per_search": 1.8,
  "avg_chunks_clicked": 1.4,
  "total_searches_with_clicks": 52
}
Response Fields
FieldTypeDescription
avg_clicks_per_searchNumberAverage total click events per search session that had at least one click
avg_chunks_clickedNumberAverage number of distinct chunks/citations clicked per search session
total_searches_with_clicksNumberCount of unique search sessions that resulted in at least one click
Error Response
{ 
    "avg_clicks_per_search": 0,
     "avg_chunks_clicked": 0, 
     "total_searches_with_clicks": 0, 
     "analyticsError": "..." 
}

AvgClickPosition

It indicates the average retrieval rank at which users click. Useful for understanding whether users engage with top results or scroll further down. Sample Request
{
  "type": "AvgClickPosition",
  "filters": {
    "from": "2026-03-10T00:00:00Z",
    "to": "2026-03-17T23:59:59Z"
  }
}
Sample Response
{
  "avg_click_position": 2.34,
  "min_click_position": 1,
  "max_click_position": 8,
  "total_clicks": 137
}
Response Fields
FieldTypeDescription
avg_click_positionNumberWeighted average retrieval rank across all click events (lower = users click higher-ranked results)
min_click_positionNumberLowest retrieval rank that received a click (typically 1)
max_click_positionNumberHighest retrieval rank that received a click
total_clicksNumberTotal click events in the date range (excludes rank-0 chunks)
Error Response
{ 
    "avg_click_position": 0,
    "min_click_position": 0, 
    "max_click_position": 0, 
    "total_clicks": 0, 
    "analyticsError": "..." 
}

ClickPositionDistribution

It shows how clicks are distributed across result positions. It is useful for identifying which positions attract the most user attention. Sample Request
{
  "type": "ClickPositionDistribution",
  "filters": {
    "from": "2026-03-10T00:00:00Z",
    "to": "2026-03-17T23:59:59Z"
  }
}
Sample Response
{
  "result": [
    { "retrieval_rank": 1, "chunks_clicked_at_position": 18, "total_clicks_at_position": 54 },
    { "retrieval_rank": 2, "chunks_clicked_at_position": 11, "total_clicks_at_position": 29 },
    { "retrieval_rank": 3, "chunks_clicked_at_position": 6,  "total_clicks_at_position": 14 }
  ]
}
Response Fields
FieldTypeDescription
resultArrayOne entry per retrieval rank that received at least one click
result[].retrieval_rankNumber1-based position in the citation list
result[].chunks_clicked_at_positionNumberNumber of distinct chunk IDs clicked at this rank
result[].total_clicks_at_positionNumberTotal click events at this rank (multiple clicks on the same chunk count separately)
Error Response
{ 
    "result": [],
    "analyticsError": "Click analytics data is temporarily unavailable." 
}

TopQueriesNoClicks

It helps identifies queries where users did not click any results. Supports pagination via limit and offset. Sample Request
{
  "type": "TopQueriesNoClicks",
  "filters": {
    "from": "2026-03-10T00:00:00Z",
    "to": "2026-03-17T23:59:59Z"
  },
  "limit": 10,
  "offset": 0
}
Sample Response
{
  "moreavailable": true,
  "result": [
    { "query": "how to reset password", "count": 23 },
    { "query": "invoice not generating",  "count": 17 },
    { "query": "two factor auth setup",   "count": 11 }
  ],
  "totalCount": 84
}
Response Fields
FieldTypeDescription
resultArrayPaginated list of queries that received zero clicks in the date range
result[].queryStringThe search query text entered by the user
result[].countNumberNumber of times this query was searched without any click
moreavailableBooleantrue if additional pages exist beyond the current offset
totalCountNumberTotal number of distinct no-click queries (for pagination UI)
Error Response
{ 
    "moreavailable": false,
     "result": [], 
     "totalCount": 0, 
     "analyticsError": "..."
}