Search Edit the file on GitHub

Table of Contents
  GET /search
Name Type Description
q String Search with the value of this parameter

The main response type is a collection of Categories.

There may be alternate suggestion queries provided in the alternatives key of the meta object.

Any of those alternatives with the flag important set to true, are a hint for the client to perform a search with the alternative query instead.

There may also exist matches of different resources under the key strong_matches.

Currently there may be up-to one of each of the following resources in strong_matches:

Query with less than 2 characters

GET http://api.skroutz.gr/search?q=a

View Response
Show Headers
Status: 422
{
  "errors": [
    {
      "code": "InvalidSearch",
      "messages": [
        "Η αναζήτησή σου πρέπει να περιέχει τουλάχιστον 2 χαρακτήρες"
      ]
    }
  ]
}

Query that doesn't match anything

GET http://api.skroutz.gr/search?q=asdf

View Response
Show Headers
Status: 200
{
  "categories": [

  ],
  "meta": {
    "q": "asdf",
    "alternatives": [

    ],
    "strong_matches": {
    }
  }
}

Query with more results when written in another language

GET http://api.skroutz.gr/search?q=%CE%B9%CF%80%CE%B7%CE%BF%CE%BD%CE%B5

View Response
Show Headers
Status: 200
{
  "categories": [

  ],
  "meta": {
    "q": "ιπηονε",
    "alternatives": [
      {
        "term": "iphone",
        "important": true
      }
    ],
    "strong_matches": {
    }
  }
}

Probably misspelled query

GET http://api.skroutz.gr/search?q=ipone

View Response
Show Headers
Status: 200
{
  "categories": [
    {
      "id": 1257,
      "name": "Καθαρισμός & Περιποίηση Μοτοσυκλέτας",
      "children_count": 0,
      "image_url": "https://b.scdn.gr/ds/categories/1257/20160513125857_4d310050.jpeg",
      "parent_id": 577,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/1257/moto_cleaning.html",
      "code": "moto_cleaning",
      "path": "76,33,382,577,1257",
      "show_specifications": false,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 9
    },
    {
      "id": 1229,
      "name": "Λιπαντικά Moto",
      "children_count": 0,
      "image_url": "https://c.scdn.gr/ds/categories/1229/1229.jpg",
      "parent_id": 1227,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/1229/lipantika-moto.html",
      "code": "moto_lub",
      "path": "76,33,382,1227,1229",
      "show_specifications": false,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 2
    }
  ],
  "meta": {
    "q": "ipone",
    "alternatives": [

    ],
    "strong_matches": {
    },
    "pagination": {
      "total_results": 4,
      "total_pages": 2,
      "page": 1,
      "per": 2
    }
  }
}

Query matching many categories

GET http://api.skroutz.gr/search?q=iphone

View Response
Show Headers
Status: 200
{
  "categories": [
    {
      "id": 40,
      "name": "Κινητά Τηλέφωνα",
      "children_count": 0,
      "image_url": "https://d.scdn.gr/ds/categories/40/20150508124644_bd07441b.jpg",
      "parent_id": 86,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/40/kinhta-thlefwna.html",
      "code": "mobile",
      "path": "76,1269,86,40",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 24
    },
    {
      "id": 579,
      "name": "Θήκες Κινητών Τηλεφώνων",
      "children_count": 0,
      "image_url": "https://b.scdn.gr/ds/categories/579/20150408173958_42b293c7.jpg",
      "parent_id": 86,
      "fashion": true,
      "layout_mode": "wide_tiles",
      "web_uri": "http://skroutz.gr/c/579/thikes-kinhtwn-thlefwnwn.html",
      "code": "thikes-kinhtwn-thlefwnwn",
      "path": "76,1269,86,579",
      "show_specifications": false,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 11055
    }
  ],
  "meta": {
    "q": "iphone",
    "alternatives": [

    ],
    "strong_matches": {
    },
    "pagination": {
      "total_results": 134,
      "total_pages": 67,
      "page": 1,
      "per": 2
    }
  }
}

