Autocomplete

Please refer to the Food Search section for a new and improved way for searching for foods for food logging or other purposes.

The Autocomplete search covers all object types (recipes, products, own recipes) and is mostly used for Food Logging purposes.

Required Arguments

Argument

Required

Type

Description

query

true

String

Search query

mealType

true

Type of meal/food that is being searched

Leaving the mealType argument empty will result in a search that covers: RECIPE and USDA_MEAL. Using the argument will narrow the search to that particular domain.

Available Fields

Field Name

Type

Description

enter

Boolean

True to complete the value based on which the user entered. If this value is not defined, by default it will be set as true.

first

String

Retrieves the first results from the list.

after

String

For more information, refer to the Search documentation

last

String

Retrieves the last results from the list

Pagination

Autocomplete query supports the use of pagination. The following fields can be used

cursor
    }
     pageInfo {
      endCursor
      hasNextPage
    }

Refer to the pagination documentation for more information.

Examples

Searching in a single meal type

{
  autocomplete(query: "egg" mealType: USDA_MEAL) {
    edges {
      node {
        mealType
        databaseId
        name
      }
    }
  }
}

Last updated