Food Data API

The Food Data API allows users to easily search and retrieve comprehensive nutritional information for thousands of food items. With a simple search, users can access detailed data about a specific food ingredient, including macronutrient and micronutrient values, serving sizes, and more.

About the API:

The Food Data API is a powerful tool that provides users with comprehensive nutritional information on various food items. This API allows users to search for specific food items and retrieve detailed information about the nutritional content of each item. With access to a vast database of food ingredients, this API provides users with the ability to analyze and understand the nutritional value of their food choices.

The Food Data API provides information such as calorie count, macronutrients (fat, protein, and carbohydrates), vitamins, minerals, and other essential nutrients for each food item. Users can utilize this information to make informed decisions about their diets, track their daily nutrient intake, and create meal plans tailored to their specific dietary needs.

With its user-friendly interface and extensive database, the Food Data API is an excellent tool for nutritionists, dietitians, fitness enthusiasts, and anyone looking to maintain a healthy lifestyle. This API is also beneficial for food-related businesses such as restaurants, grocery stores, and food delivery services that require accurate nutritional information for their products.

In summary, the Food Data API is a valuable resource for anyone looking to improve their nutrition or make informed food choices. It provides an extensive database of food ingredients and their nutritional information, making it an essential tool for maintaining a healthy lifestyle.

What your API receives and what your API provides (input/output)?

It will receive a parameter and provide you with a JSON.

What are the most common uses cases of this API?

Fitness Apps: Fitness apps can use the Food Data API to track the nutritional intake of their users, helping them to meet their fitness goals.

Nutritionists: Nutritionists can use the Food Data API to provide accurate nutritional information to their clients, helping them to make informed decisions about their diet.

Dietitians: Dietitians can use the Food Data API to design personalized meal plans for their clients based on their specific dietary needs.

Restaurants: Restaurants can use the Food Data API to provide customers with accurate nutritional information about their menu items, helping them to make healthier choices.

Grocery Stores: Grocery stores can use the Food Data API to provide customers with nutritional information about the products they sell, making it easier for them to make informed buying decisions.

Food Delivery Services: Food delivery services can use the Food Data API to provide customers with accurate nutritional information about the meals they deliver.

Fitness Trackers: Fitness trackers can use the Food Data API to track the nutritional intake of their users, helping them to achieve their fitness goals.

Healthcare Apps: Healthcare apps can use the Food Data API to provide patients with accurate nutritional information, helping them to manage chronic conditions such as diabetes.

Recipe Websites: Recipe websites can use the Food Data API to provide users with nutritional information about the recipes they share, helping them to make healthier choices.

Education: Educational apps and websites can use the Food Data API to teach students about nutrition and the importance of making healthy food choices.

Are there any limitations to your plans?

Basic Plan: 5,000 API Calls.

Pro Plan: 30,000 API Calls.

Pro Plus Plan: 100,000 API Calls.

Premium Plan:  150,000 API Calls.

API Documentation

Endpoints


The "Get Food Data" endpoint is a powerful tool that enables users to retrieve comprehensive nutritional information on a specific food item. By simply sending a search query to the endpoint with the name of the desired food item, users can access thousands of food ingredients and their nutritional information. This endpoint provides detailed information on calorie counts, macronutrients (fat, protein, and carbohydrates), vitamins, minerals, and other essential nutrients for each food item. With the "Get Food Data" endpoint, users can make informed decisions about their diets, track their daily nutrient intake, and create meal plans tailored to their specific dietary needs.

Required Parameter: nutrientSearch 

