v1

latestOpenAPI 3.0.3ODbL 1.0 (underlying Open Food Facts data)2026-08-046111.8 KB
Foods

Get a food by ID

get/food/{food_id}

Path parameters

food_idinteger required

Response

The food record

idinteger
namestring
brandstring nullable
barcodestring nullable
categorystring nullable
serving_size_gnumber nullable

Grams in one manufacturer serving, where the source declares one. Descriptive only: the nutrient fields below are not scaled to it. Null on roughly a third of records.

serving_descstring nullable

Human-readable label for one serving, e.g. '3/4 cup (170 g)'.

calories_kcalnumber nullable

Energy in kcal per 100 g

protein_gnumber nullable

Protein in grams per 100 g

fat_gnumber nullable

Total fat in grams per 100 g

carbs_gnumber nullable

Carbohydrate in grams per 100 g

fiber_gnumber nullable

Fibre in grams per 100 g

sugar_gnumber nullable

Sugars in grams per 100 g

sodium_mgnumber nullable

Sodium in mg per 100 g

saturated_fat_gnumber nullable

Saturated fat in grams per 100 g

cholesterol_mgnumber nullable

Cholesterol in mg per 100 g

potassium_mgnumber nullable

Potassium in mg per 100 g

image_urlstring nullable
image_thumb_urlstring nullable
sourcestring

Data source: off (Open Food Facts), usda (USDA FoodData Central), claude (labeled AI estimate) or community

confidencenumber

Data confidence score, 0–1

static_urlstring nullable

Path of the human-readable page on www.getdietly.com

Example response

{
  "id": 1068319,
  "name": "Greek yogurt",
  "brand": null,
  "barcode": "0855088005245",
  "category": "Dairies",
  "serving_size_g": 170,
  "serving_desc": "3/4 cup (170 g)",
  "calories_kcal": 105.9,
  "protein_g": 7.6,
  "fat_g": 3.5,
  "carbs_g": 12.4,
  "fiber_g": 0,
  "sugar_g": 10,
  "sodium_mg": 44.1,
  "saturated_fat_g": 2.4,
  "cholesterol_mg": 18,
  "potassium_mg": 112,
  "image_url": "https://api.getdietly.com/img?u=...",
  "image_thumb_url": "https://api.getdietly.com/img?u=...",
  "source": "off",
  "confidence": 0.9,
  "static_url": "food/19/greek-yogurt-2.html"
}