POST
/
api
/
analytics
/
events
/
ctr
curl --request POST \
  --url https://api.trieve.ai/api/analytics/events/ctr \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Dataset: <tr-dataset>' \
  --data '{
  "filter": {
    "date_range": {
      "gt": "2021-01-01 00:00:00.000",
      "gte": "2021-01-01 00:00:00.000",
      "lt": "2021-01-01 00:00:00.000",
      "lte": "2021-01-01 00:00:00.000"
    },
    "search_method": "fulltext",
    "search_type": "search"
  },
  "type": "search_ctr_metrics"
}'
{
  "avg_position_of_click": 123,
  "percent_searches_with_clicks": 123,
  "percent_searches_without_clicks": 123,
  "searches_with_clicks": 123
}

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string
required

The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.

Body

application/json
JSON request payload to filter the graph
type
enum<string>
required
Available options:
search_ctr_metrics
filter
object

Response

200
application/json
The CTR analytics for the dataset
avg_position_of_click
number
required
percent_searches_with_clicks
number
required
percent_searches_without_clicks
number
required
searches_with_clicks
integer
required