Normalize
Canonicalize inconsistent nutrition inputs into a single canonical schema — consistent field names and units, ready to store or compare across sources.
Normalize is a deterministic, non-AI endpoint. It does not do product lookup — it only converts and standardizes nutrition inputs you already have.
Endpoint
POST /v1/normalize
Requests are made to:
Base URL
https://api.nutritionsignals.com
Authentication
All requests require an API key sent as a Bearer token in the Authorization header.
Authorization header
Authorization: Bearer YOUR_API_KEY
Don’t have a key yet? Read Authentication.
Request body
Send any reasonable nutrition payload. Normalize accepts multiple shapes and aliases.
Example request body
{
"calories": "110",
"protein": "11g",
"carbs_g": 15,
"fat": 0,
"sodium": "0.12",
"sodium_unit": "g",
"serving": "5.3 oz"
}
Supported inputs (examples)
calories/kcal/energy_kcalenergy_kj(converted to kcal)protein_g/proteincarbs_g/carbohydrates_g/carbsfat_g/fatfiber_g/fibersugar_g/sugarsodium_mg/sodium+ optionalsodium_unit(mgorg)servingas:- string like
"5.3 oz"or"100 g" - object like
{ "amount": 5.3, "unit": "oz" }
- string like
Try it
Paste your API key, edit the JSON payload, click Run, and you’ll see the canonical output.
This runs in the browser. Your key is stored only in your browser (localStorage) so you don’t need to retype it.
It’s sent only to the Base URL you enter below when you click Run.
⌘/Ctrl + Enter to run.- No OpenAI calls — this endpoint is fast and deterministic.
- Accepts many aliases like
calories/kcalor nestednutrition. - Sodium is normalized to
mg(supportssodium_unit: "g").
{}Examples
curl https://api.nutritionsignals.com/v1/normalize \
-H "Authorization: Bearer $NUTRITIONSIGNALS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"calories":"110","protein":"11g","carbs_g":15,"fat":0,"sodium":"0.12","sodium_unit":"g","serving":"5.3 oz"}'
Response
Canonical response:
Canonical response
{
"serving": { "amount": 5.3, "unit": "oz" },
"calories_kcal_total": 110,
"protein_g": 11,
"carbs_g": 15,
"fat_g": 0,
"fiber_g": 0,
"sugar_g": 0,
"sodium_mg": 120,
"warnings": []
}
Errors
401— Missing/invalid API key422— Invalid request body429— Rate limited5xx— Server error