Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v2.0.0
v2.0.0
  • The Whisk Platform
  • Whisk API Overview
    • Introduction
    • Integration
    • Authentication
      • Server Token
      • User Access Token
        • Auth Flow Example
      • Client Token
      • Anonymous Access from Client Apps
    • Whisk Sandbox
    • Getting Started
  • Whisk API Reference 2.0
    • Provisioning
      • Get provisioning
    • Autocomplete
    • Community
      • Get your Communities
      • Get Communities from a Topic
      • Discover Recommended Communities
      • Search Communities
      • Get a Community
      • Get Recipes from a Community
      • Add Recipes to a Community
      • Remove a Recipe from a Community
      • Join a Community
      • Leave a Community
    • Posts and Reviews
      • Get reviews for a recipe
      • Create or edit review
      • Create a Post
      • Get Post by id
      • Delete a Post
      • Edit a Post
      • Report a Post
      • Create a Post Reply
      • Get Post Replies
      • Delete a Post reply
      • Report a Post reply
      • Like a Post or Reply
      • Users who liked a Post or Reply
    • Public profiles
      • Hide recipe in Public profile
      • Get Recipes for Public Profile
      • Get User's public profile by user_id
      • Get User's public profile by username
    • Custom Label
    • Feed
      • Obtain a Recipe Feed
    • Food DB
      • Autocomplete
      • Search
      • Get Food
    • Food List
    • Food Log
    • Foodpairing
    • Healthy meal recommendations
      • Healthy recipe only recommendations for DA
      • Recipe recommendations for SH
      • Tailored Plan API request for Samsung TV
    • Meal Plan
      • Generate a Meal Plan
      • Meal Object
        • Get Meals
        • Delete Meal
        • Add a Meal
      • Meal Plan Settings Object
        • Get Meal Plan Settings
        • Update Meal Plan Settings
      • Meal Plan Batch
    • Recipe
      • Get a Recipe
      • Search a Recipe
      • 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
        • Get Smart Collection
        • Get Recipes from a Smart Collection
    • Shopping List
      • Get your Shopping Lists
      • Get a Shopping List
      • Create a Shopping List
      • Delete a Shopping List
      • Update basic details of a Shopping List
      • Move Items between Shopping Lists
      • Add Items to a Shopping List
      • Delete an Item from a Shopping List
      • Update an Item in a Shopping List
      • Clear Items from a Shopping List
    • Media
    • Store Item
    • Unit Conversion
    • Users
      • Get a User
      • Update User Settings using Patch
      • Update User Settings using Post
    • Try it out!
  • 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
  • API Resources
    • Authentication Scopes
    • Errors and Troubleshooting
    • Cursor Pagination
    • Limits
    • Nutrients
    • Recipe Labels
    • Filtering Recipes using Custom Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Integrated Retailers
    • Optimizing Image Load
    • Meal Plan
Powered by GitBook
On this page

Was this helpful?

  1. Whisk API Reference 2.0

Autocomplete

The Autocomplete endpoint allows you to guess a product a user is writing into an input field. It then may be displayed as a shopping list or search suggestion.

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

This endpoint allows you to get an autocomplete suggestion. It may be used only with User Token for we derive autocomplete language from the User Preferences

Query Parameters

Name
Type
Description

limit

integer

The maximum number of results of each type in the response

q

string

User input string

product_type

string

Type of products in the results you are interested in

{
  "response": [
    {
      "name": "Apple",
      "product_id": "697cb490-e9bc-4133-a899-f39bae276a2e",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764658/graph/fooddb/41b6df25c3d98c7fe64c9bf713664008.jpg"
      }
    }
}

product_type

This parameter determines the type of products in the result. All types of items will be returned if omitted.

Supported product types

Type

Description

PRODUCT_TYPE_ONTOLOGY_PRODUCT

Usual food items

PRODUCT_TYPE_BASE_ITEM

Sample Request and Response

curl -X GET "https://api.whisk.com/autocomplete/v2/suggest?q=app&product_type=PRODUCT_TYPE_ONTOLOGY_PRODUCT&limit=10" \
-H  "accept: application/json"  \
-H  "Authorization: Bearer TOKEN"

{
  "response": [
    {
      "name": "Apple",
      "product_id": "697cb490-e9bc-4133-a899-f39bae276a2e",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764658/graph/fooddb/41b6df25c3d98c7fe64c9bf713664008.jpg"
      }
    },
    {
      "name": "Apple butter",
      "product_id": "2979d7bd-cd82-4502-af28-ae065b8d90c9",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1552312229/custom_upload/e180389df528431402cc86d402857087.jpg"
      }
    },
    {
      "name": "Apple cider",
      "product_id": "4ca9d34f-96eb-448b-a730-a959036e9182",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764590/graph/fooddb/fac80453ad9864b1468e9ac6053f6e12.jpg"
      }
    },
    {
      "name": "Apple cider vinegar",
      "product_id": "aa993cf4-0c5b-4092-93a6-10a2c1ea2565",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1544980834/custom_upload/725aed9a863d8e491be183b06b58408e.jpg"
      }
    },
    {
      "name": "Apple compote",
      "product_id": "f3a37646-67fd-4c67-9048-1ddcb1f785c1",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1552312251/custom_upload/886eb6684d3aded64f551a499176a241.jpg"
      }
    },
    {
      "name": "Apple juice",
      "product_id": "89fa4bc8-9ae6-457c-912b-16bdcac1760a",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764724/graph/fooddb/5aebbf56da4812d8cc1f8eda6ec22c93.jpg"
      }
    },
    {
      "name": "Apple puree",
      "product_id": "f985fcb2-d594-4d05-9565-49ccb8209fd1",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764902/graph/fooddb/a7ce41f6a01c5e3b8ed1476f0e83d21b.jpg"
      }
    },
    {
      "name": "Apple sauce",
      "product_id": "d753e75d-e521-454e-ac3d-50cd6ee04ba1",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764902/graph/fooddb/a7ce41f6a01c5e3b8ed1476f0e83d21b.jpg"
      }
    },
    {
      "name": "Apples",
      "product_id": "697cb490-e9bc-4133-a899-f39bae276a2e",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764658/graph/fooddb/41b6df25c3d98c7fe64c9bf713664008.jpg"
      }
    },
    {
      "name": "Applesauce",
      "product_id": "d753e75d-e521-454e-ac3d-50cd6ee04ba1",
      "product_type": "PRODUCT_TYPE_ONTOLOGY_PRODUCT",
      "image": {
        "url": "https://whisk-res.cloudinary.com/image/upload/v1550764902/graph/fooddb/a7ce41f6a01c5e3b8ed1476f0e83d21b.jpg"
      }
    }
  ]
}

PreviousGet provisioningNextCommunity

Last updated 3 years ago

Was this helpful?

Items available in the stores