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.
Returns detailed nutritional information for the specified food. Use this call to display nutrition values for a food to users.
An interactive demonstration of our Food Search API can be accessed here
Why are we introducing version 3?
We are introducing version 3 to correspond to an update for the food.get.v4 which includes images for generic foods and allergen / dietary preference information.
Allergens, dietary preferences and images have separate access to our normal premier offerings. Please contact us here for enquiries on access to this data.
Parameters
All
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
method | String | Required | MUST be "foods.search.v3" |
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_sub_categories | Boolean | Optional | 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) |
region | String | Optional | Results will be filtered by region. E.G.: "FR" returns results from France |
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" |
brand_name | String | Brand name, only when food_type is "Brand". E.G.: "Quaker" |
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 www.fatsecret.com |
Each food_sub_categories
element contains information as follows:
NAME | TYPE | DESCRIPTION |
---|---|---|
food_sub_category | String | (Premier Exclusive) Sub category of the food |
Each allergen
element contains information as follows:
NAME | TYPE | DESCRIPTION |
---|---|---|
id | Long | Unique allergen identifier |
name | Long | 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). Eg. 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 | Long | Preference name (English only). Values include Vegan, Vegetarian |
value | Ternary | Preference value. Valid values are 1 (True), 0 (False) and -1 (Unknown). Eg. Vegan: 1 (Is vegan), 0 (Is not vegan), -1 (Unknown) |
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 www.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 its 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) |
trans_fat | Decimal | Trans 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) |
added_sugars | Decimal | Added Sugars content in grams (where available) |
vitamin_d | Decimal | Vitamin D content in micrograms (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) |
Each food_image
element contains information as follows:
NAME | TYPE | DESCRIPTION |
---|---|---|
image_url | String | Image url for a food image |
image_type | String | A type identifier for the image (Standard / Isolated) |
Example Response
Example 1:
<?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>220</total_results>
<page_number>0</page_number>
<results>
<food>
<food_id>433456</food_id>
<food_name>Whole Grain Cheerios 1g of sugar</food_name>
<brand_name>General Mills Cereal</brand_name>
<food_type>Brand</food_type>
<food_sub_categories>
<food_sub_category>Cheeseburgers</food_sub_category>
<food_sub_category>Burgers</food_sub_category>
</food_sub_categories>
<food_url>https://www.fatsecret.com/calories-nutrition/0_1411704_1002131029_Whole+Grain+Cheerios+1g+of+sugar</food_url>
<food_attributes>
<allergens>
<allergen>
<id>24904</id>
<name>Fish</name>
<value>-1</value>
</allergen>
<allergen>
<id>24905</id>
<name>Soy</name>
<value>-1</value>
</allergen>
<allergen>
<id>24906</id>
<name>Nuts</name>
<value>-1</value>
</allergen>
<allergen>
<id>24907</id>
<name>Lactose</name>
<value>-1</value>
</allergen>
<allergen>
<id>24908</id>
<name>Shellfish</name>
<value>-1</value>
</allergen>
<allergen>
<id>24909</id>
<name>Egg</name>
<value>-1</value>
</allergen>
<allergen>
<id>24910</id>
<name>Sesame</name>
<value>-1</value>
</allergen>
<allergen>
<id>24911</id>
<name>Peanuts</name>
<value>-1</value>
</allergen>
<allergen>
<id>24912</id>
<name>Gluten</name>
<value>-1</value>
</allergen>
<allergen>
<id>24913</id>
<name>Milk</name>
<value>-1</value>
</allergen>
</allergens>
<preferences>
<preference>
<id>24914</id>
<name>Vegan</name>
<value>-1</value>
</preference>
<preference>
<id>24915</id>
<name>Vegetarian</name>
<value>-1</value>
</preference>
</preferences>
</food_attributes>
<servings>
<serving>
<serving_id>462681</serving_id>
<serving_description>1 cup</serving_description>
<serving_url>https://www.fatsecret.com/calories-nutrition/0_1411704_1002131029_Whole+Grain+Cheerios+1g+of+sugar</serving_url>
<metric_serving_amount>27.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>110</calories>
<carbohydrate>20.00</carbohydrate>
<protein>3.00</protein>
<fat>1.50</fat>
<saturated_fat>0.400</saturated_fat>
<polyunsaturated_fat>1.578</polyunsaturated_fat>
<monounsaturated_fat>2.298</monounsaturated_fat>
<trans_fat>0</trans_fat>
<cholesterol>0</cholesterol>
<sodium>250</sodium>
<potassium>80</potassium>
<fiber>2.0</fiber>
<sugar>1.00</sugar>
<added_sugars>0</added_sugars>
<vitamin_d>0</vitamin_d>
<vitamin_a>0</vitamin_a>
<vitamin_c>0</vitamin_c>
<calcium>0</calcium>
<iron>0</iron>
</serving>
</servings>
</food>
</results>
</foods_search>
Example 2:
<?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://localhost:5903/api/1.0/fatsecret.xsd">
<max_results>1</max_results>
<total_results>1129</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://www.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>1</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>1</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>1</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>
<servings>
<serving>
<serving_id>50321</serving_id>
<serving_description>100 g</serving_description>
<serving_url>https://www.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>
<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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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 1:
{
"foods_search": {
"max_results": "1",
"total_results": "220",
"page_number": "0",
"results": {
"food": [
{
"food_id": "433456",
"food_name": "Whole Grain Cheerios 1g of sugar",
"brand_name": "General Mills Cereal",
"food_type": "Brand",
"food_sub_categories": {
"food_sub_category": [
"Cheeseburgers",
"Burgers"
]
},
"food_url": "https://www.fatsecret.com/calories-nutrition/0_1411704_1002131029_Whole+Grain+Cheerios+1g+of+sugar",
"food_attributes": {
"allergens": {
"allergen": [
{
"id": "24904",
"name": "Fish",
"value": "-1"
},
{
"id": "24905",
"name": "Soy",
"value": "-1"
},
{
"id": "24906",
"name": "Nuts",
"value": "-1"
},
{
"id": "24907",
"name": "Lactose",
"value": "-1"
},
{
"id": "24908",
"name": "Shellfish",
"value": "-1"
},
{
"id": "24909",
"name": "Egg",
"value": "-1"
},
{
"id": "24910",
"name": "Sesame",
"value": "-1"
},
{
"id": "24911",
"name": "Peanuts",
"value": "-1"
},
{
"id": "24912",
"name": "Gluten",
"value": "-1"
},
{
"id": "24913",
"name": "Milk",
"value": "-1"
}
]
},
"preferences": {
"preference": [
{
"id": "24914",
"name": "Vegan",
"value": "-1"
},
{
"id": "24915",
"name": "Vegetarian",
"value": "-1"
}
]
}
},
"servings": {
"serving": [
{
"serving_id": "462681",
"serving_description": "1 cup",
"serving_url": "https://www.fatsecret.com/calories-nutrition/0_1411704_1002131029_Whole+Grain+Cheerios+1g+of+sugar",
"metric_serving_amount": "27.000",
"metric_serving_unit": "g",
"number_of_units": "1.000",
"measurement_description": "serving",
"is_default": "1",
"calories": "110",
"carbohydrate": "20.00",
"protein": "3.00",
"fat": "1.50",
"saturated_fat": "0.400",
"polyunsaturated_fat": "1.578",
"monounsaturated_fat": "2.298",
"trans_fat": "0",
"cholesterol": "0",
"sodium": "250",
"potassium": "80",
"fiber": "2.0",
"sugar": "1.00",
"added_sugars": "0",
"vitamin_d": "0",
"vitamin_a": "0",
"vitamin_c": "0",
"calcium": "0",
"iron": "0"
}
]
}
}
]
}
}
}
Example 2:
{
"foods_search": {
"max_results": "1",
"total_results": "1129",
"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://www.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": "1"
},
{
"image_url": "https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_400x400.png",
"image_type": "1"
},
{
"image_url": "https://www.foodimagedb.com/food-images/bc47e77b-3a5c-4a8e-aa6c-786646a8934a_72x72.png",
"image_type": "1"
}
]
},
"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"
}
]
}
},
"servings": {
"serving": [
{
"serving_id": "50321",
"serving_description": "100 g",
"serving_url": "https://www.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",
"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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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"
}
]
}
}
]
}
}
}
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>' |