Autocomplete

GET https://api.whisk.com/food/v2/autocomplete

Description

Swagger doc

Autocomplete returns a set of products to be tracked based on incomplete user input. Usually autocomplete call comes before calling Search API. Most relevant suggestions are returned in the first place

Parameters

NameOptionalTypeDescription

query

no

string

Max length is 255 chars

language

no

string

ISO 639-1 two letter language code

country

yes

string

ISO 3166-1 two letter country code

limit

yes

int

Number of suggestions. Max 10 suggestions.

Request example

curl -X GET "https://api.whisk.com/food/v2/autocomplete?query=app&language=en&country=gb&limit=5" -H  "accept: application/json" -H  "Authorization: Bearer %WHISK_TOKEN%"s

Response

Data returned in JSON format. Empty strings, zero values, empty arrays and null values are not returned.

JSON response example

{
  "suggestions": [
    {
      "name": "apple"
    },
    {
      "name": "apples"
    },
    {
      "name": "aperol"
    },
    {
      "name": "cox apple"
    },
    {
      "name": "red apple"
    }
  ]
}

Core attributes

NameOptionalTypeDescription

name

no

string

Localized suggestion text

Last updated