fatsecret Platform API Documentation
Foods: Search
Description
Conducts a search of the food database using the search expression specified. The results are paginated according to a zero-based "page" offset. Successive pages of results may be retrieved by specifying a starting page offset value. For instance, specifying a max_results of 10 and page_number of 4 will return results numbered 41-50.
An interactive demonstration of our Food Search API can be accessed here
Why are we introducing this version?
New food classification levels, food form and nutrient content tags are now available.
A food_classification property includes the hierarchy levels for this food in the classification property, and the food form in the food_form property.
The hierarchy levels provide a three-level classification of the type of food being returned, and the food form indicates whether a food is a solid or a liquid, and for liquids whether it can be drunk
and is therefore a beverage.
A nutrient_content_tags property includes a single reference_basis
property that indicates the serving type used for tag calculation, and up to 9 nutrient entries under nutrients with applicable tags.
The food_classification property is enabled using the include_food_classification_data parameter, and the
nutrient_content_tags property is enabled using the include_nutrient_content_tags parameter.
For more detailed information about these new data points see the Food Classification and Nutrient Content Tags documentation. The
include_food_classification_data and include_nutrient_content_tags parameters are only available for Premier and Premier Free accounts, and can be enabled by
getting in touch to enable Premier Exclusive features on your account.
Parameters
URL / Method
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| URL (new) Method |
N/A | Required | "https://platform.fatsecret.com/rest/foods/search/v6" HTTP "GET" |
| OR | |||
| method | String | Required | "foods.search.v6" (included with other parameters) |
Additional Parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| search_expression | String | Optional | Search expression to match on food names |
| page_number | Int | Optional | Zero-based offset into the results for the query |
| max_results | Int | Optional | Maximum number of results to return (default value is 20). This number cannot be greater than 50 |
| include_food_classification_data | Boolean | Optional | Either "true" or "false" - the response will include the food classification hierarchy and the food form (Solid, Liquid (non-beverage) or Beverage) |
| include_nutrient_content_tags | Boolean | Optional | Either "true" or "false" - the response will include a nutrient content tag for each nutrient with a value. A nutrient whose value falls outside every band is returned without a tag |
| include_sub_categories | Boolean | Optional | (Deprecated, use include_food_classification_data) Response will include the names of all sub categories associated with the food |
| include_food_images | Boolean | Optional | Response will include food image in the response. (Requires separate premier offering, please contact us in order for this feature to be enabled for your account) |
| include_food_attributes | Boolean | Optional | Response will include food dietary preferences and allergens if available. (Requires separate premier offering, please contact us in order for this feature to be enabled for your account) |
| flag_default_serving | Boolean | Optional | Either "true" or "false" - the response will flag one of the servings as the default serving (the suggested or most commonly chosen option) |
| food_type | String | Optional | Restricts search results to a specific type. Valid values are "none", "generic" or "brand". Defaults to "none" i.e no filter |
| region | String | Optional | Results will be filtered by region. E.G.: "FR" returns results from France. If not specified this will default to "US" (United States). Click here for full documentation on localization. |
| language | String | Optional | (Ignored unless region is also specified) Results will be in the specified language. E.G.: "fr" returns results in French |
| format | String | Optional | The desired response format. Valid response formats are "xml" or "json" (default value is "xml"). |
Response
Each foods_search element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| max_results | Int | Maximum number of results to return (default value is 20). This number cannot be greater than 50 |
| total_results | Int | Total number of search results matching the search expression |
| page_number | Int | Zero-based offset into the results for the query |
Each food element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| food_id | Long | Unique food identifier |
| food_name | String | Name of the food, not including the brand name. E.G.: "Instant Oatmeal" |
| food_type | String | Takes the value "Brand" or "Generic". Indicates whether the food is a brand or generic item |
| food_url | String | URL of this food item on foods.fatsecret.com |
| brand_name | String | Brand name, only when food_type is "Brand". E.G.: "Quaker" |
Each food_sub_categories element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| food_sub_category | String | (Premier Exclusive) Sub category of the food |
Each food_image element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| image_url | String | Image url for a food image |
| image_type | Int | A numeric type identifier for the image (Standard / Isolated) |
Each allergen element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique allergen identifier |
| name | String | Allergen name (English only). Values include Egg, Fish, Gluten, Lactose, Milk, Nuts, Peanuts, Sesame, Shellfish, Soy |
| value | Ternary | Allergen value. Valid values are 1 (True), 0 (False) and -1 (Unknown). E.G.: Soy: 1 (Contains soy), 0 (Does not contain soy), -1 (Unknown) |
Each preference element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique preference identifier |
| name | String | Preference name (English only). Values include Vegan, Vegetarian |
| value | Ternary | Preference value. Valid values are 1 (True), 0 (False) and -1 (Unknown). E.G.: Vegan: 1 (Is vegan), 0 (Is not vegan), -1 (Unknown) |
Each level_1 element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique identifier for the broadest classification level |
| name | String | Name of the broadest classification level (English only). E.G.: Dairy Products and Eggs |
Each level_2 element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique identifier for the second classification level |
| name | String | Name of the second classification level (English only). E.G.: Milk and Non-Dairy Milk |
Each level_3 element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique identifier for the most specific classification level |
| name | String | Name of the most specific classification level (English only). E.G.: Milk |
Each food_form element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | How the food is measured and thresholded: 1 = Solid, 2 = Liquid (non-beverage), 3 = Beverage |
| name | String | Display name of the food form (English only). E.G.: Solid, Liquid (non-beverage), Beverage |
Each nutrient_content_tags element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| reference_basis | String | The serving each nutrient content tag on this food was calculated against. E.G.: "100 g", "100 ml" |
Each nutrient element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique nutrient identifier |
| identifier | String | Unique identifier label for the nutrient (English only). E.G.: fat, saturated_fat, sugar, sodium, protein, energy |
| name | String | Nutrient display name (English only). E.G.: Saturated Fat |
Each tag element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| id | Long | Unique tag identifier used across one or more nutrients |
| name | String | Tag display name (English only). Can vary by nutrient for the same tag id. E.G.: Contains, Low, Fat Free |
Each serving element contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| serving_id | Long | Unique serving identifier |
| serving_description | String | Full description of the serving size. E.G.: "1 cup" or "100 g" |
| serving_url | String | URL of the serving size for this food item on foods.fatsecret.com |
| metric_serving_amount | Decimal | Metric quantity combined with metric_serving_unit to derive the total standardized quantity of the serving (where available) |
| metric_serving_unit | String | Metric unit of measure for the serving size – either "g" or "ml" or "oz" – combined with metric_serving_amount to derive the total standardized quantity of the serving (where available) |
| number_of_units | Decimal | Number of units in this standard serving size. For instance, if the serving description is "2 tablespoons" the number of units is "2", while if the serving size is "1 cup" the number of units is "1". Please note that this is only applicable for when food_type is "Generic" whereas for "Brand" the number of units will always be "1" |
| measurement_description | String | A description of the unit of measure used in the serving description. For instance, if the description is "1/2 cup" the measurement description is "cup", while if the serving size is "100 g" the measurement description is "g". Please note that this is only applicable for when food_type is "Generic" whereas for "Brand" the measurement description will always be "serving" |
| is_default | Int | (Premier Exclusive) Only included if it's the suggested or most commonly chosen option. If included equals 1 |
| calories | Decimal | Energy content in kcal |
| carbohydrate | Decimal | Total carbohydrate content in grams |
| protein | Decimal | Protein content in grams |
| fat | Decimal | Total fat content in grams |
| saturated_fat | Decimal | Saturated fat content in grams (where available) |
| polyunsaturated_fat | Decimal | Polyunsaturated fat content in grams (where available) |
| monounsaturated_fat | Decimal | Monounsaturated fat content in grams (where available) |
| cholesterol | Decimal | Cholesterol content in milligrams (where available) |
| sodium | Decimal | Sodium content in milligrams (where available) |
| potassium | Decimal | Potassium content in milligrams (where available) |
| fiber | Decimal | Fiber content in grams (where available) |
| sugar | Decimal | Sugar content in grams (where available) |
| vitamin_a | Decimal | Vitamin A content in micrograms (where available) |
| vitamin_c | Decimal | Vitamin C content in milligrams (where available) |
| calcium | Decimal | Calcium content in milligrams (where available) |
| iron | Decimal | Iron content in milligrams (where available) |
| trans_fat | Decimal | Trans fat content in grams (where available) |
Example Response
Example 1:
<?xml version="1.0" encoding="utf-8"?>
<foods_search xmlns="http://platform.fatsecret.com/api/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://platform.fatsecret.com/api/1.0/ http://platform.fatsecret.com/api/1.0/fatsecret.xsd">
<max_results>1</max_results>
<total_results>1570</total_results>
<page_number>0</page_number>
<results>
<food>
<food_id>1641</food_id>
<food_name>Chicken Breast</food_name>
<food_type>Generic</food_type>
<food_sub_categories>
<food_sub_category>Chicken Breast</food_sub_category>
<food_sub_category>Chicken</food_sub_category>
</food_sub_categories>
<food_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten</food_url>
<food_images>
<food_image>
<image_url>https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_1024x1024.png</image_url>
<image_type>0</image_type>
</food_image>
<food_image>
<image_url>https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_400x400.png</image_url>
<image_type>0</image_type>
</food_image>
<food_image>
<image_url>https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_72x72.png</image_url>
<image_type>0</image_type>
</food_image>
</food_images>
<food_attributes>
<allergens>
<allergen>
<id>850</id>
<name>Milk</name>
<value>0</value>
</allergen>
<allergen>
<id>26216</id>
<name>Lactose</name>
<value>0</value>
</allergen>
<allergen>
<id>51582</id>
<name>Egg</name>
<value>0</value>
</allergen>
<allergen>
<id>76948</id>
<name>Fish</name>
<value>0</value>
</allergen>
<allergen>
<id>102314</id>
<name>Gluten</name>
<value>0</value>
</allergen>
<allergen>
<id>127680</id>
<name>Nuts</name>
<value>0</value>
</allergen>
<allergen>
<id>153046</id>
<name>Peanuts</name>
<value>0</value>
</allergen>
<allergen>
<id>178412</id>
<name>Shellfish</name>
<value>0</value>
</allergen>
<allergen>
<id>203778</id>
<name>Soy</name>
<value>0</value>
</allergen>
<allergen>
<id>279876</id>
<name>Sesame</name>
<value>0</value>
</allergen>
</allergens>
<preferences>
<preference>
<id>229144</id>
<name>Vegetarian</name>
<value>0</value>
</preference>
<preference>
<id>254510</id>
<name>Vegan</name>
<value>0</value>
</preference>
</preferences>
</food_attributes>
<food_classification>
<classification>
<level_1>
<id>10011</id>
<name>Meat and Poultry</name>
</level_1>
<level_2>
<id>20059</id>
<name>Poultry (Prepared)</name>
</level_2>
<level_3>
<id>30174</id>
<name>Chicken (Prepared)</name>
</level_3>
</classification>
<food_form>
<id>1</id>
<name>Solid</name>
</food_form>
</food_classification>
<nutrient_content_tags>
<reference_basis>100 g</reference_basis>
<nutrients>
<nutrient>
<id>1</id>
<identifier>energy</identifier>
<name>Energy density</name>
<tag>
<id>103</id>
<name>Medium</name>
</tag>
</nutrient>
<nutrient>
<id>2</id>
<identifier>fat</identifier>
<name>Fat</name>
<tag>
<id>105</id>
<name>Contains</name>
</tag>
</nutrient>
<nutrient>
<id>3</id>
<identifier>saturated_fat</identifier>
<name>Saturated Fat</name>
<tag>
<id>105</id>
<name>Contains</name>
</tag>
</nutrient>
<nutrient>
<id>4</id>
<identifier>sugar</identifier>
<name>Sugar</name>
<tag>
<id>100</id>
<name>Free</name>
</tag>
</nutrient>
<nutrient>
<id>5</id>
<identifier>sodium</identifier>
<name>Sodium</name>
<tag>
<id>105</id>
<name>Contains</name>
</tag>
</nutrient>
<nutrient>
<id>6</id>
<identifier>cholesterol</identifier>
<name>Cholesterol</name>
<tag>
<id>105</id>
<name>Contains</name>
</tag>
</nutrient>
<nutrient>
<id>7</id>
<identifier>protein</identifier>
<name>Protein</name>
<tag>
<id>104</id>
<name>High</name>
</tag>
</nutrient>
<nutrient>
<id>8</id>
<identifier>dietary_fiber</identifier>
<name>Dietary Fiber</name>
<tag>
<id>102</id>
<name>Low</name>
</tag>
</nutrient>
<nutrient>
<id>9</id>
<identifier>carbohydrate</identifier>
<name>Carbohydrate</name>
<tag>
<id>100</id>
<name>Free</name>
</tag>
</nutrient>
</nutrients>
</nutrient_content_tags>
<servings>
<serving>
<serving_id>50321</serving_id>
<serving_description>100 g</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=50321&portionamount=100.000</serving_url>
<metric_serving_amount>100.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>100.000</number_of_units>
<measurement_description>g</measurement_description>
<is_default>1</is_default>
<calories>195</calories>
<carbohydrate>0</carbohydrate>
<protein>29.55</protein>
<fat>7.72</fat>
<saturated_fat>2.172</saturated_fat>
<polyunsaturated_fat>1.646</polyunsaturated_fat>
<monounsaturated_fat>3.005</monounsaturated_fat>
<cholesterol>83</cholesterol>
<sodium>393</sodium>
<potassium>243</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>28</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>14</calcium>
<iron>1.06</iron>
</serving>
<serving>
<serving_id>5034</serving_id>
<serving_description>1/2 small (yield after cooking, bone removed)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5034&portionamount=0.500</serving_url>
<metric_serving_amount>84.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>0.500</number_of_units>
<measurement_description>small breast (yield after cooking, bone removed)</measurement_description>
<calories>164</calories>
<carbohydrate>0</carbohydrate>
<protein>24.82</protein>
<fat>6.48</fat>
<saturated_fat>1.824</saturated_fat>
<polyunsaturated_fat>1.383</polyunsaturated_fat>
<monounsaturated_fat>2.524</monounsaturated_fat>
<cholesterol>70</cholesterol>
<sodium>330</sodium>
<potassium>204</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>24</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>12</calcium>
<iron>0.89</iron>
</serving>
<serving>
<serving_id>4833</serving_id>
<serving_description>1 oz boneless, cooked</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=4833&portionamount=1.000</serving_url>
<metric_serving_amount>28.350</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>oz, boneless, cooked</measurement_description>
<calories>55</calories>
<carbohydrate>0</carbohydrate>
<protein>8.38</protein>
<fat>2.19</fat>
<saturated_fat>0.616</saturated_fat>
<polyunsaturated_fat>0.467</polyunsaturated_fat>
<monounsaturated_fat>0.852</monounsaturated_fat>
<cholesterol>24</cholesterol>
<sodium>111</sodium>
<potassium>69</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>8</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>4</calcium>
<iron>0.30</iron>
</serving>
<serving>
<serving_id>5035</serving_id>
<serving_description>1/2 medium (yield after cooking, bone removed)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5035&portionamount=0.500</serving_url>
<metric_serving_amount>98.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>0.500</number_of_units>
<measurement_description>medium breast (yield after cooking, bone removed)</measurement_description>
<calories>191</calories>
<carbohydrate>0</carbohydrate>
<protein>28.96</protein>
<fat>7.57</fat>
<saturated_fat>2.128</saturated_fat>
<polyunsaturated_fat>1.613</polyunsaturated_fat>
<monounsaturated_fat>2.945</monounsaturated_fat>
<cholesterol>81</cholesterol>
<sodium>385</sodium>
<potassium>238</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>27</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>14</calcium>
<iron>1.04</iron>
</serving>
<serving>
<serving_id>5036</serving_id>
<serving_description>1/2 large (yield after cooking, bone removed)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5036&portionamount=0.500</serving_url>
<metric_serving_amount>111.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>0.500</number_of_units>
<measurement_description>large breast (yield after cooking, bone removed)</measurement_description>
<calories>216</calories>
<carbohydrate>0</carbohydrate>
<protein>32.80</protein>
<fat>8.57</fat>
<saturated_fat>2.411</saturated_fat>
<polyunsaturated_fat>1.827</polyunsaturated_fat>
<monounsaturated_fat>3.335</monounsaturated_fat>
<cholesterol>92</cholesterol>
<sodium>436</sodium>
<potassium>270</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>31</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>16</calcium>
<iron>1.18</iron>
</serving>
<serving>
<serving_id>5041</serving_id>
<serving_description>1 oz boneless (yield after cooking)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5041&portionamount=1.000</serving_url>
<metric_serving_amount>18.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>oz, boneless, raw (yield after cooking)</measurement_description>
<calories>35</calories>
<carbohydrate>0</carbohydrate>
<protein>5.32</protein>
<fat>1.39</fat>
<saturated_fat>0.391</saturated_fat>
<polyunsaturated_fat>0.296</polyunsaturated_fat>
<monounsaturated_fat>0.541</monounsaturated_fat>
<cholesterol>15</cholesterol>
<sodium>71</sodium>
<potassium>44</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>5</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>3</calcium>
<iron>0.19</iron>
</serving>
<serving>
<serving_id>5040</serving_id>
<serving_description>1 oz raw (yield after cooking, bone removed)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5040&portionamount=1.000</serving_url>
<metric_serving_amount>15.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>oz, raw (yield after cooking, bone removed)</measurement_description>
<calories>29</calories>
<carbohydrate>0</carbohydrate>
<protein>4.43</protein>
<fat>1.16</fat>
<saturated_fat>0.326</saturated_fat>
<polyunsaturated_fat>0.247</polyunsaturated_fat>
<monounsaturated_fat>0.451</monounsaturated_fat>
<cholesterol>12</cholesterol>
<sodium>59</sodium>
<potassium>36</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>4</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>2</calcium>
<iron>0.16</iron>
</serving>
<serving>
<serving_id>4834</serving_id>
<serving_description>1 cup cooked, diced</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=4834&portionamount=1.000</serving_url>
<metric_serving_amount>135.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>cup, cooked, diced</measurement_description>
<calories>263</calories>
<carbohydrate>0</carbohydrate>
<protein>39.89</protein>
<fat>10.42</fat>
<saturated_fat>2.932</saturated_fat>
<polyunsaturated_fat>2.222</polyunsaturated_fat>
<monounsaturated_fat>4.056</monounsaturated_fat>
<cholesterol>112</cholesterol>
<sodium>531</sodium>
<potassium>328</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>38</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>19</calcium>
<iron>1.43</iron>
</serving>
<serving>
<serving_id>5039</serving_id>
<serving_description>1 oz, with bone cooked (yield after bone removed)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5039&portionamount=1.000</serving_url>
<metric_serving_amount>24.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>oz, with bone, cooked (yield after bone removed)</measurement_description>
<calories>47</calories>
<carbohydrate>0</carbohydrate>
<protein>7.09</protein>
<fat>1.85</fat>
<saturated_fat>0.521</saturated_fat>
<polyunsaturated_fat>0.395</polyunsaturated_fat>
<monounsaturated_fat>0.721</monounsaturated_fat>
<cholesterol>20</cholesterol>
<sodium>94</sodium>
<potassium>58</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>7</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>3</calcium>
<iron>0.25</iron>
</serving>
<serving>
<serving_id>5043</serving_id>
<serving_description>1 serving (98 g)</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5043&portionamount=1.000</serving_url>
<metric_serving_amount>98.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>serving (98g)</measurement_description>
<calories>191</calories>
<carbohydrate>0</carbohydrate>
<protein>28.96</protein>
<fat>7.57</fat>
<saturated_fat>2.128</saturated_fat>
<polyunsaturated_fat>1.613</polyunsaturated_fat>
<monounsaturated_fat>2.945</monounsaturated_fat>
<cholesterol>81</cholesterol>
<sodium>385</sodium>
<potassium>238</potassium>
<fiber>0</fiber>
<sugar>0</sugar>
<vitamin_a>27</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>14</calcium>
<iron>1.04</iron>
</serving>
</servings>
</food>
</results>
</foods_search>
Example 2:
<?xml version="1.0" encoding="utf-8"?>
<foods_search xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://platform.fatsecret.com/api/1.0/" xsi:schemaLocation="http://platform.fatsecret.com/api/1.0/ http://platform.fatsecret.com/api/1.0/fatsecret.xsd">
<max_results>1</max_results>
<total_results>2000</total_results>
<page_number>0</page_number>
<results>
<food>
<food_id>50953</food_id>
<food_name>Whole Grain Cheerios</food_name>
<brand_name>General Mills</brand_name>
<food_type>Brand</food_type>
<food_sub_categories>
<food_sub_category>Cereal</food_sub_category>
</food_sub_categories>
<food_url>https://foods.fatsecret.com/calories-nutrition/general-mills/whole-grain-cheerios</food_url>
<food_classification>
<classification>
<level_1>
<id>10004</id>
<name>Grains, Pasta and Noodles</name>
</level_1>
<level_2>
<id>20026</id>
<name>Cereal Products</name>
</level_2>
<level_3>
<id>30076</id>
<name>Breakfast Cereals - Ready to consume</name>
</level_3>
</classification>
<food_form>
<id>1</id>
<name>Solid</name>
</food_form>
</food_classification>
<nutrient_content_tags>
<reference_basis>100 g</reference_basis>
<nutrients>
<nutrient>
<id>1</id>
<identifier>energy</identifier>
<name>Energy density</name>
<tag>
<id>104</id>
<name>High</name>
</tag>
</nutrient>
<nutrient>
<id>2</id>
<identifier>fat</identifier>
<name>Fat</name>
<tag>
<id>105</id>
<name>Contains</name>
</tag>
</nutrient>
<nutrient>
<id>3</id>
<identifier>saturated_fat</identifier>
<name>Saturated Fat</name>
<tag>
<id>100</id>
<name>Free of</name>
</tag>
</nutrient>
<nutrient>
<id>4</id>
<identifier>sugar</identifier>
<name>Sugar</name>
<tag>
<id>102</id>
<name>Low</name>
</tag>
</nutrient>
<nutrient>
<id>5</id>
<identifier>sodium</identifier>
<name>Sodium</name>
<tag>
<id>105</id>
<name>Contains</name>
</tag>
</nutrient>
<nutrient>
<id>6</id>
<identifier>cholesterol</identifier>
<name>Cholesterol</name>
<tag>
<id>100</id>
<name>Free</name>
</tag>
</nutrient>
<nutrient>
<id>7</id>
<identifier>protein</identifier>
<name>Protein</name>
<tag>
<id>106</id>
<name>Reasonable</name>
</tag>
</nutrient>
<nutrient>
<id>8</id>
<identifier>dietary_fiber</identifier>
<name>Dietary Fiber</name>
<tag>
<id>104</id>
<name>High</name>
</tag>
</nutrient>
<nutrient>
<id>9</id>
<identifier>carbohydrate</identifier>
<name>Carbohydrate</name>
<tag>
<id>104</id>
<name>High</name>
</tag>
</nutrient>
</nutrients>
</nutrient_content_tags>
<servings>
<serving>
<serving_id>100675</serving_id>
<serving_description>1 cup</serving_description>
<serving_url>https://foods.fatsecret.com/calories-nutrition/general-mills/whole-grain-cheerios</serving_url>
<metric_serving_amount>30.000</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>1.000</number_of_units>
<measurement_description>serving</measurement_description>
<is_default>1</is_default>
<calories>100</calories>
<carbohydrate>20.00</carbohydrate>
<protein>3.00</protein>
<fat>2.00</fat>
<saturated_fat>0</saturated_fat>
<polyunsaturated_fat>0.500</polyunsaturated_fat>
<monounsaturated_fat>0.500</monounsaturated_fat>
<trans_fat>0</trans_fat>
<cholesterol>0</cholesterol>
<sodium>160</sodium>
<potassium>170</potassium>
<fiber>3.0</fiber>
<sugar>1.00</sugar>
</serving>
<serving>
<serving_id>0</serving_id>
<serving_description>100 g</serving_description>
<metric_serving_amount>100.0</metric_serving_amount>
<metric_serving_unit>g</metric_serving_unit>
<number_of_units>100.0</number_of_units>
<measurement_description>g</measurement_description>
<calories>333</calories>
<carbohydrate>66.67</carbohydrate>
<protein>10.00</protein>
<fat>6.67</fat>
<saturated_fat>0</saturated_fat>
<polyunsaturated_fat>1.667</polyunsaturated_fat>
<monounsaturated_fat>1.667</monounsaturated_fat>
<trans_fat>0</trans_fat>
<cholesterol>0</cholesterol>
<sodium>533</sodium>
<potassium>567</potassium>
<fiber>10.0</fiber>
<sugar>3.33</sugar>
</serving>
</servings>
</food>
</results>
</foods_search>
Example 1:
{
"foods_search": {
"max_results": "1",
"total_results": "1570",
"page_number": "0",
"results": {
"food": [
{
"food_id": "1641",
"food_name": "Chicken Breast",
"food_type": "Generic",
"food_sub_categories": {
"food_sub_category": [
"Chicken Breast",
"Chicken"
]
},
"food_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten",
"food_images": {
"food_image": [
{
"image_url": "https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_1024x1024.png",
"image_type": "0"
},
{
"image_url": "https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_400x400.png",
"image_type": "0"
},
{
"image_url": "https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_72x72.png",
"image_type": "0"
}
]
},
"food_attributes": {
"allergens": {
"allergen": [
{
"id": "850",
"name": "Milk",
"value": "0"
},
{
"id": "26216",
"name": "Lactose",
"value": "0"
},
{
"id": "51582",
"name": "Egg",
"value": "0"
},
{
"id": "76948",
"name": "Fish",
"value": "0"
},
{
"id": "102314",
"name": "Gluten",
"value": "0"
},
{
"id": "127680",
"name": "Nuts",
"value": "0"
},
{
"id": "153046",
"name": "Peanuts",
"value": "0"
},
{
"id": "178412",
"name": "Shellfish",
"value": "0"
},
{
"id": "203778",
"name": "Soy",
"value": "0"
},
{
"id": "279876",
"name": "Sesame",
"value": "0"
}
]
},
"preferences": {
"preference": [
{
"id": "229144",
"name": "Vegetarian",
"value": "0"
},
{
"id": "254510",
"name": "Vegan",
"value": "0"
}
]
}
},
"food_classification": {
"classification": {
"level_1": {
"id": "10011",
"name": "Meat and Poultry"
},
"level_2": {
"id": "20059",
"name": "Poultry (Prepared)"
},
"level_3": {
"id": "30174",
"name": "Chicken (Prepared)"
}
},
"food_form": {
"id": "1",
"name": "Solid"
}
},
"nutrient_content_tags": {
"reference_basis": "100 g",
"nutrients": {
"nutrient": [
{
"id": "1",
"identifier": "energy",
"name": "Energy density",
"tag": {
"id": "103",
"name": "Medium"
}
},
{
"id": "2",
"identifier": "fat",
"name": "Fat",
"tag": {
"id": "105",
"name": "Contains"
}
},
{
"id": "3",
"identifier": "saturated_fat",
"name": "Saturated Fat",
"tag": {
"id": "105",
"name": "Contains"
}
},
{
"id": "4",
"identifier": "sugar",
"name": "Sugar",
"tag": {
"id": "100",
"name": "Free"
}
},
{
"id": "5",
"identifier": "sodium",
"name": "Sodium",
"tag": {
"id": "105",
"name": "Contains"
}
},
{
"id": "6",
"identifier": "cholesterol",
"name": "Cholesterol",
"tag": {
"id": "105",
"name": "Contains"
}
},
{
"id": "7",
"identifier": "protein",
"name": "Protein",
"tag": {
"id": "104",
"name": "High"
}
},
{
"id": "8",
"identifier": "dietary_fiber",
"name": "Dietary Fiber",
"tag": {
"id": "102",
"name": "Low"
}
},
{
"id": "9",
"identifier": "carbohydrate",
"name": "Carbohydrate",
"tag": {
"id": "100",
"name": "Free"
}
}
]
}
},
"servings": {
"serving": [
{
"serving_id": "50321",
"serving_description": "100 g",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=50321&portionamount=100.000",
"metric_serving_amount": "100.000",
"metric_serving_unit": "g",
"number_of_units": "100.000",
"measurement_description": "g",
"is_default": "1",
"calories": "195",
"carbohydrate": "0",
"protein": "29.55",
"fat": "7.72",
"saturated_fat": "2.172",
"polyunsaturated_fat": "1.646",
"monounsaturated_fat": "3.005",
"cholesterol": "83",
"sodium": "393",
"potassium": "243",
"fiber": "0",
"sugar": "0",
"vitamin_a": "28",
"vitamin_c": "0",
"calcium": "14",
"iron": "1.06"
},
{
"serving_id": "5034",
"serving_description": "1/2 small (yield after cooking, bone removed)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5034&portionamount=0.500",
"metric_serving_amount": "84.000",
"metric_serving_unit": "g",
"number_of_units": "0.500",
"measurement_description": "small breast (yield after cooking, bone removed)",
"calories": "164",
"carbohydrate": "0",
"protein": "24.82",
"fat": "6.48",
"saturated_fat": "1.824",
"polyunsaturated_fat": "1.383",
"monounsaturated_fat": "2.524",
"cholesterol": "70",
"sodium": "330",
"potassium": "204",
"fiber": "0",
"sugar": "0",
"vitamin_a": "24",
"vitamin_c": "0",
"calcium": "12",
"iron": "0.89"
},
{
"serving_id": "4833",
"serving_description": "1 oz boneless, cooked",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=4833&portionamount=1.000",
"metric_serving_amount": "28.350",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "oz, boneless, cooked",
"calories": "55",
"carbohydrate": "0",
"protein": "8.38",
"fat": "2.19",
"saturated_fat": "0.616",
"polyunsaturated_fat": "0.467",
"monounsaturated_fat": "0.852",
"cholesterol": "24",
"sodium": "111",
"potassium": "69",
"fiber": "0",
"sugar": "0",
"vitamin_a": "8",
"vitamin_c": "0",
"calcium": "4",
"iron": "0.30"
},
{
"serving_id": "5035",
"serving_description": "1/2 medium (yield after cooking, bone removed)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5035&portionamount=0.500",
"metric_serving_amount": "98.000",
"metric_serving_unit": "g",
"number_of_units": "0.500",
"measurement_description": "medium breast (yield after cooking, bone removed)",
"calories": "191",
"carbohydrate": "0",
"protein": "28.96",
"fat": "7.57",
"saturated_fat": "2.128",
"polyunsaturated_fat": "1.613",
"monounsaturated_fat": "2.945",
"cholesterol": "81",
"sodium": "385",
"potassium": "238",
"fiber": "0",
"sugar": "0",
"vitamin_a": "27",
"vitamin_c": "0",
"calcium": "14",
"iron": "1.04"
},
{
"serving_id": "5036",
"serving_description": "1/2 large (yield after cooking, bone removed)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5036&portionamount=0.500",
"metric_serving_amount": "111.000",
"metric_serving_unit": "g",
"number_of_units": "0.500",
"measurement_description": "large breast (yield after cooking, bone removed)",
"calories": "216",
"carbohydrate": "0",
"protein": "32.80",
"fat": "8.57",
"saturated_fat": "2.411",
"polyunsaturated_fat": "1.827",
"monounsaturated_fat": "3.335",
"cholesterol": "92",
"sodium": "436",
"potassium": "270",
"fiber": "0",
"sugar": "0",
"vitamin_a": "31",
"vitamin_c": "0",
"calcium": "16",
"iron": "1.18"
},
{
"serving_id": "5041",
"serving_description": "1 oz boneless (yield after cooking)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5041&portionamount=1.000",
"metric_serving_amount": "18.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "oz, boneless, raw (yield after cooking)",
"calories": "35",
"carbohydrate": "0",
"protein": "5.32",
"fat": "1.39",
"saturated_fat": "0.391",
"polyunsaturated_fat": "0.296",
"monounsaturated_fat": "0.541",
"cholesterol": "15",
"sodium": "71",
"potassium": "44",
"fiber": "0",
"sugar": "0",
"vitamin_a": "5",
"vitamin_c": "0",
"calcium": "3",
"iron": "0.19"
},
{
"serving_id": "5040",
"serving_description": "1 oz raw (yield after cooking, bone removed)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5040&portionamount=1.000",
"metric_serving_amount": "15.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "oz, raw (yield after cooking, bone removed)",
"calories": "29",
"carbohydrate": "0",
"protein": "4.43",
"fat": "1.16",
"saturated_fat": "0.326",
"polyunsaturated_fat": "0.247",
"monounsaturated_fat": "0.451",
"cholesterol": "12",
"sodium": "59",
"potassium": "36",
"fiber": "0",
"sugar": "0",
"vitamin_a": "4",
"vitamin_c": "0",
"calcium": "2",
"iron": "0.16"
},
{
"serving_id": "4834",
"serving_description": "1 cup cooked, diced",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=4834&portionamount=1.000",
"metric_serving_amount": "135.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "cup, cooked, diced",
"calories": "263",
"carbohydrate": "0",
"protein": "39.89",
"fat": "10.42",
"saturated_fat": "2.932",
"polyunsaturated_fat": "2.222",
"monounsaturated_fat": "4.056",
"cholesterol": "112",
"sodium": "531",
"potassium": "328",
"fiber": "0",
"sugar": "0",
"vitamin_a": "38",
"vitamin_c": "0",
"calcium": "19",
"iron": "1.43"
},
{
"serving_id": "5039",
"serving_description": "1 oz, with bone cooked (yield after bone removed)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5039&portionamount=1.000",
"metric_serving_amount": "24.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "oz, with bone, cooked (yield after bone removed)",
"calories": "47",
"carbohydrate": "0",
"protein": "7.09",
"fat": "1.85",
"saturated_fat": "0.521",
"polyunsaturated_fat": "0.395",
"monounsaturated_fat": "0.721",
"cholesterol": "20",
"sodium": "94",
"potassium": "58",
"fiber": "0",
"sugar": "0",
"vitamin_a": "7",
"vitamin_c": "0",
"calcium": "3",
"iron": "0.25"
},
{
"serving_id": "5043",
"serving_description": "1 serving (98 g)",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/generic/chicken-breast-ns-as-to-skin-eaten?portionid=5043&portionamount=1.000",
"metric_serving_amount": "98.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "serving (98g)",
"calories": "191",
"carbohydrate": "0",
"protein": "28.96",
"fat": "7.57",
"saturated_fat": "2.128",
"polyunsaturated_fat": "1.613",
"monounsaturated_fat": "2.945",
"cholesterol": "81",
"sodium": "385",
"potassium": "238",
"fiber": "0",
"sugar": "0",
"vitamin_a": "27",
"vitamin_c": "0",
"calcium": "14",
"iron": "1.04"
}
]
}
}
]
}
}
}
Example 2:
{
"foods_search": {
"max_results": "1",
"total_results": "2000",
"page_number": "0",
"results": {
"food": [
{
"food_id": "50953",
"food_name": "Whole Grain Cheerios",
"brand_name": "General Mills",
"food_type": "Brand",
"food_sub_categories": {
"food_sub_category": [
"Cereal"
]
},
"food_url": "https://foods.fatsecret.com/calories-nutrition/general-mills/whole-grain-cheerios",
"food_classification": {
"classification": {
"level_1": {
"id": "10004",
"name": "Grains, Pasta and Noodles"
},
"level_2": {
"id": "20026",
"name": "Cereal Products"
},
"level_3": {
"id": "30076",
"name": "Breakfast Cereals - Ready to consume"
}
},
"food_form": {
"id": "1",
"name": "Solid"
}
},
"nutrient_content_tags": {
"reference_basis": "100 g",
"nutrients": {
"nutrient": [
{
"id": "1",
"identifier": "energy",
"name": "Energy density",
"tag": {
"id": "104",
"name": "High"
}
},
{
"id": "2",
"identifier": "fat",
"name": "Fat",
"tag": {
"id": "105",
"name": "Contains"
}
},
{
"id": "3",
"identifier": "saturated_fat",
"name": "Saturated Fat",
"tag": {
"id": "100",
"name": "Free of"
}
},
{
"id": "4",
"identifier": "sugar",
"name": "Sugar",
"tag": {
"id": "102",
"name": "Low"
}
},
{
"id": "5",
"identifier": "sodium",
"name": "Sodium",
"tag": {
"id": "105",
"name": "Contains"
}
},
{
"id": "6",
"identifier": "cholesterol",
"name": "Cholesterol",
"tag": {
"id": "100",
"name": "Free"
}
},
{
"id": "7",
"identifier": "protein",
"name": "Protein",
"tag": {
"id": "106",
"name": "Reasonable"
}
},
{
"id": "8",
"identifier": "dietary_fiber",
"name": "Dietary Fiber",
"tag": {
"id": "104",
"name": "High"
}
},
{
"id": "9",
"identifier": "carbohydrate",
"name": "Carbohydrate",
"tag": {
"id": "104",
"name": "High"
}
}
]
}
},
"servings": {
"serving": [
{
"serving_id": "100675",
"serving_description": "1 cup",
"serving_url": "https://foods.fatsecret.com/calories-nutrition/general-mills/whole-grain-cheerios",
"metric_serving_amount": "30.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "serving",
"is_default": "1",
"calories": "100",
"carbohydrate": "20.00",
"protein": "3.00",
"fat": "2.00",
"saturated_fat": "0",
"polyunsaturated_fat": "0.500",
"monounsaturated_fat": "0.500",
"trans_fat": "0",
"cholesterol": "0",
"sodium": "160",
"potassium": "170",
"fiber": "3.0",
"sugar": "1.00"
},
{
"serving_id": "0",
"serving_description": "100 g",
"metric_serving_amount": "100.0",
"metric_serving_unit": "g",
"number_of_units": "100.0",
"measurement_description": "g",
"calories": "333",
"carbohydrate": "66.67",
"protein": "10.00",
"fat": "6.67",
"saturated_fat": "0",
"polyunsaturated_fat": "1.667",
"monounsaturated_fat": "1.667",
"trans_fat": "0",
"cholesterol": "0",
"sodium": "533",
"potassium": "567",
"fiber": "10.0",
"sugar": "3.33"
}
]
}
}
]
}
}
}
Error Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 2 | OAuth 1.0 | Missing required oauth parameter: '<details>' |
| 3 | OAuth 1.0 | Unsupported oauth parameter: '<details>' |
| 4 | OAuth 1.0 | Invalid signature method: '<details>' |
| 5 | OAuth 1.0 | Invalid consumer key: '<details>' |
| 6 | OAuth 1.0 | Invalid/expired timestamp: '<details>' |
| 7 | OAuth 1.0 | Invalid/used nonce: '<details>' |
| 8 | OAuth 1.0 | Invalid signature: '<details>' |
| 9 | OAuth 1.0 | Invalid access token: '<details>' |
| 13 | OAuth 2.0 | Invalid token: '<details>' |
| 14 | OAuth 2.0 | Missing scope: '<details>' |
| 107 | Parameter | Value out of range: '<details>' |