{"uid":"cap_wgfSvUFwV4KcG4TQgs8sl","slug":"food-barcode-facts-nutrition-calculator-15da71a0","name":"Food Barcode Facts – Nutrition Calculator","description":"Scale label nutrition from per 100 g to a serving, with FDA percent daily values and a check that the calories match the macros.","url":"https://food-barcode.x402tookit.com/nutrition-calc?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["serving_g"],"properties":{"fat":{"type":"number","description":"Fat g per 100 g"},"kcal":{"type":"number","description":"Calories per 100 g"},"carbs":{"type":"number","description":"Carbohydrates g per 100 g"},"fiber":{"type":"number","description":"Fibre g per 100 g"},"sugars":{"type":"number","description":"Sugars g per 100 g"},"protein":{"type":"number","description":"Protein g per 100 g"},"sat_fat":{"type":"number","description":"Saturated fat g per 100 g"},"serving_g":{"type":"number","description":"Serving size in grams"},"sodium_mg":{"type":"number","description":"Sodium mg per 100 g"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"perServing":{"type":["null","object"],"properties":{"fatG":{"type":["null","number"]},"kcal":{"type":["null","number"]},"carbsG":{"type":["null","number"]},"fiberG":{},"satFatG":{"type":["null","number"]},"sugarsG":{"type":["null","number"]},"proteinG":{"type":["null","number"]},"sodiumMg":{"type":["null","number"]}}},"consistency":{"type":["null","object"],"properties":{"withinTolerance":{"type":["boolean","null"]},"labelKcalPer100g":{"type":["null","number"]},"caloriesFromMacrosPer100g":{"type":["null","number"]}}},"energyShare":{"type":["null","object"],"properties":{"fatPct":{"type":["null","number"]},"carbsPct":{"type":["null","number"]},"proteinPct":{"type":["null","number"]}}},"servingGrams":{"type":["null","number"]},"percentDailyValue":{"type":["null","object"],"properties":{"fat":{"type":["null","number"]},"kcal":{"type":["null","number"]},"carbs":{"type":["null","number"]},"fiber":{},"satFat":{"type":["null","number"]},"sodium":{"type":["null","number"]},"protein":{"type":["null","number"]}}}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_G2fk6JVVtbwFuGGbcsUjs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scales label nutrition from per-100 g values to a specific serving size, computes FDA percent daily values, and validates that the declared calories are consistent with the reported macronutrients.","exampleAgentPrompt":"For a 30g serving, check if the nutrition label adds up correctly — the product lists 350 kcal, 12g fat, 4g saturated fat, 45g carbs, 8g sugars, 4g fiber, 10g protein, and 620mg sodium per 100g. Calculate the per-serving values and FDA daily values, and tell me if the calories match the macros.","exampleUseCases":[{"title":"Grocery label accuracy check","prompt":"I'm looking at a box of granola: per 100g it has 450 kcal, 18g fat, 3g saturated fat, 58g carbs, 22g sugars, 6g fiber, 9g protein, and 80mg sodium. The serving size is 45g. Can you scale all that to a single serving and tell me if the calorie count is consistent with the macros?"},{"title":"Fitness app macro tracking","prompt":"My protein bar label shows per 100g: 390 kcal, 10g fat, 4g sat fat, 40g carbs, 18g sugars, 3g fiber, 30g protein, 200mg sodium. One bar weighs 60g. What are the actual macro and calorie numbers for one bar, and do the calories check out?"},{"title":"Nutrition label FDA compliance review","prompt":"I need to review the FDA percent daily values for this product — per 100g it has 200 kcal, 7g fat, 2g saturated fat, 28g carbs, 5g sugars, 3g fiber, 5g protein, and 450mg sodium. Serving size is 85g. What are the %DV figures and is the calorie math consistent?"}],"resultDescription":"Returns per-serving nutrient amounts (kcal, fat, saturated fat, carbs, sugars, fiber, protein, sodium), FDA percent daily values for each nutrient, an energy-share breakdown by macro, a calorie consistency check comparing label kcal to kcal calculated from macros, a pass/fail verdict with tolerance indication, and a human-readable summary with reasons flagging any discrepancies.","failureModes":["Missing required serving_g parameter returns an error","Non-numeric values for nutrient fields cause validation failure","Extremely large or implausible serving sizes may yield unexpected results","If all optional nutrient fields are omitted, only partial output is returned","Network or payment (x402) failures result in no response"],"whenToPreferThis":"Choose this endpoint when you have raw per-100g nutrition label data and need to scale it to a real serving size, compute FDA %DV figures, or verify whether the declared calories are mathematically consistent with the macronutrients. It is ideal for label auditing, fitness tracking apps, nutrition dashboards, or any workflow that starts from barcode-sourced per-100g nutrition data and needs consumer-ready serving-level information.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:11:17.501Z","isFirstParty":false,"canonicalSlug":"food-barcode-facts-nutrition-calculator-15da71a0"}