Graph Beta Get a free key

Barcode API

Live

Look up a packaged food by its barcode: label nutrition, ingredients and the USDA records behind it.

US packaged foods from USDA Branded Foods, by GTIN-8, UPC-A, EAN-13 or GTIN-14. Check digits are validated and codes normalised. Batch lookups match a whole catalogue in a few calls.

At a glance

Status
Live
Endpoints
GET /v1/food/barcode/{gtin}
POST /v1/food/barcode/batch
Cost
1 unit (each endpoint)
MCP tools
food_barcode
food_barcode_batch
Data
Food dataset 1.0.0, built 2026-10-10.

Try it

Choose an endpoint and a sample, change the parameters, and send. Without a key the public demo answers the sample requests (marked demo, not counted against any quota, limited per IP address). With your key, or your account when you are signed in, any values work and the call counts against your plan. A key stays in this page's memory: it is never stored. Get a free key.

1 unit per call. Endpoint docs

path, required

Your API key (optional)

Leave empty for the demo. With a key the playground calls the real endpoint from your browser; the key is kept in memory only.

Recorded answer of the real API on the current data for this sample (long arrays trimmed).

Response

Response 200GET/v1/food/barcode/{gtin}
{
  "data": {
    "gtin14": "00016000228986",
    "product": {
      "id": "gtin:00016000228986",
      "type": "branded",
      "names": [
        {
          "lang": "en",
          "name": "Dunkaroos Cinnamon Graham Cookie Vanilla Frosting 12 Count",
          "source": "fdc_branded description (as labelled)"
        }
      ],
      "group": "sweets_desserts",
      "gtin": "00016000228986",
      "gtin_published": "00016000228986",
      "gtin_derivation": "as published",
      "brand": "GENERAL MILLS SALES INC.",
      "brand_name": "DunkAroos",
      "subbrand_name": "",
      "market": "United States",
      "category": "Biscuits/Cookies",
      "ingredients": "Vanilla Frosting with Rainbow Chips: Sugar, High Fructose Corn Syrup, Palm Oil, Corn Starch, Water, Salt, Monoglycerides, Polysorbate 60, Nonfat Dry Milk, Whey Powder, Sodium Acid Pyrophosphate, Sodiu…",
      "basis": "100 g",
      "nutrients": {
        "energy_kcal": 429,
        "energy_kj": null,
        "protein_g": 2.38,
        "fat_g": 14.29,
        "carbohydrate_g": 71.43,
        "fiber_g": 2.4,
        "sugars_g": 45.24,
        "saturated_fat_g": 7.14,
        "sodium_mg": 357,
        "water_g": null,
        "alcohol_g": null,
        "added_sugars_g": 42.9,
        "trans_fat_g": 0,
        "mufa_g": null,
        "pufa_g": null,
        "cholesterol_mg": 0,
        "potassium_mg": 0,
        "calcium_mg": 0,
        "iron_mg": 1.19
      },
      "units": {
        "energy_kcal": "kcal",
        "energy_kj": "kJ",
        "protein_g": "g",
        "fat_g": "g",
        "carbohydrate_g": "g",
        "fiber_g": "g",
        "sugars_g": "g",
        "saturated_fat_g": "g",
        "sodium_mg": "mg",
        "water_g": "g",
        "alcohol_g": "g",
        "added_sugars_g": "g",
        "trans_fat_g": "g",
        "mufa_g": "g",
        "pufa_g": "g",
        "cholesterol_mg": "mg",
        "potassium_mg": "mg",
        "calcium_mg": "mg",
        "iron_mg": "mg"
      },
      "portions": [
        {
          "description": "1 serving (1 tray with frosting) = 42 GRM",
          "grams": 42,
          "source": "fdc_branded 2739214 label serving size"
        }
      ],
      "primary_portion": {
        "description": "1 serving (1 tray with frosting) = 42 GRM",
        "grams": 42,
        "source": "fdc_branded 2739214 label serving size"
      },
      "package_weight": "18 ONZ",
      "dates": {
        "available": "2025-07-24",
        "modified": "2025-06-20",
        "publication": "2025-07-24",
        "discontinued": ""
      },
      "source": {
        "dataset": "fdc_branded",
        "record_id": "2739214",
        "url": "https://fdc.nal.usda.gov/food-details/2739214/nutrients",
        "retrieved": "2026-10-10",
        "data_source": "GDSN",
        "selection": "top_ranked",
        "n_records": 2,
        "source_records": [
          {
            "fdc_id": "2739214",
            "rank": 1,
            "role": "canonical",
            "data_source": "GDSN",
            "available_date": "2025-07-24",
            "discontinued_date": "",
            "failed_checks": []
          },
          {
            "fdc_id": "2734636",
            "rank": 2,
            "role": "superseded",
            "data_source": "GDSN",
            "available_date": "2025-06-19",
            "discontinued_date": "",
            "failed_checks": []
          }
        ]
      },
      "mapping": {
        "type": "source",
        "sources": [
          { "dataset": "fdc_branded", "id": "2739214" }
        ]
      },
      "missing": ["energy_kj", "water_g", "… 3 more"],
      "flags": [],
      "provenance": {
        "nutrients": {
          "energy_kcal": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1008",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "protein_g": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1003",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "fat_g": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1004",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "carbohydrate_g": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1005",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "fiber_g": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1079",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "sugars_g": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "2000",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "saturated_fat_g": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1258",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "sodium_mg": {
            "dataset": "fdc_branded",
            "id": "2739214",
            "source_nutrient_id": "1093",
            "retrieved": "2026-10-10",
            "method": "copied from source (per 100 g or 100 ml as the label basis)"
          },
          "…": "6 more fields"
        }
      }
    }
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "1",
    "dataset": "food",
    "dataset_version": "1.0.0",
    "dataset_built_at": "2026-10-10T17:56:11Z",
    "data_status": "released",
    "sources": [
      {
        "id": "ah102",
        "name": "USDA Agriculture Handbook No. 102, Food Yields Summarized by Different Stages of Preparation (1975)",
        "url": "https://www.ars.usda.gov/ARSUserFiles/80400525/Data/Classics/ah102.pdf",
        "licence": "U.S. Government work (USDA), public domain in the United States",
        "commercial_redistribution_ok": true,
        "retrieved": "2026-10-10",
        "version": "1975 (scanned PDF, ARS Classics)",
        "attribution": "Matthews RH, Garrison YJ. Food Yields Summarized by Different Stages of Preparation. Agriculture Handbook No. 102, USDA, 1975."
      },
      {
        "id": "ciqual",
        "name": "ANSES-CIQUAL French food composition table 2025 (English edition)",
        "url": "https://ciqual.anses.fr/cms/sites/default/files/inline-files/Table%20Ciqual%202025_ENG_2025_11_03.xlsx",
        "licence": "Licence Ouverte / Open Licence (Etalab). Reuse allowed, including commercial, on condition that the data are not altered, their meaning is not distorted, the source and version date are cited, and no …",
        "commercial_redistribution_ok": true,
        "retrieved": "2026-10-10",
        "version": "2025 (file dated 2025-11-03)",
        "attribution": "Anses. 2025. Ciqual French food composition table."
      },
      "… 8 more"
    ],
    "provenance_note": "Every value carries provenance (source, id or URL, retrieval date; method and confidence where an AI judged). Calculations list their inputs and method.",
    "disclaimer": "Nutrition reference data. Not medical or dietary advice.",
    "usage": "…"
  }
}
  1. 1Every value carries its source
  2. 2Pin and diff: the version is also in the X-Dataset-Version header

