Food Nutrition Information API

Food Nutrition Information API allows users to search and find foods along with their detailed nutritional information, including calorie count, protein, fat, and carbohydrate content.

About the API:

The Food Nutrition Information API is a comprehensive resource for nutritional information on a wide range of foods. Whether you are looking to track your diet and nutrition, create a meal planning platform, or build a food tracking app, this API provides the information you need to achieve your goals.

The API allows you to search and find foods based on their nutritional information, including calorie count, protein, fat, and carbohydrate content. The data is carefully sourced and regularly updated, ensuring that users have access to the most accurate and up-to-date information. With its easy-to-use interface, the API is designed to be accessible to developers of all skill levels, from those just starting out to experienced professionals.

In addition to its comprehensive database of food items, the Food Nutrition Information API also provides detailed information on the nutritional content of each food item, making it easy for users to make informed decisions about their eating habits. Whether you need to track your daily calorie intake, monitor your nutrient intake, or simply want to learn more about the foods you eat, this API provides the information you need to achieve your goals.

 

 

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

Pass the food keyword that you want to retrieve, and receive relevant nutritional information. 

 

What are the most common uses cases of this API?

  1. Meal planning and recipe creation - users can access nutrition information for specific ingredients and foods to create balanced meals and healthy recipes.

  2. Food tracking and diet management - individuals can track their daily calorie intake and nutrient consumption using the API to meet their dietary goals.

  3. Restaurant menu analysis - restaurants can use the API to analyze the nutritional content of menu items and make informed decisions about menu development and labeling.

  4. Fitness and weight management - fitness and weight loss apps can utilize the API to provide personalized nutrition plans and track progress based on users' caloric and nutrient needs.

  5. Food labeling and product development - food and beverage manufacturers can access accurate nutrition information for their products to comply with labeling requirements and develop healthier options.

  6. Healthcare and wellness - health professionals and wellness centers can use the API to provide personalized nutrition recommendations and support for individuals with specific health conditions.

 

Are there any limitations to your plans?

Besides API call limitations per month, there is a limitation of 100 requests per day on paid plans. 

API Documentation

Endpoints


Search for foods using keywords.

 


                                                                            
GET https://zylalabs.com/api/1218/food+nutrition+information+api/1058/search+food+by+keyword
                                                                            
                                                                        

Search Food By Keyword - Endpoint Features