Query with strong hints for a specific category match

GET http://api.skroutz.gr/search?q=Tablets

View Response
Show Headers
Status: 200
{
  "categories": [
    {
      "id": 1105,
      "name": "Tablets",
      "children_count": 0,
      "image_url": "https://a.scdn.gr/ds/categories/1105/20150127170004_1105.jpg",
      "parent_id": 1612,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/1105/tablet.html",
      "code": "tablet",
      "path": "76,1269,1612,1105",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 601
    },
    {
      "id": 1608,
      "name": "Θήκες Tablet",
      "children_count": 0,
      "image_url": "https://c.scdn.gr/ds/categories/1608/1608.jpg",
      "parent_id": 1612,
      "fashion": false,
      "layout_mode": "tiles",
      "web_uri": "http://skroutz.gr/c/1608/thikes-tablet.html",
      "code": "tablet-cases",
      "path": "76,1269,1612,1608",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 6149
    }
  ],
  "meta": {
    "q": "Tablets",
    "alternatives": [

    ],
    "strong_matches": {
      "category": {
        "id": 1105,
        "name": "Tablets",
        "children_count": 0,
        "image_url": "https://a.scdn.gr/ds/categories/1105/20150127170004_1105.jpg",
        "parent_id": 1612,
        "fashion": false,
        "layout_mode": "list",
        "web_uri": "http://skroutz.gr/c/1105/tablet.html",
        "code": "tablet",
        "path": "76,1269,1612,1105",
        "show_specifications": true,
        "manufacturer_title": "Κατασκευαστές"
      }
    },
    "pagination": {
      "total_results": 115,
      "total_pages": 58,
      "page": 1,
      "per": 2
    }
  }
}

Query with strong hints for a specific manufacturer match

GET http://api.skroutz.gr/search?q=apple

View Response
Show Headers
Status: 200
{
  "categories": [
    {
      "id": 40,
      "name": "Κινητά Τηλέφωνα",
      "children_count": 0,
      "image_url": "https://d.scdn.gr/ds/categories/40/20150508124644_bd07441b.jpg",
      "parent_id": 86,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/40/kinhta-thlefwna.html",
      "code": "mobile",
      "path": "76,1269,86,40",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 24
    },
    {
      "id": 1705,
      "name": "Smartwatches",
      "children_count": 0,
      "image_url": "https://a.scdn.gr/ds/categories/1705/20150508163903_9d5810ce.jpg",
      "parent_id": 1912,
      "fashion": false,
      "layout_mode": "tiles",
      "web_uri": "http://skroutz.gr/c/1705/Smartwatches.html",
      "code": "smartwatch",
      "path": "76,1269,1912,1705",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 12
    },
    {
      "id": 579,
      "name": "Θήκες Κινητών Τηλεφώνων",
      "children_count": 0,
      "image_url": "https://b.scdn.gr/ds/categories/579/20150408173958_42b293c7.jpg",
      "parent_id": 86,
      "fashion": true,
      "layout_mode": "wide_tiles",
      "web_uri": "http://skroutz.gr/c/579/thikes-kinhtwn-thlefwnwn.html",
      "code": "thikes-kinhtwn-thlefwnwn",
      "path": "76,1269,86,579",
      "show_specifications": false,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 6451
    },
    {
      "id": 1105,
      "name": "Tablets",
      "children_count": 0,
      "image_url": "https://a.scdn.gr/ds/categories/1105/20150127170004_1105.jpg",
      "parent_id": 1612,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/1105/tablet.html",
      "code": "tablet",
      "path": "76,1269,1612,1105",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 50
    },
    {
      "id": 25,
      "name": "Laptops",
      "children_count": 0,
      "image_url": "https://c.scdn.gr/ds/categories/25/20150127165806_25.jpg",
      "parent_id": 769,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/25/laptop.html",
      "code": "laptop",
      "path": "76,1269,22,769,25",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 21
    }
  ],
  "meta": {
    "q": "apple",
    "alternatives": [

    ],
    "strong_matches": {
      "manufacturer": {
        "id": 356,
        "name": "Apple",
        "image_url": "https://a.scdn.gr/ds/manufacturers/356/20160322115406_ae6f9a87.png"
      }
    },
    "pagination": {
      "total_results": 292,
      "total_pages": 59,
      "page": 1,
      "per": 5
    }
  }
}

