---
title: "Queries"
method: GET
path: "/projects/{project_id}/agent/analytics/queries"
tags: ["Agent"]
---

# Queries

`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`

Retrieves search query analytics for the AI assistant

## Query parameters

- `agent_type` 'conversational_agent' | 'ai_assistant', required
- `time_range[start]` string
- `time_range[end]` string
- `pagination[limit]` integer
- `pagination[offset]` integer
- `order[by]` 'query_text' | 'searches' | 'zero_result_searches' | 'zero_result_rate' | 'last_searched_at'
- `order[dir]` 'asc' | 'desc'
- `access_tiers[]` string[]
- `filter[has_zero_results]` boolean
- `filter[query_text]` string

## Response `200`

OK

- object[]
  - `query_text` string, nullable: Lowercased search query text. Older, retention-expired rows are grouped under a redacted/blank value.
  - `searches` integer: Number of searches for this query text
  - `zero_result_searches` integer: Number of those searches that returned zero results
  - `zero_result_rate` number: Proportion of searches for this query text that returned zero results (0.0-1.0)
  - `last_searched_at` string, date-time: Time of the most recent search for this query text (ISO 8601, UTC)

## Other responses

- `404`: Agent beta not enabled for this organization
- `422`: missing time_range

## Changes

- **2026-11-03** `994b9853e685`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/beyondwords/apis/beyondwords-rest-api/changes/projects/:project_id/agent/analytics/queries/get.md)

---

[API](https://skmtc.dev/beyondwords/apis/beyondwords-rest-api.md) - [All operations](https://skmtc.dev/beyondwords/apis/beyondwords-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/beyondwords/apis/beyondwords-rest-api/revisions/994b9853e685?raw)
