Getting started

The Search API is hosted on https://api.sooqr.com/v1/search. Each call is linked to an existing Sooqr instance, just like the normal Sooqr snippet. Both parameters are added to the search URL, like this:

https://api.sooqr.com/v1/search/account/view

For example:

https://api.sooqr.com/v1/search/100506/1

Both parameters are based on your Sooqr account identifier (for example SQ-100000-1) that is also used in your Javascript code snippet.

Parameter Example Description
account 100506 Account identifier to retrieve statistics from (based on SQ-100506-1)
view 1 View index number (based on SQ-100506-1)

Making your first search query

Apart from your account data, the Search API only requires one parameter: the search query. It has to be supplied by using the q GET parameter. Query values must be URL encoded.

https://api.sooqr.com/v1/search/100506/1?q=tee

Calling this URL, could result in the following response:

{
   "items":[
      {
         "date_sooqr_last_indexed":"2015-12-03T08:46:14Z",
         "id":"408_default",
         "title":"Chelsea Tee",
         "image":"https://magento-demo.sooqr.com/media/small_image/120x/m/t/mtk000t.jpg",
         "detail_url":"http://magento-demo.sooqr.com/chelsea-tee-701.html",
         "price":160,
         "index_title":"Chelsea Tee",
         "score":1.239027
      },
      {
         "date_sooqr_last_indexed":"2015-12-03T08:46:14Z",
         "id":"409_default",
         "title":"Chelsea Tee",
         "image":"https://magento-demo.sooqr.com/media/small_image/120x/m/t/mtk002t.jpg",
         "detail_url":"http://magento-demo.sooqr.com/chelsea-tee-702.html",
         "price":160,
         "index_title":"Chelsea Tee",
         "score":1.239027
      }
   ],
   "metaData":{
      "numFound":6,
      "maxScore":1.239027,
      "queryTime":8,
      "start":null,
      "rows":"2"
   },
   "spellcheck":false,
   "facets":false
}

Please see the next few paragraphs for more information on the structure of the results and the available options.