Query with strong hints for a specific SKU match

GET http://api.skroutz.gr/search?q=samsung+s7+edge+duos

View Response
Show Headers
Status: 200
{
  "categories": [
    {
      "id": 40,
      "name": "Κινητά Τηλέφωνα",
      "children_count": 0,
      "image_url": "https://d.scdn.gr/ds/categories/40/20150508124644_bd07441b.jpg",
      "parent_id": 86,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/40/kinhta-thlefwna.html",
      "code": "mobile",
      "family_id": 1269,
      "show_manufacturers_filter": true,
      "path": "76,1269,86,40",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές"
    }
  ],
  "meta": {
    "q": "samsung s7 edge duos",
    "alternatives": [

    ],
    "strong_matches": {
      "sku": {
        "id": 8688868,
        "ean": "",
        "pn": "SM-G935FD",
        "name": "Galaxy S7 Edge Duos (32GB)",
        "display_name": "Samsung Galaxy S7 Edge Duos (32GB)",
        "category_id": 40,
        "first_product_shop_info": null,
        "click_url": null,
        "price_max": 725.0,
        "price_min": 695.0,
        "reviewscore": 5.0,
        "shop_count": 4,
        "plain_spec_summary": "SmartPhone, SIM: Dual, Οθόνη: 5.5\", 2560 x 1440 pixels, CPU: 2300 MHz, Πυρήνες CPU: 4+4, RAM: 4 GB, Μνήμη Αποθήκευσης: 32 GB, Δίκτυο: 4G, Κάμερα: 12 MP, Λειτουργικό: Android, Μπαταρία: 3600 mAh, Προστασία: Αδιάβροχο",
        "manufacturer_id": 28,
        "future": false,
        "reviews_count": 12,
        "virtual": false,
        "images": {
          "main": "https://d.scdn.gr/images/sku_main_images/008688/8688868/medium_20161010131812_samsung_galaxy_s7_edge_duos_32gb.jpeg",
          "alternatives": [
            "https://b.scdn.gr/images/sku_images/016108/16108117/20161010131710_cdc3deb2.jpeg",
            "https://b.scdn.gr/images/sku_images/016108/16108118/20161010131710_afb57771.jpeg",
            "https://b.scdn.gr/images/sku_images/016108/16108119/20161010131712_228c5fc6.jpeg",
            "https://d.scdn.gr/images/sku_images/016108/16108120/20161010131717_49f8a9f5.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108121/20161010131724_d289c227.jpeg",
            "https://d.scdn.gr/images/sku_images/016108/16108122/20161010131724_fc2b0bc3.jpeg",
            "https://b.scdn.gr/images/sku_images/016108/16108123/20161010131726_ce3ec935.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108126/20161010131732_839c7b35.jpeg",
            "https://b.scdn.gr/images/sku_images/016108/16108127/20161010131732_f28d990a.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108129/20161010131734_b82cc3d4.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108130/20161010131737_447adde5.jpeg",
            "https://b.scdn.gr/images/sku_images/016108/16108131/20161010131739_f9dd1ee8.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108132/20161010131742_62bcbb07.jpeg",
            "https://c.scdn.gr/images/sku_images/016108/16108136/20161010131755_291bc257.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108133/20161010131744_bf6ace50.jpeg",
            "https://c.scdn.gr/images/sku_images/016108/16108134/20161010131746_68099262.jpeg",
            "https://a.scdn.gr/images/sku_images/016108/16108135/20161010131748_b43023d9.jpeg",
            "https://c.scdn.gr/images/sku_images/015736/15736241/20160802135905_20e32e85.jpeg",
            "https://b.scdn.gr/images/sku_images/015736/15736244/20160802135917_f14cba7c.jpeg",
            "https://b.scdn.gr/images/sku_images/015736/15736246/20160802135925_3bcfe350.jpeg",
            "https://c.scdn.gr/images/sku_images/015736/15736243/20160802135915_e1dd5ea9.jpeg",
            "https://d.scdn.gr/images/sku_images/015736/15736245/20160802135923_03064874.jpeg",
            "https://d.scdn.gr/images/sku_images/015736/15736242/20160802135910_3fa6bc9f.jpeg",
            "https://a.scdn.gr/images/sku_images/015736/15736247/20160802135942_d60d6654.jpeg",
            "https://d.scdn.gr/images/sku_images/015736/15736250/20160802135949_d15e5387.jpeg",
            "https://d.scdn.gr/images/sku_images/015736/15736248/20160802135945_a0ba2bcd.jpeg",
            "https://d.scdn.gr/images/sku_images/015736/15736249/20160802135947_f2aea247.jpeg",
            "https://a.scdn.gr/images/sku_images/015736/15736251/20160802135953_9bd478df.jpeg",
            "https://b.scdn.gr/images/sku_images/015736/15736252/20160802135957_7615de02.jpeg"
          ]
        },
        "web_uri": "http://skroutz.gr/s/8688868/Samsung-Galaxy-S7-Edge-Duos-32GB.html",
        "comparable": true
      }
    },
    "pagination": {
      "total_results": 1,
      "total_pages": 1,
      "page": 1,
      "per": 25
    }
  }
}