Object Description
query [Required]
pageSize [Optional]
pageNumber [Optional]
brandOwner [Optional]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"totalHits":6846,"currentPage":1,"totalPages":1370,"pageList":[1,2,3,4,5,6,7,8,9,10],"foodSearchCriteria":{"query":"bacon","generalSearchInput":"bacon","pageNumber":1,"numberOfResultsPerPage":50,"pageSize":5,"requireAllWords":false},"foods":[{"fdcId":1799988,"description":"BACON","dataType":"Branded","gtinUpc":"654383121311","publishedDate":"2021-06-17","brandOwner":"Miesfelds Triangle Market, Inc.","brandName":"FESTIVAL FOODS","ingredients":"BACON CURED WITH: WATER, SALT, SUGAR, SODIUM PHOSPHATE, SODIUM ERYTHORBATE, SODIUM NITRITE.","marketCountry":"United States","foodCategory":"Bacon, Sausages & Ribs","modifiedDate":"2017-07-14","dataSource":"LI","packageWeight":"16 oz","servingSizeUnit":"g","servingSize":14,"householdServingFullText":"2 SLICES","tradeChannels":["NO_TRADE_CHANNEL"],"allHighlightFields":"<b>Ingredients</b>: <em>BACON</em> CURED WITH: WATER, SALT, SUGAR, SODIUM PHOSPHATE, SODIUM ERYTHORBATE, SODIUM NITRITE.","score":1023.10516,"microbes":[],"foodNutrients":[{"nutrientId":1003,"nutrientName":"Protein","nutrientNumber":"203","unitName":"G","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":7.14,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":600,"indentLevel":1,"foodNutrientId":21554773},{"nutrientId":1004,"nutrientName":"Total lipid (fat)","nutrientNumber":"204","unitName":"G","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":50,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":800,"indentLevel":1,"foodNutrientId":21554774,"percentDailyValue":10},{"nutrientId":1005,"nutrientName":"Carbohydrate, by difference","nutrientNumber":"205","unitName":"G","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":1110,"indentLevel":2,"foodNutrientId":21554775,"percentDailyValue":0},{"nutrientId":1008,"nutrientName":"Energy","nutrientNumber":"208","unitName":"KCAL","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":500,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":300,"indentLevel":1,"foodNutrientId":21554776},{"nutrientId":2000,"nutrientName":"Total Sugars","nutrientNumber":"269","unitName":"G","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":1510,"indentLevel":3,"foodNutrientId":21554777},{"nutrientId":1079,"nutrientName":"Fiber, total dietary","nutrientNumber":"291","unitName":"G","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":1200,"indentLevel":3,"foodNutrientId":21554778,"percentDailyValue":0},{"nutrientId":1087,"nutrientName":"Calcium, Ca","nutrientNumber":"301","unitName":"MG","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":5300,"indentLevel":1,"foodNutrientId":21554779,"percentDailyValue":0},{"nutrientId":1089,"nutrientName":"Iron, Fe","nutrientNumber":"303","unitName":"MG","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":5400,"indentLevel":1,"foodNutrientId":21554780,"percentDailyValue":0},{"nutrientId":1093,"nutrientName":"Sodium, Na","nutrientNumber":"307","unitName":"MG","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":786,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":5800,"indentLevel":1,"foodNutrientId":21554781,"percentDailyValue":5},{"nutrientId":1104,"nutrientName":"Vitamin A, IU","nutrientNumber":"318","unitName":"IU","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":7500,"indentLevel":1,"foodNutrientId":21554782,"percentDailyValue":0},{"nutrientId":1162,"nutrientName":"Vitamin C, total ascorbic acid","nutrientNumber":"401","unitName":"MG","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":6300,"indentLevel":1,"foodNutrientId":21554783,"percentDailyValue":0},{"nutrientId":1253,"nutrientName":"Cholesterol","nutrientNumber":"601","unitName":"MG","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":71,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":15700,"indentLevel":1,"foodNutrientId":21554784,"percentDailyValue":3},{"nutrientId":1258,"nutrientName":"Fatty acids, total saturated","nutrientNumber":"606","unitName":"G","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":17.9,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":9700,"indentLevel":1,"foodNutrientId":21554785,"percentDailyValue":12}],"finalFoodInputFoods":[],"foodMeasures":[],"foodAttributes":[{"value":"10","name":"Added Brand/Sub Brand Information","id":1892685}],"foodAttributeTypes":[{"name":"Update Log","description":"Changes that were made to this food","id":998,"foodAttributes":[{"value":"10","name":"Added Brand/Sub Brand Information","id":1892685}]}],"foodVersionIds":[]},{"fdcId":2128991,"description":"BACON","dataType":"Branded","gtinUpc":"087848305672","publishedDate":"2021-10-28","brandOwner":"Food City","brandName":"LAY MEATS","ingredients":"CURED WITH WATER, SALT, SUGAR, SODIUM PHOSPHATE, SODIUM ERYTHORBATE, SODIUM NITRITE.","marketCountry":"United States","foodCategory":"Bacon, Sausages & Ribs","modifiedDate":"2020-02-26","dataSource":"LI","servingSizeUnit":"g","servingSize":15,"householdServingFullText":"2 PAN FRIED SLICES","tradeChannels":["NO_TRADE_CHANNEL"],"allHighlightFields":"","score":1023.10516,"microbes":[],"foodNutrients":[{"nutrientId":1003,"nutrientName":"Protein","nutrientNumber":"203","unitName":"G","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":33.3,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":600,"indentLevel":1,"foodNutrientId":24577978,"percentDailyValue":10},{"nutrientId":1004,"nutrientName":"Total lipid (fat)","nutrientNumber":"204","unitName":"G","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":46.7,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":800,"indentLevel":1,"foodNutrientId":24577979,"percentDailyValue":11},{"nutrientId":1005,"nutrientName":"Carbohydrate, by difference","nutrientNumber":"205","unitName":"G","derivationCode":"LCCD","derivationDescription":"Calculated from a daily value percentage per serving size measure","derivationId":75,"value":0,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":1110,"indentLevel":2,"foodNutrientId":24577980,"percentDailyValue":0},{"nutrientId":1008,"nutrientName":"Energy","nutrientNumber":"208","unitName":"KCAL","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":600,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":300,"indentLevel":1,"foodNutrientId":24577981},{"nutrientId":1093,"nutrientName":"Sodium, Na","nutrientNumber":"307","unitName":"MG","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":1800,"foodNutrientSourceId":9,"foodNutrientSourceCode":"12","foodNutrientSourceDescription":"Manufacturer's analytical; partial documentation","rank":5800,"indentLevel":1,"foodNutrientId":24577982,"percentDailyValue":11},{"nutrientId":1253,"nutrientName":"Cholesterol","nutrientNumber":"601","unitName":"MG","derivationCode":"LCCS","derivationDescription":"Calculated from value per serving size measure","derivationId":70,"value":100,"foodNutrientSourceId":9,"foodNutrientSourceCo...
                                                                                                                                                                                                                    
                                                                                                    

Search Food By Keyword - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/1218/food+nutrition+information+api/1058/search+food+by+keyword?query=milk&pageSize=5&pageNumber=1' --header 'Authorization: Bearer YOUR_API_KEY' 


    

Retrieves a single food item by an FDC ID.

FC ID retrieved on the "Search food by keyword" endpoint. 


                                                                            
GET https://zylalabs.com/api/1218/food+nutrition+information+api/1059/search+food+by+id
                                                                            
                                                                        

Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"timestamp":"2024-11-19T14:34:55.364+0000","status":400,"error":"Bad Request","message":"Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long'; nested exception is java.lang.NumberFormatException: For input string: \"fish\"","path":"/portal-data/api/v1/food/fish/"}
                                                                                                                                                                                                                    
                                                                                                    

Search Food By ID - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/1218/food+nutrition+information+api/1059/search+food+by+id&fcid=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 Nutrition Information 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
  • Specialized Customer Support
  • Real-Time API Monitoring

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]

 Service Level
92%
 Response Time
1,073ms

Category:


Related APIs