ClickHelp User Manual

[API] Get Search Queries

Returns information on the search queries by anonymous or a specific user.

GET reports/user-events/{user-login}/search-queries?startDate={start-date}&endDate={end-date}&projectId={publication-id}

Authentication

This request requires basic authentication.

Request Parameters

Path params
user-login string
The login of the user to get search queries for. Use - instead of the login to get the data for anonymous users.
Query params
startDate string
An ISO 8601 timestamp of the report range start date. GMT timezone.
endDate string
An ISO 8601 timestamp of the report range end date. GMT timezone.
projectId
string
[optional] ID of the project or publication to get search queries in.

Samples

Request sample
Bash (Unix Shell)
curl --location -g --request GET 'https://{portal-url}/api/v1/reports/user-events/pr1/search-queries?startDate=2022-08-09T02:35:00&endDate=2022-12-31T02:35:00&projectID=project-deep-space-exploration'
Response body sample
JSON
[
{
"dateTime": "2022-11-07T15:25:34",
"queryText": "click",
"resultsTotal": 5,
"projectId": "deep-space-exploration-publication"
},
{
"dateTime": "2022-11-07T15:25:27",
"queryText": "nebula",
"resultsTotal": 0,
"projectId": "deep-space-exploration-publication"
},
{
"dateTime": "2022-11-07T15:25:22",
"queryText": "some",
"resultsTotal": 0,
"projectId": "deep-space-exploration-publication"
}
]

Response fields

dateTimeAn ISO 8601 timestamp of the event. GMT timezone.
queryTextThe full-text search query.
resultsTotal
The total number of search results returned.
projectId
Id of the project or publication search was performed in