# Food Barcode Facts – Nutrition Calculator

> Food Barcode Facts – Nutrition Calculator is a paid API for AI agents from food-barcode.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

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.

## Facts

- Endpoint: GET https://food-barcode.x402tookit.com/nutrition-calc?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/food-barcode-facts-nutrition-calculator-15da71a0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wgfSvUFwV4KcG4TQgs8sl

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability food-barcode-facts-nutrition-calculator-15da71a0
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Scale label nutrition from per 100 g to a serving, with FDA percent daily values and a check that the calories match the macros.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
       ],
       "prop
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/food-barcode-facts-nutrition-calculator-15da71a0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from food-barcode.x402tookit.com](https://www.zero.xyz/host/food-barcode.x402tookit.com/llms.txt)
