---
title: "Look up 8–14 digit barcode; caches Open Food Facts nutrition"
method: GET
path: "/v1/foods/barcode/{code}"
tags: ["foods"]
---

# Look up 8–14 digit barcode; caches Open Food Facts nutrition

`GET /v1/foods/barcode/{code}`

## Request

- Base URL: `http://localhost:4318`
- URL: `http://localhost:4318/v1/foods/barcode/{code}`
- Auth: HTTP bearer

## Path parameters

- `code` string, required

## Response `200`

Success

- Food: Nutrition per 100 grams; serving weights come from the named source.
  - `emoji` string
  - `categories` string[]
  - `servings` object[]
    - `label` string
    - `grams` number
  - `dataset` string
  - `publishedAt` string
  - `preparation` string
  - `id` string
  - `name` string
  - `brand` string, nullable
  - `nutrients` object
    - `calories` number
    - `protein` number
    - `carbs` number
    - `fat` number
  - `source` string
  - `source_url` string, uri

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid bearer token
- `409`: Revision or idempotency conflict
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/nibb/apis/nibb-api.md) · [All operations](https://skmtc.dev/nibb/apis/nibb-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nibb/apis/nibb-api/revisions/75bcd8b761ed?raw)
