Autocomplete
The Autocomplete endpoint provides a list of the most popular ingredients and products in several languages and can be used to add autocomplete functionality to your application.
Autocomplete
GET
https://cdn.whisk.com/autocomplete/v1/{language-tag}/{file-type}.json
Path Parameters
language-tag
string
Language
file-type
string
The amount of data you will be getting in the product list
Sample Request
language-tag
The language and locale of the autocomplete list. E.g en-us
.
LANGUAGE CODE
LOCALE CODE
DEFAULT LOCALE
en
gb, us
gb
es
es, mx
es
fr
fr
sv
se
de
de
zh
cn
ko
it
no
For English language tag could be:
en-us
– US product names in English;en-gb
– GB product names in English;en
- same as en-gb.
file-type
This parameter allows you to control the amount of data you will be getting in the product list. Available options:
all
– full data, all items with full content;all-slim
- all items are returned and the items do not include metadata information;food
- only food items, including metadata (check the response section for more information);food-slim
- only food items not including metadata.
Working with images
Our CDN provides utilities to manage image size and format. You can find more information in our: Image Load Optimization documentation.
Optimization
To reduce the amount of traffic for your application we recommend using these headers:
Accept-Encoding: deflate, gzip
- this will reduce the size of the response, consequently speeding up the request time.If-Modified-Since
- this will download content only if it has been modified. More about it here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since.
Response
ATTRIBUTE
TYPE
DESCRIPTION
name
string
The canonical name of the product, identical for all languages
displayName
string
The name of the product in the selected language
imageUrl
string
The link to the product’s image
nounForm
string
Indicates if the product name is singular, plural or invariant
metadata
Metadata
ATTRIBUTE
TYPE
DESCRIPTION
category
string
The product’s category
sorting
string
The product’s storing recommendation
Last updated