The Food Text Analysis API is a powerful tool for extracting nutritional information from food items described in text form. By utilizing Natural Language Processing (NLP) and semantically structured data, the API can accurately identify and extract key nutritional information from unstructured text. This allows developers to analyze and understand the nutritional content of food items in a simple and intuitive way.
Whether you are creating a food-tracking app, a meal-planning platform, or a nutrition education resource, the Food Text Analysis API provides the information you need to build a useful and informative tool. With its advanced NLP algorithms and semantically structured data, the API can accurately extract nutritional information from a wide range of food-related text, including ingredient lists, recipes, restaurant menus, and more.
The API is easy to integrate into your existing workflow and requires no additional data entry or manual work on your part. Simply send the API a piece of text containing food-related information and receive a detailed report on the nutritional content of the food items described in that text. Whether you need to analyze a single piece of text or large volumes of data, the Food Text Analysis API is a fast and reliable solution for your needs
Pass the UPC code that you want to retrieve its nutritional information.
Food tracking and calorie counting app - The API can be used to retrieve nutritional information for food items, allowing users to track their daily calorie intake and make informed decisions about their eating habits.
Meal planning and recipe creation platform - The API can provide nutritional information for ingredients and finished dishes, helping users make healthier food choices and create balanced meals.
Nutrition education resource - The API can be used to create interactive nutrition education resources that provide detailed information about the nutritional content of various foods.
Fitness and wellness app - The API can be used to provide users with information on the calorie, protein, fat, and carb content of foods, allowing them to create personalized nutrition and exercise plans.
Food industry - Food manufacturers and restaurants can use the API to ensure that their products are accurately labeled and meet nutritional standards.
Healthcare and medical research - The API can be used by healthcare providers and medical researchers to gather and analyze data on the nutritional content of foods and its impact on human health.
Besides API call limitations per month, there is a limitation of 100 requests per day on paid plans.
Extracts information from a short unstructured food text – usually an ingredient line and returns: - Structured data for the text – quantity, measure and food, if available - Diet, health and allergen labels for the text - With the build in food logging feature it allows for change of context. For example “rice” will normallly be matched to raw rice while with the food logging feature on it will match to ready to eat ‘cooked rice’
Food Analysis - Endpoint Features
| Object | Description |
|---|---|
ingr |
[Required] An ingredient line with quantity and measure |
{"uri":"http://www.edamam.com/ontologies/edamam.owl#recipe_216ccf5550414754b6cd2d8d3f56cbb4","calories":122,"totalWeight":86.0,"dietLabels":["LOW_CARB","LOW_SODIUM"],"healthLabels":["SUGAR_CONSCIOUS","LOW_POTASSIUM","KIDNEY_FRIENDLY","KETO_FRIENDLY","VEGETARIAN","PESCATARIAN","PALEO","SPECIFIC_CARBS","DAIRY_FREE","GLUTEN_FREE","WHEAT_FREE","MILK_FREE","PEANUT_FREE","TREE_NUT_FREE","SOY_FREE","FISH_FREE","SHELLFISH_FREE","PORK_FREE","RED_MEAT_FREE","CRUSTACEAN_FREE","CELERY_FREE","MUSTARD_FREE","SESAME_FREE","LUPINE_FREE","MOLLUSK_FREE","ALCOHOL_FREE","NO_OIL_ADDED","NO_SUGAR_ADDED","FODMAP_FREE","KOSHER"],"cautions":[],"totalNutrients":{"ENERC_KCAL":{"label":"Energy","quantity":122.98,"unit":"kcal"},"FAT":{"label":"Total lipid (fat)","quantity":8.1786,"unit":"g"},"FASAT":{"label":"Fatty acids, total saturated","quantity":2.68836,"unit":"g"},"FATRN":{"label":"Fatty acids, total trans","quantity":0.03268,"unit":"g"},"FAMS":{"label":"Fatty acids, total monounsaturated","quantity":3.14588,"unit":"g"},"FAPU":{"label":"Fatty acids, total polyunsaturated","quantity":1.64346,"unit":"g"},"CHOCDF":{"label":"Carbohydrate, by difference","quantity":0.6192,"unit":"g"},"CHOCDF.net":{"label":"Carbohydrates (net)","quantity":0.6192,"unit":"g"},"FIBTG":{"label":"Fiber, total dietary","quantity":0.0,"unit":"g"},"SUGAR":{"label":"Sugars, total","quantity":0.3182,"unit":"g"},"PROCNT":{"label":"Protein","quantity":10.8016,"unit":"g"},"CHOLE":{"label":"Cholesterol","quantity":319.92,"unit":"mg"},"NA":{"label":"Sodium, Na","quantity":122.12,"unit":"mg"},"CA":{"label":"Calcium, Ca","quantity":48.16,"unit":"mg"},"MG":{"label":"Magnesium, Mg","quantity":10.32,"unit":"mg"},"K":{"label":"Potassium, K","quantity":118.67999999999999,"unit":"mg"},"FE":{"label":"Iron, Fe","quantity":1.505,"unit":"mg"},"ZN":{"label":"Zinc, Zn","quantity":1.1094,"unit":"mg"},"P":{"label":"Phosphorus, P","quantity":170.28,"unit":"mg"},"VITA_RAE":{"label":"Vitamin A, RAE","quantity":137.6,"unit":"µg"},"VITC":{"label":"Vitamin C, total ascorbic acid","quantity":0.0,"unit":"mg"},"THIA":{"label":"Thiamin","quantity":0.0344,"unit":"mg"},"RIBF":{"label":"Riboflavin","quantity":0.39302000000000004,"unit":"mg"},"NIA":{"label":"Niacin","quantity":0.0645,"unit":"mg"},"VITB6A":{"label":"Vitamin B-6","quantity":0.1462,"unit":"mg"},"FOLDFE":{"label":"Folate, DFE","quantity":40.42,"unit":"µg"},"FOLFD":{"label":"Folate, food","quantity":40.42,"unit":"µg"},"FOLAC":{"label":"Folic acid","quantity":0.0,"unit":"µg"},"VITB12":{"label":"Vitamin B-12","quantity":0.7654,"unit":"µg"},"VITD":{"label":"Vitamin D (D2 + D3)","quantity":1.72,"unit":"µg"},"TOCPHA":{"label":"Vitamin E (alpha-tocopherol)","quantity":0.903,"unit":"mg"},"VITK1":{"label":"Vitamin K (phylloquinone)","quantity":0.258,"unit":"µg"},"WATER":{"label":"Water","quantity":65.489,"unit":"g"}},"totalDaily":{"ENERC_KCAL":{"label":"Energy","quantity":6.149,"unit":"%"},"FAT":{"label":"Fat","quantity":12.582461538461537,"unit":"%"},"FASAT":{"label":"Saturated","quantity":13.4418,"unit":"%"},"CHOCDF":{"label":"Carbs","quantity":0.20639999999999997,"unit":"%"},"FIBTG":{"label":"Fiber","quantity":0.0,"unit":"%"},"PROCNT":{"label":"Protein","quantity":21.6032,"unit":"%"},"CHOLE":{"label":"Cholesterol","quantity":106.64,"unit":"%"},"NA":{"label":"Sodium","quantity":5.088333333333333,"unit":"%"},"CA":{"label":"Calcium","quantity":4.816,"unit":"%"},"MG":{"label":"Magnesium","quantity":2.4571428571428573,"unit":"%"},"K":{"label":"Potassium","quantity":2.5251063829787235,"unit":"%"},"FE":{"label":"Iron","quantity":8.36111111111111,"unit":"%"},"ZN":{"label":"Zinc","quantity":10.085454545454546,"unit":"%"},"P":{"label":"Phosphorus","quantity":24.325714285714287,"unit":"%"},"VITA_RAE":{"label":"Vitamin A","quantity":15.28888888888889,"unit":"%"},"VITC":{"label":"Vitamin C","quantity":0.0,"unit":"%"},"THIA":{"label":"Thiamin (B1)","quantity":2.8666666666666667,"unit":"%"},"RIBF":{"label":"Riboflavin (B2)","quantity":30.232307692307696,"unit":"%"},"NIA":{"label":"Niacin (B3)","quantity":0.403125,"unit":"%"},"VITB6A":{"label":"Vitamin B6","quantity":11.246153846153845,"unit":"%"},"FOLDFE":{"label":"Folate equivalent (total)","quantity":10.105,"unit":"%"},"VITB12":{"label":"Vitamin B12","quantity":31.891666666666666,"unit":"%"},"VITD":{"label":"Vitamin D","quantity":11.466666666666667,"unit":"%"},"TOCPHA":{"label":"Vitamin E","quantity":6.02,"unit":"%"},"VITK1":{"label":"Vitamin K","quantity":0.215,"unit":"%"}}}
curl --location --request GET 'https://zylalabs.com/api/1217/food+text+analysis+api/1057/food+analysis?ingr=2 eggs' --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 commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The Food Analysis endpoint returns structured data extracted from unstructured food text, including nutritional information such as calories, total weight, diet labels, health labels, and detailed nutrient breakdowns.
Key fields in the response include "calories," "totalWeight," "dietLabels," "healthLabels," and "totalNutrients," which provide comprehensive nutritional insights about the food item analyzed.
The response data is organized in a JSON format, with top-level keys for general information (like calories and weight) and nested objects for detailed nutrient data, making it easy to parse and utilize.
The endpoint provides information on caloric content, nutrient composition (fats, proteins, carbohydrates), dietary labels, health labels, and allergen information, allowing for a thorough nutritional analysis.
Data accuracy is maintained through the use of advanced Natural Language Processing algorithms and semantically structured data, which help ensure that the nutritional information extracted is reliable and relevant.
Typical use cases include food tracking apps, meal planning platforms, nutrition education resources, and fitness applications, where accurate nutritional information is essential for user decision-making.
Users can customize their requests by providing specific text inputs that describe food items, allowing the API to tailor the nutritional analysis based on the context of the provided text.
Standard data patterns include a clear breakdown of calories, nutrient quantities, and labels indicating dietary restrictions or health benefits, enabling users to quickly assess the nutritional profile of food items.
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
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.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
1,596ms
Service Level:
100%
Response Time:
1,164ms
Service Level:
100%
Response Time:
1,673ms
Service Level:
100%
Response Time:
742ms
Service Level:
100%
Response Time:
669ms
Service Level:
100%
Response Time:
717ms
Service Level:
100%
Response Time:
1,239ms
Service Level:
100%
Response Time:
734ms
Service Level:
100%
Response Time:
809ms
Service Level:
100%
Response Time:
841ms