Skip to main content
GET
Get search queries

使用方法

使用此端点导出文档搜索分析数据。结果按命中次数从高到低排序,显示用户最常搜索的词语。 使用响应中返回的 nextCursor 参数对结果进行分页。当 nextCursor 不为 null 时继续获取数据。

筛选

使用 dateFromdateTo 参数按日期范围过滤搜索数据。

速率限制

此端点允许每个组织每小时最多 100 次请求。所有分析端点共享此限制。

授权

Authorization
string
header
必填

The Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the API keys page in your dashboard.

路径参数

projectId
string
必填

Your project ID. Can be copied from the API keys page in your dashboard.

查询参数

dateFrom
string

Date in ISO 8601 or YYYY-MM-DD format

示例:

"2024-01-01"

dateTo
string

Date in ISO 8601 or YYYY-MM-DD format. dateTo is an exclusive upper limit. Results include dates before, but not on, the specified date.

示例:

"2024-01-01"

limit
number
默认值:50

Max search terms per page (ordered by hit count descending)

必填范围: 1 <= x <= 100
cursor
string

Opaque pagination cursor from the previous response

响应

Search term aggregates with pagination

searches
object[]
必填

Search terms ordered by hit count descending.

totalSearches
integer
必填

Total count of search events in the requested date range (sum of all hits, not distinct queries).

必填范围: x >= 0
nextCursor
string | null
必填

Opaque pagination cursor for the next page. Null if no more results.