Query with results when parts of the query are omitted

GET http://api.skroutz.gr/search?q=wrong+iphone

View Response
Show Headers
Status: 200
{
  "categories": [

  ],
  "meta": {
    "q": "wrong iphone",
    "alternatives": [
      {
        "term": "wrong",
        "count": 26,
        "drop": [
          {
            "token": "wrong",
            "dropped": false
          },
          {
            "token": "iphone",
            "dropped": true
          }
        ],
        "important": false
      },
      {
        "term": "iphone",
        "count": 29834,
        "drop": [
          {
            "token": "wrong",
            "dropped": true
          },
          {
            "token": "iphone",
            "dropped": false
          }
        ],
        "important": false
      }
    ],
    "strong_matches": {
    }
  }
}

Autocomplete

  GET /autocomplete
Name Type Description
q String The term to be autocompleted

GET http://api.skroutz.gr/autocomplete?q=iph

View Response
Show Headers
Status: 200
{
  "autocomplete": [
    {
      "k": "iphone 7",
      "i": 3
    },
    {
      "k": "iphone 7",
      "i": 3,
      "d": {
        "n": "Κινητά Τηλέφωνα",
        "id": 40
      }
    },
    {
      "k": "iphone 6s",
      "i": 3
    },
    {
      "k": "iphone 5s",
      "i": 3
    },
    {
      "k": "iphone",
      "i": 3
    },
    {
      "k": "iphone 7 plus",
      "i": 3
    },
    {
      "k": "iphone 6",
      "i": 3
    },
    {
      "k": "iphone se",
      "i": 3
    },
    {
      "k": "iphone 6s plus",
      "i": 3
    },
    {
      "k": "iphone 5",
      "i": 3
    },
    {
      "k": "iphone 4s",
      "i": 3
    },
    {
      "k": "iphone 7 jet black",
      "i": 3
    }
  ]
}

Note that the results of the autocomplete are to be treated as search suggestions. When the user selects any of them you should perform a search with the selected keyphrase.