Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v1.0.0
v1.0.0
  • Overview
  • Guides
    • Creating An Account
    • Getting Started
    • Whisk Sandbox
  • API
    • Authentication
      • Server Token
      • Client Token
      • User Access Token
      • Anonymous Access
    • Recipes
      • Get Recipe
      • Get Recipe Categories
      • Recipe Objects
    • Recipe Discovery
      • Recipe Feed
      • Recipe Search
      • Get Similar Recipes
    • Shopping Lists
      • Get Shopping Lists
      • Create A Shopping List
      • Add Items To A Shopping List
      • List Analysis
    • Meal Plans
      • Meal Plan Management
      • Delete Meals
      • Auto-Generator
      • Error Handling
    • Retailers
      • Get Available Stores
      • Retailers Checkout Flow
      • Retailer Aliases
      • OAuth Retailer Flow
      • Retailer User Info
      • Search Store Items
    • Carts
      • Create a Cart
      • Update Cart Item
      • Splitting Combined Items
      • Add Items To Cart
      • Add Recipes To Cart
      • Get Cart Item Options
      • Swap Cart Item Product
      • Delete A Cart Or A Cart Item
      • Checkout
    • Users
      • Get A User
      • Update A User
    • User Recipes & Collections
      • Add User Recipe
      • Create A Recipe
      • Update External Recipe
      • Get All User Recipes
      • Update User Recipe
      • Remove Recipe from Favorites
      • Create Collection
      • Get All User Collections
      • Get Collection
      • Get Recipes from a Collection
      • Remove Collection
    • Tools
      • Autocomplete
  • Shopping List SDK
    • Overview
    • Examples
      • Shoppable Recipes
      • Shoppable Products
      • Shoppable Media
    • Basic Setup
      • Basic Setup
      • Methods
      • Event Listeners
      • Widget
      • Subscriptions
      • Global Configuration
      • UTM Parameters
      • Using With SPA
  • Shopping List Mobile API
    • Overview
    • Examples
    • Reference
  • Tips and Tricks
    • Object IDs
    • URL Lookup
    • Searching
    • Multiple IDs request
  • Resources
    • Nutrients
    • Recipe Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Supported Retailers
    • Optimizing Image Load
Powered by GitBook
On this page
  • Autocomplete
  • language-tag
  • file-type
  • Working with images
  • Optimization
  • Response
  • Metadata

Was this helpful?

  1. API
  2. Tools

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

Name
Type
Description

language-tag

string

Language

file-type

string

The amount of data you will be getting in the product list

{
  "products": [
    {
      "name": "ANCHOVY",
      "displayName": "Acciuga",
      "imageUrl": "https://whisk-res.cloudinary.com/image/upload/v1550764890/graph/fooddb/cdd6c37ccd140664a46573d10e2fde25.jpg",
      "metadata": {
        "category": "MEATS AND SEAFOOD",
        "storing": {
          "pantry": {
            "metric": "Years",
            "min": 1,
            "max": 1
          },
          "defaultLocation": "Pantry"
        }
      },
      "nounForm": "singular"
    }
  ]
}

Sample Request

curl "https://cdn.whisk.com/autocomplete/v1/it/all.json" \
    -H "Accept-Encoding: deflate, gzip" \
    -H "If-Modified-Since: Wed, 04 Mar 2020 10:30:58"

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

Optimization

To reduce the amount of traffic for your application we recommend using these headers:

  1. Accept-Encoding: deflate, gzip - this will reduce the size of the response, consequently speeding up the request time.

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

PreviousToolsNextOverview

Last updated 5 years ago

Was this helpful?

Our CDN provides utilities to manage image size and format. You can find more information in our: .

If-Modified-Since - this will download content only if it has been modified. More about it here: .

Image Load Optimization documentation
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
Metadata