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.
Pass the food keyword that you want to retrieve, and receive relevant nutritional information.
Meal planning and recipe creation - users can access nutrition information for specific ingredients and foods to create balanced meals and healthy recipes.
Food tracking and diet management - individuals can track their daily calorie intake and nutrient consumption using the API to meet their dietary goals.
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.
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.
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.
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.
Besides API call limitations per month, there is a limitation of 100 requests per day on paid plans.
Search for foods using keywords.
Search Food By Keyword - Endpoint Features
Object | Description |
---|---|
query |
[Required] |
pageSize |
[Optional] |
pageNumber |
[Optional] |
brandOwner |
[Optional] |
{"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...
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.
{"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/"}
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'
Header | Description |
---|---|
Authorization
|
[Required] Should be Bearer access_key . See "Your API Access Key" above when you are subscribed. |
No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.
The "Search Food By Keyword" endpoint returns a list of food items matching the search term, including details like calorie count, protein, fat, and carbohydrate content. The "Search Food By ID" endpoint retrieves detailed nutritional information for a specific food item identified by its FDC ID.
Key fields in the response include "description" (food name), "brandName" (manufacturer), "foodCategory" (type of food), "servingSize" (amount per serving), and "foodNutrients" (nutritional breakdown such as calories, protein, fat, and carbohydrates).
The response data is structured in JSON format. It includes metadata like "totalHits" and "currentPage," followed by an array of food items, each containing detailed attributes such as "fdcId," "description," and "foodNutrients," which lists specific nutrient values.
The "Search Food By Keyword" endpoint provides general nutritional information for multiple food items, while the "Search Food By ID" endpoint offers detailed nutritional data for a single food item, including ingredients, serving sizes, and nutrient breakdown.
The "Search Food By Keyword" endpoint accepts parameters like "query" (food keyword), "pageNumber" (for pagination), and "numberOfResultsPerPage" (to limit results). The "Search Food By ID" endpoint requires the "fdcId" of the food item.
Data accuracy is maintained through regular updates and sourcing from reliable databases. The API ensures that nutritional information is current and reflects the latest food industry standards and practices.
Typical use cases include meal planning, diet tracking, restaurant menu analysis, and product development. Users can leverage the API to create personalized nutrition plans or analyze the nutritional content of various foods.
Users can utilize the returned data by integrating it into applications for tracking dietary intake, generating meal plans, or providing nutritional information in food-related services. The structured format allows for easy parsing and display in user interfaces.
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, refer to the βX-Zyla-API-Calls-Monthly-Remainingβ field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.
To see the maximum number of API requests your plan allows, check the βX-Zyla-RateLimit-Limitβ response header. For instance, if your plan includes 1,000 requests per month, this header will display 1,000.
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 3,600, it means 3,600 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 give you the opportunity to experience our APIs without any commitment, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost. This trial can be used only once, so we recommend applying it to the API that interests you the most. While most of our APIs offer a free trial, some may not. The trial concludes after 7 days or once you've made 50 requests, whichever occurs first. If you reach the 50 request limit during the trial, you will need to "Start Your Paid Plan" to continue making requests. You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab. Alternatively, if you don't cancel your subscription before the 7th day, your free trial will end, and your plan will automatically be billed, granting you access to all the API calls specified in your plan. Please keep this in mind to avoid unwanted charges.
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 free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.
Payout Orders are processed between the 20th and the 30th of each month. If you submit your request before the 20th, your payment will be processed within this timeframe.
Service Level:
100%
Response Time:
709ms
Service Level:
100%
Response Time:
1,334ms
Service Level:
100%
Response Time:
624ms
Service Level:
100%
Response Time:
1,146ms
Service Level:
100%
Response Time:
564ms
Service Level:
100%
Response Time:
2,782ms
Service Level:
100%
Response Time:
2,693ms
Service Level:
100%
Response Time:
599ms
Service Level:
100%
Response Time:
2,358ms
Service Level:
100%
Response Time:
153ms