For example: Chocolate



                                                                            
GET https://zylalabs.com/api/1822/food+data+api/1483/get+food+data
                                                                            
                                                                        

Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"total":271,"result":[{"_id":"634b005cd9a47eb26d6615bd","food_code":11321000,"food_description":"Soy milk, chocolate","category_number":1404,"category_description":"Milk substitutes","energy_kj":263.34,"energy_kcal":63,"protein_g":2.26,"carbohydrate_g":9.95,"sugar_g":7.86,"fiber_g":0.4,"fat_g":1.53,"fatty_acid_g":0.24,"fatty_acid_monounsaturated_g":0.379,"fatty_acid_polyunsaturated_g":0.836,"cholesterol_mg":0,"retinol_mcg":70,"vitamin_a_rae_mcg_RAE":70,"carotene_alpha_mcg":0,"carotene_beta_mcg":2,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0.022,"riboflavin_mg":0.262,"niacin_mg":0.513,"vitamin_b6_mg":0.077,"folic_acid_mcg":0,"folate_food_mcg":11,"folate_dfe_mcg_dfe":11,"folate_total_mcg":11,"choline_total_mg":23.6,"vitamin_b12_mcg":0.7,"vitamin_b12_added_mcg":0.7,"vitamin_c_mg":1.7,"vitamin_d_d2_plus_d3_mcg":1,"vitamin_e_alpha-tocopherol_mg":0.11,"vitamin_e_added_mg":0,"vitamin_k_phylloquinone_mcg":3,"calcium_mg":126,"phosphorus_mg":51,"magnesium_mg":15,"iron_mg":0.48,"zinc_mg":0.34,"copper_mg":0.206,"selenium_mg":4.8,"potassium_mg":143,"sodium_mg":53,"caffeine_mg":2,"theobromine_mg":23,"alcohol_g":0,"water_g":85.61},{"_id":"634b005cd9a47eb26d6615be","food_code":11321100,"food_description":"Soy milk, light, chocolate","category_number":1404,"category_description":"Milk substitutes","energy_kj":196.46,"energy_kcal":47,"protein_g":2.1,"carbohydrate_g":8.24,"sugar_g":7.13,"fiber_g":0.7,"fat_g":0.64,"fatty_acid_g":0.032,"fatty_acid_monounsaturated_g":0.037,"fatty_acid_polyunsaturated_g":0.405,"cholesterol_mg":0,"retinol_mcg":61,"vitamin_a_rae_mcg_RAE":61,"carotene_alpha_mcg":0,"carotene_beta_mcg":2,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0.037,"riboflavin_mg":0.201,"niacin_mg":0.512,"vitamin_b6_mg":0.037,"folic_acid_mcg":0,"folate_food_mcg":9,"folate_dfe_mcg_dfe":9,"folate_total_mcg":9,"choline_total_mg":28.4,"vitamin_b12_mcg":1,"vitamin_b12_added_mcg":1,"vitamin_c_mg":0,"vitamin_d_d2_plus_d3_mcg":1.2,"vitamin_e_alpha-tocopherol_mg":0.13,"vitamin_e_added_mg":0,"vitamin_k_phylloquinone_mcg":3.6,"calcium_mg":123,"phosphorus_mg":87,"magnesium_mg":15,"iron_mg":0.59,"zinc_mg":0.23,"copper_mg":0.199,"selenium_mg":1.7,"potassium_mg":144,"sodium_mg":46,"caffeine_mg":2,"theobromine_mg":19,"alcohol_g":0,"water_g":88.38},{"_id":"634b005cd9a47eb26d6615bf","food_code":11321200,"food_description":"Soy milk, nonfat, chocolate","category_number":1404,"category_description":"Milk substitutes","energy_kj":196.46,"energy_kcal":47,"protein_g":2.1,"carbohydrate_g":8.24,"sugar_g":7.13,"fiber_g":0.7,"fat_g":0.64,"fatty_acid_g":0.032,"fatty_acid_monounsaturated_g":0.037,"fatty_acid_polyunsaturated_g":0.405,"cholesterol_mg":0,"retinol_mcg":61,"vitamin_a_rae_mcg_RAE":61,"carotene_alpha_mcg":0,"carotene_beta_mcg":2,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0.037,"riboflavin_mg":0.201,"niacin_mg":0.512,"vitamin_b6_mg":0.037,"folic_acid_mcg":0,"folate_food_mcg":9,"folate_dfe_mcg_dfe":9,"folate_total_mcg":9,"choline_total_mg":28.4,"vitamin_b12_mcg":1,"vitamin_b12_added_mcg":1,"vitamin_c_mg":0,"vitamin_d_d2_plus_d3_mcg":1.2,"vitamin_e_alpha-tocopherol_mg":0.13,"vitamin_e_added_mg":0,"vitamin_k_phylloquinone_mcg":3.6,"calcium_mg":123,"phosphorus_mg":87,"magnesium_mg":15,"iron_mg":0.59,"zinc_mg":0.23,"copper_mg":0.199,"selenium_mg":1.7,"potassium_mg":144,"sodium_mg":46,"caffeine_mg":2,"theobromine_mg":19,"alcohol_g":0,"water_g":88.38},{"_id":"634b005cd9a47eb26d6615c1","food_code":11350010,"food_description":"Almond milk, sweetened, chocolate","category_number":1404,"category_description":"Milk substitutes","energy_kj":171.38,"energy_kcal":41,"protein_g":0.43,"carbohydrate_g":8.34,"sugar_g":7.72,"fiber_g":0.3,"fat_g":0.95,"fatty_acid_g":0.098,"fatty_acid_monounsaturated_g":0.561,"fatty_acid_polyunsaturated_g":0.224,"cholesterol_mg":0,"retinol_mcg":83,"vitamin_a_rae_mcg_RAE":83,"carotene_alpha_mcg":0,"carotene_beta_mcg":0,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0,"riboflavin_mg":0.011,"niacin_mg":0.071,"vitamin_b6_mg":0,"folic_acid_mcg":0,"folate_food_mcg":1,"folate_dfe_mcg_dfe":1,"folate_total_mcg":1,"choline_total_mg":2.9,"vitamin_b12_mcg":0,"vitamin_b12_added_mcg":0,"vitamin_c_mg":0,"vitamin_d_d2_plus_d3_mcg":0.9,"vitamin_e_alpha-tocopherol_mg":2.61,"vitamin_e_added_mg":2.6,"vitamin_k_phylloquinone_mcg":0,"calcium_mg":171,"phosphorus_mg":11,"magnesium_mg":7,"iron_mg":0.3,"zinc_mg":0.08,"copper_mg":0.03,"selenium_mg":0.2,"potassium_mg":67,"sodium_mg":67,"caffeine_mg":1,"theobromine_mg":6,"alcohol_g":0,"water_g":89.52},{"_id":"634b005cd9a47eb26d6615c3","food_code":11350030,"food_description":"Almond milk, unsweetened, chocolate","category_number":1404,"category_description":"Milk substitutes","energy_kj":66.88,"energy_kcal":16,"protein_g":0.46,"carbohydrate_g":1.48,"sugar_g":0.81,"fiber_g":0.3,"fat_g":1,"fatty_acid_g":0.104,"fatty_acid_monounsaturated_g":0.602,"fatty_acid_polyunsaturated_g":0.241,"cholesterol_mg":0,"retinol_mcg":90,"vitamin_a_rae_mcg_RAE":90,"carotene_alpha_mcg":0,"carotene_beta_mcg":0,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0,"riboflavin_mg":0.011,"niacin_mg":0.076,"vitamin_b6_mg":0,"folic_acid_mcg":0,"folate_food_mcg":1,"folate_dfe_mcg_dfe":1,"folate_total_mcg":1,"choline_total_mg":3.1,"vitamin_b12_mcg":0,"vitamin_b12_added_mcg":0,"vitamin_c_mg":0,"vitamin_d_d2_plus_d3_mcg":1,"vitamin_e_alpha-tocopherol_mg":2.8,"vitamin_e_added_mg":2.8,"vitamin_k_phylloquinone_mcg":0,"calcium_mg":184,"phosphorus_mg":11,"magnesium_mg":7,"iron_mg":0.32,"zinc_mg":0.08,"copper_mg":0.031,"selenium_mg":0.1,"potassium_mg":71,"sodium_mg":72,"caffeine_mg":1,"theobromine_mg":6,"alcohol_g":0,"water_g":96.26},{"_id":"634b005cd9a47eb26d6615ed","food_code":11460100,"food_description":"Frozen yogurt, chocolate","category_number":5802,"category_description":"Ice cream and frozen dairy desserts","energy_kj":547.58,"energy_kcal":131,"protein_g":3,"carbohydrate_g":21.6,"sugar_g":19.24,"fiber_g":2.3,"fat_g":3.6,"fatty_acid_g":2.272,"fatty_acid_monounsaturated_g":0.961,"fatty_acid_polyunsaturated_g":0.102,"cholesterol_mg":13,"retinol_mcg":38,"vitamin_a_rae_mcg_RAE":39,"carotene_alpha_mcg":0,"carotene_beta_mcg":9,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0.04,"riboflavin_mg":0.18,"niacin_mg":0.14,"vitamin_b6_mg":0.04,"folic_acid_mcg":0,"folate_food_mcg":12,"folate_dfe_mcg_dfe":12,"folate_total_mcg":12,"choline_total_mg":14.1,"vitamin_b12_mcg":0.07,"vitamin_b12_added_mcg":0,"vitamin_c_mg":0,"vitamin_d_d2_plus_d3_mcg":0.1,"vitamin_e_alpha-tocopherol_mg":0.09,"vitamin_e_added_mg":0,"vitamin_k_phylloquinone_mcg":0.3,"calcium_mg":100,"phosphorus_mg":89,"magnesium_mg":25,"iron_mg":0.46,"zinc_mg":0.28,"copper_mg":0.054,"selenium_mg":1.9,"potassium_mg":234,"sodium_mg":63,"caffeine_mg":3,"theobromine_mg":106,"alcohol_g":0,"water_g":71.2},{"_id":"634b005cd9a47eb26d6615ef","food_code":11460510,"food_description":"Frozen yogurt, soft serve, chocolate","category_number":5802,"category_description":"Ice cream and frozen dairy desserts","energy_kj":668.8,"energy_kcal":160,"protein_g":4.31,"carbohydrate_g":24.87,"sugar_g":23.56,"fiber_g":0.7,"fat_g":5.76,"fatty_acid_g":3.513,"fatty_acid_monounsaturated_g":1.65,"fatty_acid_polyunsaturated_g":0.215,"cholesterol_mg":2,"retinol_mcg":57,"vitamin_a_rae_mcg_RAE":58,"carotene_alpha_mcg":0,"carotene_beta_mcg":11,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":1,"thiamin_mg":0.038,"riboflavin_mg":0.224,"niacin_mg":0.325,"vitamin_b6_mg":0.081,"folic_acid_mcg":0,"folate_food_mcg":7,"folate_dfe_mcg_dfe":7,"folate_total_mcg":7,"choline_total_mg":20,"vitamin_b12_mcg":0.28,"vitamin_b12_added_mcg":0,"vitamin_c_mg":0.8,"vitamin_d_d2_plus_d3_mcg":0.1,"vitamin_e_alpha-tocopherol_mg":0.11,"vitamin_e_added_mg":0,"vitamin_k_phylloquinone_mcg":0.3,"calcium_mg":143,"phosphorus_mg":141,"magnesium_mg":24,"iron_mg":0.57,"zinc_mg":0.55,"copper_mg":0.115,"selenium_mg":3.5,"potassium_mg":237,"sodium_mg":86,"caffeine_mg":5,"theobromine_mg":41,"alcohol_g":0,"water_g":64.05},{"_id":"634b005cd9a47eb26d6615f2","food_code":11461220,"food_description":"Frozen yogurt bar, chocolate","category_number":5802,"category_description":"Ice cream and frozen dairy desserts","energy_kj":547.58,"energy_kcal":131,"protein_g":3,"carbohydrate_g":21.6,"sugar_g":19.24,"fiber_g":2.3,"fat_g":3.6,"fatty_acid_g":2.272,"fatty_acid_monounsaturated_g":0.961,"fatty_acid_polyunsaturated_g":0.102,"cholesterol_mg":13,"retinol_mcg":38,"vitamin_a_rae_mcg_RAE":39,"carotene_alpha_mcg":0,"carotene_beta_mcg":9,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":0,"thiamin_mg":0.04,"riboflavin_mg":0.18,"niacin_mg":0.14,"vitamin_b6_mg":0.04,"folic_acid_mcg":0,"folate_food_mcg":12,"folate_dfe_mcg_dfe":12,"folate_total_mcg":12,"choline_total_mg":14.1,"vitamin_b12_mcg":0.07,"vitamin_b12_added_mcg":0,"vitamin_c_mg":0,"vitamin_d_d2_plus_d3_mcg":0.1,"vitamin_e_alpha-tocopherol_mg":0.09,"vitamin_e_added_mg":0,"vitamin_k_phylloquinone_mcg":0.3,"calcium_mg":100,"phosphorus_mg":89,"magnesium_mg":25,"iron_mg":0.46,"zinc_mg":0.28,"copper_mg":0.054,"selenium_mg":1.9,"potassium_mg":234,"sodium_mg":63,"caffeine_mg":3,"theobromine_mg":106,"alcohol_g":0,"water_g":71.2},{"_id":"634b005cd9a47eb26d6615f3","food_code":11461250,"food_description":"Frozen yogurt cone, chocolate","category_number":5802,"category_description":"Ice cream and frozen dairy desserts","energy_kj":593.56,"energy_kcal":142,"protein_g":3.2,"carbohydrate_g":23.9,"sugar_g":18.71,"fiber_g":2.3,"fat_g":3.73,"fatty_acid_g":2.23,"fatty_acid_monounsaturated_g":0.996,"fatty_acid_polyunsaturated_g":0.228,"cholesterol_mg":12,"retinol_mcg":36,"vitamin_a_rae_mcg_RAE":37,"carotene_alpha_mcg":0,"carotene_beta_mcg":9,"cryptoxanthin_beta_mcg":0,"lycopene_mcg":0,"lutein_plus_zeaxanthin_mcg":1,"thiamin_mg":0.048,"riboflavin_mg":0.187,"niacin_mg":0.31...
                                                                                                                                                                                                                    
                                                                                                    

Get Food Data - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/1822/food+data+api/1483/get+food+data&nutrientSearch=Required' --header 'Authorization: Bearer YOUR_API_KEY' 

    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Food Data API REST API, simply include your bearer token in the Authorization header.
Headers
Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.

๐Ÿš€ Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Dedicated account manager
  • Service-level agreement (SLA)

Customer favorite features

  • โœ”๏ธŽ Only Pay for Successful Requests
  • โœ”๏ธŽ Free 7-Day Trial
  • โœ”๏ธŽ Multi-Language Support
  • โœ”๏ธŽ One API Key, All APIs.
  • โœ”๏ธŽ Intuitive Dashboard
  • โœ”๏ธŽ Comprehensive Error Handling
  • โœ”๏ธŽ Developer-Friendly Docs
  • โœ”๏ธŽ Postman Integration
  • โœ”๏ธŽ Secure HTTPS Connections
  • โœ”๏ธŽ Reliable Uptime

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the worldโ€™s most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.

The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.

Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]

Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.

API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.

Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.

To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.

To check how many API calls you have left for the current month, look at the โ€˜X-Zyla-API-Calls-Monthly-Remainingโ€™ header. For example, if your plan allows 1000 requests per month and you've used 100, this header will show 900.

To see the maximum number of API requests your plan allows, check the โ€˜X-Zyla-RateLimit-Limitโ€™ header. For instance, if your plan includes 1000 requests per month, this header will display 1000.

The โ€˜X-Zyla-RateLimit-Resetโ€™ header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3600, it means 3600 seconds are left until the limit resets.

Yes, you can cancel your plan anytime by going to your account and selecting the cancellation option on the Billing page. Please note that upgrades, downgrades, and cancellations take effect immediately. Additionally, upon cancellation, you will no longer have access to the service, even if you have remaining calls left in your quota.

You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

To let you experience our APIs without any commitment, we offer a 7-day free trial that allows you to make API calls at no cost during this period. Please note that you can only use this trial once, so make sure to use it with the API that interests you the most. Most of our APIs provide a free trial, but some may not support it.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, itโ€™s important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.

When you subscribe to an API trial, you can make only 25% of the calls allowed by that plan. For example, if the API plan offers 1000 calls, you can make only 250 during the trial. To access the full number of calls offered by the plan, you will need to subscribe to the full plan.

 Service Level
100%
 Response Time
1,287ms

Category:


Related APIs