fatsecret Platform API Documentation
Food Classification
Food Classification Hierarchy
Food Classification Levels are being introduced to replace the existing Categories and Sub Categories, which are deprecated.
A food is placed into a three-level hierarchy, from the broadest grouping down to the most specific.
| LEVEL | PURPOSE | EXAMPLE |
|---|---|---|
| Level 1 | Broad food group | Meat and Poultry |
| Level 2 | Narrower grouping within level 1 | Poultry (Prepared) |
| Level 3 | Most specific grouping | Chicken (Prepared) |
Food form
Alongside the hierarchy, each classified food carries a food_form describing whether it is a liquid, a solid or a beverage.
| ID | NAME | DESCRIPTION |
|---|---|---|
| 1 | Solid | Items intended to be consumed as food. Measured by weight. |
| 2 | Liquid (non-beverage) | Liquid items which are not beverages such as cooking oils, sauces, soups or dressings. Measured by weight, or by volume when no weight is available. |
| 3 | Beverage | Liquid items consumed as beverages. Measured by volume. |
Food classification hierarchy values and food forms are returned on the latest food.get and foods.search endpoints by setting the include_food_classification_data flag.
The include_food_classification_data flag is available for Premier and Premier Free accounts, and can be enabled by getting in touch to enable Premier Exclusive features on your account.
Definitions
Solid and Beverage
While we have used the terms "solid" and "beverage" throughout our documentation, please note the following:
Solid: Defined to capture items which are "not liquid". Our definition of "solid" includes anything that holds its shape, is spooned or scooped, is spread with a knife, or is eaten in pieces. Yogurt, butter, jam, nut butter, dips, and chutneys, plus all powders, granules, cubes, sheets, and anything measured by weight.
Liquid: A food is liquid if, at the temperature it is normally consumed, it pours and flows to take the shape of its container, and is measured by volume while consumers would drink or pour it rather than chew, spoon or spread it. Liquid includes viscous pourables: honey, cream, oils, syrups, soups, dressings, pourable sauces, condensed milk, and drinks of every kind.
Preparation
Primary: A food is unprepared or in an "incomplete" state and requires a step, or addition of ingredients before it's considered a finished dish (e.g. powdered soup mix). It may also be foods which have not undergone any cooking or manufacturing processes such as raw meat or fruit.
In the context of meat, "primary" refers to meat which is raw, but may be sliced, diced, minced, ground or mechanically tenderized.
Prepared: These foods have often gone through a manufacturing process such as being cooked, dried, cured, ground, or reformed, or had the addition of other ingredients. These foods can be in different states, such as frozen, pantry or fresh and only need to be served or heated.
Readiness States
Ready to Consume/Drink: Foods/drinks which are ready to consume/drink and require no further preparation. These foods can be in one of two states, such as fresh or pantry.
Not Ready to Consume/Drink: These foods/drinks require further preparation such as cooking, being treated with heat or hydration. These foods often are not food safe unless the required process is completed. If neither is defined, it can generally be assumed that the item is ready to consume.