Barcode Lookup
Look up a UPC/EAN barcode and return the best-known normalized product result — including serving size, macros, ingredients (when available), plus match metadata.
Barcode lookup returns results only when NutritionSignals already knows the product (from previous usage or imported data).
If a barcode is unknown, the API returns 404.
Endpoint
GET /v1/barcode/{barcode}
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.
Path parameters
barcode(string) — UPC/EAN numeric barcode (digits only; separators are ignored)
Tip: You can pass barcodes with spaces/dashes — the API will strip non-digits.
Try it
Paste your API key, enter a barcode, click Run, and you’ll see the raw JSON response.
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.
- Unknown barcodes return
404. - If you need a fallback, use Food Resolution.
{}Examples
Use any standard HTTP client. Here are copy/paste examples:
curl "https://api.nutritionsignals.com/v1/barcode/0123456789012" \
-H "Authorization: Bearer $NUTRITIONSIGNALS_API_KEY"
Response
Example response (fields may vary based on availability):
Example response
{
"barcode": "0123456789012",
"id": "food_doc_id_abc123",
"title": "Greek Yogurt",
"brand": "Chobani",
"ingredients_text": "cultured nonfat milk, strawberries, cane sugar",
"calories_kcal_total": 110,
"protein_g": 11,
"carbs_g": 15,
"fat_g": 0,
"match": {
"confidence": 0.8,
"source": "barcode_lookup",
"normalized_from": "0123456789012",
"country": null
},
"image_url": "https://api.nutritionsignals.com/v1/images/scans/....png"
}
Behavior and expectations
Barcode lookup returns the best-known record NutritionSignals has stored for the barcode.
- 200 means a product record was found.
- 404 means the barcode is unknown.
Recommended handling for unknown barcodes:
- Let the user enter the product name manually and call Food Resolution.
- If you have a label photo, use Food Image Analysis.
Errors
401— Missing/invalid API key404— Barcode not found422— Invalid barcode429— Rate limited5xx— Server error
API endpoints
- Name
GET /v1/barcode/:barcode- Description
Look up a barcode and return the best-known normalized product result.
- Name
POST /v1/foods/resolve- Description
Resolve unstructured food text into a canonical food object with serving size, macros, ingredients (when available), plus match confidence metadata.
- Name
POST /v1/foods/analyze-image- Description
Upload a food image and receive a nutrition estimate plus confidence. (If enabled)
- Name
GET /v1/scans/:scan_id- Description
Retrieve scan/audit details for debugging and support.
What’s next?
POST /v1/normalize— canonicalize nutrition inputs (coming soon)POST /v1/parse/nutrition-label— label OCR → structured macros (coming soon)POST /v1/analyze/food-image— image → nutrition result (coming soon)