Graph Beta Get a free key

Food and nutrition data API

Food and nutrition APIs with a source on every number

Find foods in 5 languages, scan US barcodes, analyse recipes and ingredient lines, and ground what a photo model or an assistant recognised in sourced values.

  • 15,964generic foods
  • 429,234US products by barcode
  • 5languages

Chickpea and onion stewPOST /v1/food/analyze

Per serving, 1 of 4 (149.5 g). Real answer of the API for the recipe in the photo.

Energy
156.6 kcal
Protein
5.6 g
Carbohydrate
22.6 g

Empty, never zero. Energy in kJ is not reported for “1 tbsp olive oil”, so the recipe's total is a lower bound: at least 2,092.8 kJ.

One call, a source on every value

Ingredient lines as people write them go in; each line comes back matched to a food, weighed from a source portion and totalled, with the record behind every number. This is the real answer for the stew above.

RequestPOST/v1/food/analyze
{
  "title": "Chickpea and onion stew",
  "servings": 4,
  "lines": [
    "2 cups chopped onion",
    "1 tbsp olive oil",
    "3 cloves garlic, minced",
    "1 can (400 g) chickpeas, drained",
    "1 tsp ground cumin",
    "salt to taste"
  ]
}
Response 200excerpt
{
  "data": {
    "title": "Chickpea and onion stew",
    "complete": false,
    "excluded_lines": [5],
    "totals": {
      "grams": 598.1,
      "nutrients": {
        "energy_kcal": { "value": 626.415, "unit": "kcal" },
        "energy_kj": {
          "value": null,
          "unit": "kJ",
          "lower_bound": 2092.827,
          "missing_from": [1]
        }
        … 17 more
      }
    },
    "lines": [
      {
        "line": "2 cups chopped onion",
        "food": {
          "id": "fdc:170000",
          "name": "Onions, raw"
          … 5 more
        },
        "grams": 320,
        "weight": {
          "method": "portion",
          "detail": "2 cup x 160 g per '1 cup, chopped' (source portion)"
        },
        "provenance": {
          "source": {
            "dataset": "fdc_sr_legacy",
            "record_id": "170000",
            "retrieved": "2026-10-10"
          }
          … 2 more
        }
        … 6 more
      }
      … 5 more
    ]
    … 9 more
  },
  "meta": {
    "dataset_version": "1.0.0"
    … 9 more
  }
}
Recorded answer of the real API on the current data for this sample (long arrays trimmed).
  1. 1Every value carries its source
  2. 2How the grams were found
  3. 3Empty, never zero: a lower bound, not a smaller number
  4. 4Pin and diff: the version is also in the X-Dataset-Version header

Products

One key and one plan for all of them; each is a REST API and an MCP tool.

  • Food Database API

    Live

    REST · MCP

    Find a food and get every nutrient with its source: search, autocomplete, details, portions.

    GET/v1/food/search?q=chicken+breast+roasted&lang=en&limit=31 unit

  • Barcode API

    Live

    REST · MCP

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

    GET/v1/food/barcode/0160002289861 unit

  • Nutrition Analysis API

    Live

    REST · MCP

    Turn a recipe or an ingredient list into nutrition per serving and per 100 g.

    POST/v1/food/analyze1 unit per 5 lines

  • Meal Logging API

    Beta

    REST · MCP

    Ground a photo model's or an assistant's guess in sourced values: dish and grams in, matched food and nutrients out.

    POST/v1/food/meal/match1 unit per item

  • Nutrition MCP server

    Live

    MCP server

    Every food product as tools for Claude, ChatGPT, Cursor and agent frameworks.

    POST/mcpsame units as REST

  • Food Data Licensing

    By contract

    Bulk data

    The whole dataset, versioned, for embedding, research and enterprise systems.

    GET/v1/datasets/food/snapshot

Why NutrientGraph

Every food value is copied by code from USDA FoodData Central or the ANSES-CIQUAL table, with its source record, nutrient id and retrieval date.

  • A source on every value

    Each nutrient carries the source dataset, record id, source nutrient id and retrieval date, so your app or assistant can say where a number came from.

  • Empty, never zero

    A nutrient the source does not report stays empty, and totals become a lower bound instead of a smaller number.

  • Five languages, one id

    English, French, German, Italian and Spanish names on the same food; translated names say how they were made and checked.

  • Terms that allow real use

    The terms allow caching results inside your product and calls from AI agents, and ask for no logo in your interface; each response lists the attributions its sources require.

Examples

From a photo model's guess to a sourced meal log, from a recipe to nutrition per serving, from an assistant's answer to a citation.

01

Log meals from a photo model's guess

Your vision model says "spaghetti bolognese, 350 g"; the Meal Logging API returns the sourced record, alternatives and the nutrients for that weight.

Meal Logging API
02

Analyse a recipe per serving

Paste ingredient lines as written; the Nutrition Analysis API matches each to a food, weighs it from a source portion and totals per serving and per 100 g.

Nutrition Analysis API
03

Let an assistant cite USDA

Give Claude or another agent the MCP server: answers quote the source record and the dataset version instead of a number from memory.

Nutrition MCP server

Coverage

Food dataset 1.0.0, built 2026-10-10. Sources: USDA FoodData Central (Foundation, SR Legacy, Survey/FNDDS, Branded) and ANSES-CIQUAL 2025, all cleared for commercial use. Open Food Facts is not included, because its licence is share-alike.

  • 15,964generic foods
  • 429,234US branded products by barcode
  • 36,262portion weights
  • 257,771nutrient values (generic foods)
  • 150dishes

Full coverage and sources · How we check

Food pages

Nutrition facts for 2,000 common foods

Key values per 100 g and per portion, with the source, in English, français and Deutsch. The full record of every food is in the API.

Browse by food group

Pricing

Free: 2,500 units a month for every product. Developer $19 a month, Pro $99 a month.

Plans and comparison

Food Data Licensing

The whole dataset, versioned, for embedding, research and enterprise systems. Bulk files and enterprise terms, or write to support@nutrientgraph.com.

Nutrition reference data. Not medical or dietary advice.