Agent

Retrieves search query analytics for the AI assistant

get/projects/{project_id}/agent/analytics/queries

Request

  • Base URL
    https://api.beyondwords.io/v1
  • URL
    https://api.beyondwords.io/v1/projects/{project_id}/agent/analytics/queries
  • Auth
    API key in header X-Api-Key

Query parameters

agent_type'conversational_agent' | 'ai_assistant' required
time_range[start]string

The start date of the aggregation period. The value of this property should be a string in the format yyyy-mm-dd according to ISO 8601.

time_range[end]string

The end date of the aggregation period. The value of this property should be a string in the format yyyy-mm-dd according to ISO 8601. If this is set to today, the current day is still in progress and therefore only partial analytics data is returned until the day ends.

pagination[limit]integer

'limit' sets the number of results to return in each page.

pagination[offset]integer

'offset' sets the first position to return from the results of the query. The default is 0, which starts the page at the first result.

order[by]'query_text' | 'searches' | 'zero_result_searches' | 'zero_result_rate' | 'last_searched_at'

Order query results

order[dir]'asc' | 'desc'

This is used to order analytics in the ascending or descending order

access_tiers[]string[]

The access tiers to fetch data for

filter[has_zero_results]boolean
filter[query_text]string

Response

OK

query_textstring nullable

Lowercased search query text. Older, retention-expired rows are grouped under a redacted/blank value.

searchesinteger

Number of searches for this query text

zero_result_searchesinteger

Number of those searches that returned zero results

zero_result_ratenumber

Proportion of searches for this query text that returned zero results (0.0-1.0)

last_searched_atstring date-time

Time of the most recent search for this query text (ISO 8601, UTC)

Changes