Request

curlGET/v1/food/barcode/{gtin}
curl -s "https://api.nutrientgraph.com/demo/v1/food/barcode/016000228986"

Endpoints

Endpoints of the Barcode API
EndpointWhat it doesCostMCP toolDocumentation
GET /v1/food/barcode/{gtin}Look up a packaged product by barcode1 unitfood_barcodeDocs
POST /v1/food/barcode/batchLook up many barcodes1 unit per 5 codes (minimum 1)food_barcode_batchDocs

What is included

  • GTIN-8, UPC-A, EAN-13 and GTIN-14, check digit validated
  • Label values per 100 g or 100 ml as labelled, ingredients and serving size
  • Batch of up to 100 codes per call
  • Allergen and diet tags read from the ingredient list Coming soon
  • European products Not yet (no commercial European barcode source yet)

How it differs

  • Coverage stated plainly: US packaged foods from USDA Branded Foods.
  • Each product links to the USDA records it was chosen from, with the checks they failed or passed.
  • Values per 100 ml stay per 100 ml unless a matching density reference exists.

Plans

One key and one plan cover every NutrientGraph product, this one included. Free: 2,500 units a month (2,500 calls of /v1/food/barcode/{gtin}). Developer $19 and Pro $99 a month. Caching inside your product is allowed, and so is use by AI agents. Plans and units.

Status: Live. All products.