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.

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

Path parameters

  • barcode (string) — UPC/EAN numeric barcode (digits only; separators are ignored)

Try it

Paste your API key, enter a barcode, click Run, and you’ll see the raw JSON response.

Try it
GET /v1/barcode/{barcode}
Tip: Get a key in Authentication.
Digits only. Spaces/dashes are OK — they’ll be ignored.
Calling:
https://api.nutritionsignals.com/v1/barcode/0123456789012
Notes
Response
{}

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:

Errors

  • 401 — Missing/invalid API key
  • 404 — Barcode not found
  • 422 — Invalid barcode
  • 429 — Rate limited
  • 5xx — 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)

Was this page helpful?