Search foods
list_foodsFind foods to log or cook with: the person's own foods (library mine, the default; search it before making a new food), generic ingredients such as eggs, broccoli or rice (library composition, three characters or more), and packaged products by name, brand or barcode (libraries splot and off). This only searches. Pass a result's library and key exactly as food in create_meal, update_meal or a recipe ingredient. Use a short, specific query; if nothing matches, try a simpler query or another library, then ask for the label or offer a clearly marked estimate rather than searching again. A missing match says nothing about ingredients, nutrition or allergy safety.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | The most foods to return | |
| query | No | A food name, brand or barcode. With library mine, leave it empty to list My foods, most eaten first. | |
| locale | No | The person's language, such as en or fr, for generic ingredient names; English when left out | |
| offset | No | Skip this many results. Pass the nextOffset of the previous page to read on; a null nextOffset means there are no more. | |
| region | No | The person's two-letter country code, such as US, so Open Food Facts products sold there come first | |
| library | No | mine for the person's own foods, composition for generic ingredients, splot for Splot's shared products, off for Open Food Facts products | mine |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| foods | Yes | ||
| nextOffset | Yes |