Data tools / FX, rates, news, weather and knowledge

Nutrition API: calories, macros, minerals and vitamins per 100 g from USDA FoodData Central SR Legacy

Use when you need nutrition facts of a food: calories, protein, fat, carbohydrate, fibre, sugars, fats, cholesterol, minerals and vitamins per 100 g for 7,793 foods of USDA FoodData Central SR Legacy (public domain), searched by name, with the FDC id and source cited. $0.02 per call (USDC or USDT). Or pay by stablecoin transfer with a one-time quote: see /pay.

Price and access

Request

curl -i 'https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/v1/nutrition?query=cheddar+cheese&pageSize=5'
ParameterRequiredWhat it is
queryyesFood name or search text, e.g. cheddar cheese
dataTypenoOnly SR Legacy is served
pageSizeno1..50

Runnable code for JavaScript, Python and LangChain: /integrations. Full schema: OpenAPI.

What the answer contains

Top-level fields of the JSON answer, read from the example below:

Source, as the answer itself states it:

Example answer

{
  "count": 1,
  "totalHits": 14,
  "items": [
    {
      "type": "food",
      "fdcId": 170899,
      "description": "Cheese, cheddar, sharp, sliced",
      "dataType": "SR Legacy",
      "foodCategory": "Dairy and Egg Products",
      "per": "100 g",
      "nutrients": {
        "Energy": {
          "value": 410,
          "unit": "KCAL",
          "nutrient_id": 1008
        },
        "Energy (kJ)": {
          "value": 1715,
          "unit": "kJ",
          "nutrient_id": 1062
        },
        "Protein": {
          "value": 24.25,
          "unit": "G",
          "nutrient_id": 1003
        },
        "Total lipid (fat)": {
          "value": 33.82,
          "unit": "G",
          "nutrient_id": 1004
        },
        "Carbohydrate, by difference": {
          "value": 2.13,
          "unit": "G",
          "nutrient_id": 1005
        },
        "Fiber, total dietary": {
          "value": 0,
          "unit": "G",
          "nutrient_id": 1079
        }
      },
      "url": "https://fdc.nal.usda.gov/food-details/170899/nutrients"
    }
  ],
  "query": {
    "query": "cheddar cheese",
    "dataType": "SR Legacy",
    "pageSize": 1
  },
  "source": "USDA FoodData Central, SR Legacy (April 2018 final release), CC0 1.0 public domain",
  "source_url": "https://fdc.nal.usda.gov/fdc-datasets/FoodData_Central_sr_legacy_food_csv_2018-04.zip",
  "licence": "CC0 1.0 Universal (public domain)",
  "citation": "U.S. Department of Agriculture, Agricultural Research Service, Beltsville Human Nutrition Research Center. FoodData Central. Available from https://fdc.nal.usda.gov/.",
  "as_of": "2026-12-01T18:00:00.000Z",
  "note": "Values per 100 g of the food as published in SR Legacy (nutrients not measured are left out). Only SR Legacy foods are served (no Branded, Foundation or FNDDS foods). Search: every query word must start a word of the description. Not dietary or medical advice."
}

Free sample, no payment: /v1/nutrition/sample. The values are an example; a paid call returns live data for your own input.

Use it from an AI assistant (MCP)

Remote MCP server for this topic: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp/fx-rates-news-weather-data, tool food_nutrition. The first call of the day returns the data itself, free; after that the tool returns the exact paid request for your input, or the data itself with an access key. The core tools are also on https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp, and any tool can be called there by name.

Related tools

Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All data tools · Trust and limits