Top Queries

Returns the top queries over the specified period. Queries are sorted on query count.

Example call

https://api.sooqr.com/v1/reports/100000/1/top-queries?dateFrom=2015-01-01&dateTo=2015-01-02

Parameters (GET)

Parameter Required Example Description
dateFrom Yes 2015-01-01 Start of the reporting period
dateTo Yes 2015-01-02 End of the reporting period
offset No 0 Starting item offset within resultset
limit No 10 Limit number of results in response, between 1 and 100
Defaults to 10

Result example

{
   "items":[
      {
         "q":"dress",
         "c":14
      },
      {
         "q":"shirt",
         "c":9
      },
      {
         "q":"women",
         "c":6
      },
      {
         "q":"tee",
         "c":5
      },
      {
         "q":"men",
         "c":5
      }
   ],
   "metaData":{
      "resultOffset":0,
      "itemsInResult":5,
      "resultLimit":5,
      "totalItems":171
   }
}

Information is returned in the items node. Each query (q) contains a query count (c). The count is the total for the supplied date period. All items are ordered by count in descending order.

The metaData node contains information on the full dataset for this period. You can paginate through the results by specifying the limit and offset parameters in the request.

Value Type Description
q string Query string
c integer Query count in the specified period