食品营养信息API是一个全面的营养信息资源,涵盖了各种食品。无论您是想追踪您的饮食和营养,创建一款餐食规划平台,还是开发一款食品追踪应用,这个API都能提供您实现目标所需的信息。
该API允许您根据营养信息搜索和查找食品,包括卡路里数、蛋白质、脂肪和碳水化合物含量。数据经过精心选择并定期更新,确保用户能够获取到最准确和最新的信息。凭借其易于使用的界面,该API旨在让所有技能水平的开发者都能方便使用,从刚入门的开发者到经验丰富的专业人士。
除了全面的食品项数据库外,食品营养信息API还提供了每种食品项的详细营养成分信息,使用户能够轻松做出有关饮食习惯的明智决策。无论您需要追踪每日卡路里摄入量、监测营养素摄入量,还是仅仅想了解更多您所吃食品的信息,这个API都能提供您实现目标所需的信息。
传递您想要获取的食品关键词,并接收相关的营养信息。
餐食规划和食谱创作 - 用户可以访问特定成分和食品的营养信息,以创建均衡的餐食和健康食谱。
食品追踪和饮食管理 - 个人可以使用API追踪每日卡路里摄入和营养素消耗,以满足他们的饮食目标。
餐厅菜单分析 - 餐厅可以使用API分析菜单项的营养成分,并就菜单开发和标签制定做出明智决策。
健身和体重管理 - 健身和减肥应用可以利用API提供个性化的营养计划,并根据用户的卡路里和营养需求跟踪进展。
食品标签和产品开发 - 食品和饮料制造商可以访问其产品的准确营养信息,以遵守标签要求并开发更健康的选择。
医疗保健和健康 - 健康专业人士和健康中心可以使用API为患有特定健康状况的个人提供个性化的营养建议和支持。
除了每月的API调用限制,付费计划每天有100次请求的限制。
关键词搜索食品 - 端点功能
| 对象 | 描述 |
|---|---|
query |
[必需] |
pageSize |
可选 |
pageNumber |
可选 |
brandOwner |
可选 |
{"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}]}],"_note":"Response truncated for documentation purposes"}
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'
通过FDC ID检索单个食品项目
{"discontinuedDate":"","foodComponents":[],"foodAttributes":[{"id":2145062,"value":5,"name":"Nutrient Added"},{"id":2145063,"value":9,"name":"Added Package Weight"},{"id":2145064,"value":4,"name":"Nutrient Updated"}],"foodPortions":[],"fdcId":1970473,"description":"MILK","publicationDate":"7/29/2021","foodNutrients":[{"type":"FoodNutrient","nutrient":{"id":1004,"number":"204","name":"Total lipid (fat)","rank":800,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497026,"amount":3.75},{"type":"FoodNutrient","nutrient":{"id":1253,"number":"601","name":"Cholesterol","rank":15700,"unitName":"mg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497039,"amount":15},{"type":"FoodNutrient","nutrient":{"id":1089,"number":"303","name":"Iron, Fe","rank":5400,"unitName":"mg"},"foodNutrientDerivation":{"id":75,"code":"LCCD","description":"Calculated from a daily value percentage per serving size measure"},"id":22497032,"amount":0},{"type":"FoodNutrient","nutrient":{"id":1093,"number":"307","name":"Sodium, Na","rank":5800,"unitName":"mg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497035,"amount":58},{"type":"FoodNutrient","nutrient":{"id":1258,"number":"606","name":"Fatty acids, total saturated","rank":9700,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497041,"amount":2.08},{"type":"FoodNutrient","nutrient":{"id":1092,"number":"306","name":"Potassium, K","rank":5700,"unitName":"mg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497034,"amount":179},{"type":"FoodNutrient","nutrient":{"id":1235,"number":"539","name":"Sugars, added","rank":1540,"unitName":"g"},"foodNutrientDerivation":{"id":75,"code":"LCCD","description":"Calculated from a daily value percentage per serving size measure"},"id":22497038,"amount":0},{"type":"FoodNutrient","nutrient":{"id":1166,"number":"405","name":"Riboflavin","rank":6500,"unitName":"mg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497036,"amount":0.208},{"type":"FoodNutrient","nutrient":{"id":1008,"number":"208","name":"Energy","rank":300,"unitName":"kcal"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497028,"amount":71},{"type":"FoodNutrient","nutrient":{"id":1005,"number":"205","name":"Carbohydrate, by difference","rank":1110,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497027,"amount":5.42},{"type":"FoodNutrient","nutrient":{"id":2000,"number":"269","name":"Sugars, total including NLEA","rank":1510,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497029,"amount":5},{"type":"FoodNutrient","nutrient":{"id":1087,"number":"301","name":"Calcium, Ca","rank":5300,"unitName":"mg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497031,"amount":138},{"type":"FoodNutrient","nutrient":{"id":1178,"number":"418","name":"Vitamin B-12","rank":7300,"unitName":"µg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497037,"amount":0.54},{"type":"FoodNutrient","nutrient":{"id":1293,"number":"646","name":"Fatty acids, total polyunsaturated","rank":12900,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497043,"amount":0},{"type":"FoodNutrient","nutrient":{"id":1079,"number":"291","name":"Fiber, total dietary","rank":1200,"unitName":"g"},"foodNutrientDerivation":{"id":75,"code":"LCCD","description":"Calculated from a daily value percentage per serving size measure"},"id":22497030,"amount":0},{"type":"FoodNutrient","nutrient":{"id":1091,"number":"305","name":"Phosphorus, P","rank":5600,"unitName":"mg"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497033,"amount":104},{"type":"FoodNutrient","nutrient":{"id":1292,"number":"645","name":"Fatty acids, total monounsaturated","rank":11400,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497042,"amount":1.04},{"type":"FoodNutrient","nutrient":{"id":1257,"number":"605","name":"Fatty acids, total trans","rank":15400,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497040,"amount":0},{"type":"FoodNutrient","nutrient":{"id":1003,"number":"203","name":"Protein","rank":600,"unitName":"g"},"foodNutrientDerivation":{"id":70,"code":"LCCS","description":"Calculated from value per serving size measure"},"id":22497025,"amount":3.33}],"dataType":"Branded","foodClass":"Branded","modifiedDate":"8/1/2019","availableDate":"8/1/2019","brandOwner":"Target Stores","brandName":"GOOD & GATHER","subbrandName":"ORGANIC","dataSource":"LI","brandedFoodCategory":"Milk","gtinUpc":"085239043059","ingredients":"GRADE A ORGANIC MILK, VITAMIN D3**.","marketCountry":"United States","servingSize":240,"servingSizeUnit":"ml","packageWeight":"0.5 GAL/1.89 L","foodUpdateLog":[{"discontinuedDate":"","foodAttributes":[],"fdcId":1970473,"description":"MILK","publicationDate":"7/29/2021","dataType":"Branded","foodClass":"Branded","modifiedDate":"8/1/2019","availableDate":"8/1/2019","brandOwner":"Target Stores","brandName":"GOOD & GATHER","subbrandName":"ORGANIC","dataSource":"LI","brandedFoodCategory":"Milk","gtinUpc":"085239043059","ingredients":"GRADE A ORGANIC MILK, VITAMIN D3**.","marketCountry":"United States","servingSize":240,"servingSizeUnit":"ml","packageWeight":"0.5 GAL/1.89 L"},{"discontinuedDate":"","foodAttributes":[],"fdcId":1825305,"description":"MILK","publicationDate":"6/17/2021","dataType":"Branded","foodClass":"Branded","modifiedDate":"8/1/2019","availableDate":"8/1/2019","brandOwner":"Target Stores","brandName":"GOOD & GATHER","subbrandName":"ORGANIC","dataSource":"LI","brandedFoodCategory":"Milk","gtinUpc":"085239043059","ingredients":"GRADE A ORGANIC MILK, VITAMIN D3**.","marketCountry":"United States","servingSize":240,"servingSizeUnit":"ml","packageWeight":"1.89 L"}],"labelNutrients":{"fat":{"value":9},"saturatedFat":{"value":4.99},"transFat":{"value":0},"cholesterol":{"value":36},"sodium":{"value":139},"carbohydrates":{"value":13},"fiber":{"value":0},"sugars":{"value":12},"protein":{"value":7.99},"calcium":{"value":331},"iron":{"value":0},"potassium":{"value":430},"addedSugar":{"value":0},"calories":{"value":170}}}
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'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
“按关键词搜索食品”接口返回与搜索词匹配的食品项目列表,包括卡路里含量、蛋白质、脂肪和碳水化合物含量等详细信息。“按ID搜索食品”接口检索由其FDC ID识别的特定食品项目的详细营养信息
响应中的关键字段包括“描述”(食品名称) “品牌名称”(制造商) “食品类别”(食品类型) “每份量”(每份的数量)和“食品营养成分”(营养成分 breakdown,如卡路里 蛋白质 脂肪 和碳水化合物)
响应数据采用JSON格式结构化 包含像“totalHits”和“currentPage”这样的元数据 然后是一个食品项目数组 每个项目包含详细属性比如“fdcId”“description”和“foodNutrients” 列出具体的营养价值
“按关键字搜索食物”端点提供多种食物的基本营养信息,而“按ID搜索食物”端点则提供单种食物的详细营养数据,包括成分、份量和营养成分细分
“通过关键字搜索食品”接口接受参数,如“query”(食品关键字)、“pageNumber”(用于分页)和“numberOfResultsPerPage”(限制结果数量)。“通过ID搜索食品”接口需要食品项的“fdcId”
数据准确性通过定期更新和从可靠数据库获取维持。该API确保营养信息是最新的,并反映最新的食品行业标准和实践
典型的使用案例包括膳食计划 饮食跟踪 餐厅菜单分析和产品开发 用户可以利用API创建个性化营养计划或分析各种食品的营养成分
用户可以通过将返回的数据整合到应用程序中来跟踪饮食摄入、生成餐 Meal计划或在食品相关服务中提供营养信息。结构化的格式便于解析和在用户界面中显示
服务级别:
100%
响应时间:
1,596ms
服务级别:
100%
响应时间:
1,239ms
服务级别:
100%
响应时间:
742ms
服务级别:
100%
响应时间:
734ms
服务级别:
100%
响应时间:
1,673ms
服务级别:
100%
响应时间:
809ms
服务级别:
100%
响应时间:
841ms
服务级别:
100%
响应时间:
717ms
服务级别:
100%
响应时间:
1,164ms
服务级别:
100%
响应时间:
268ms