Gravatar for wvuong@captechconsulting.com

Question by wvuong, Feb 5, 2016 10:00 AM

Trending/Most Popular Search Results

Is there a way to access trending search results, I know through the administration panel, reports and dashboards can be created in order to view this information. See here. But is this available through an endpoint?

Gravatar for gsimard@coveo.com

Comment by guillaume simard, Feb 5, 2016 10:55 AM

Hi!

There's an API to get this sort of information but I'm curious on your use case. What kind of information are you looking for and how will you be fetching it?

Gravatar for wvuong@captechconsulting.com

Comment by wvuong, Feb 5, 2016 10:59 AM

We have a group of unstructured content, where we would like to showcase various documents that have had a high volume of traffic.

1 Reply
Gravatar for gsimard@coveo.com

Answer by guillaume simard, Feb 5, 2016 11:08 AM

You can access the Usage Analytics API via https://usageanalytics.coveo.com

Documentation is available here: https://usageanalytics.coveo.com/docs/

The call you're probably looking for is https://usageanalytics.coveo.com/docs/#!/v14_stats/getCombinedData

A sample call and sample response:

https://usageanalytics.coveo.com/rest/v14/stats/combinedData?m=DocumentView&from=2016-01-01T00%3A00%3A00.000Z&to=2016-02-01T00%3A00%3A00.000Z&tz=Z&d=DocumentTitle&s=DocumentView&asc=false&includeMetadata=true&format=JSON&bindOnLastSearch=true&accesstoken=YOURTOKEN

{
"combinations": [
{
"documentTitle": "Events",
"DocumentView": 65
},
{
"documentTitle": "Facet Component",
"DocumentView": 64
},
{
"documentTitle": "Standard Query Extensions",
"DocumentView": 37
},
{
"documentTitle": "Query Parameters",
"DocumentView": 36
},
{
"documentTitle": "Installing Coveo for Sitecore in a CM or CD Configuration",
"DocumentView": 30
},
{
"documentTitle": "Folding Component",
"DocumentView": 27
},
{
"documentTitle": "Understanding the Coveo Search Provider's Configuration File",
"DocumentView": 26
},
{
"documentTitle": "Coveo Cloud New Features",
"DocumentView": 25
},
{
"documentTitle": "Working With Fields",
"DocumentView": 24
},
{
"documentTitle": "Coveo Enterprise Search 7.0 - Release Notes",
"DocumentView": 24
}
],
"uniqueCounts": {
"documentTitle": 1779
},
"totalNumberOfResults": 1779,
"lastUpdated": 1454688195531,
"cached": false
}

For a list of available Dimensions and Metrics, check out these calls:

https://usageanalytics.coveo.com/docs/#!/v14dimensions/getDimensions https://usageanalytics.coveo.com/docs/#!/v14metrics/getMetrics

For the from and to parameter, it is highly recommended to use a period that ends yesterday. If your query requires data from the current day it could be considerably slower.

Ask a question