Skip to main content
All providers

USDA FoodData Central

HealthUS

api.nal.usda.gov

Nutrient composition for hundreds of thousands of foods, from the US Department of Agriculture.

Capabilities (6)

GET /v1/data/usda-food/barcode1 credit

Looks up the packaged product behind a retail barcode and returns its single Branded match with FDC ID, brand owner, ingredient list, serving size and label nutrients.

gtinUpc
GET /v1/data/usda-food/food1 credit

Returns one FoodData Central record: description, data type, publication date, and the nutrient table with amounts, units and derivation, plus ingredients, serving size, label nutrients and portions for branded and Foundation foods.

fdcIdformat?nutrients?
GET /v1/data/usda-food/foods1 credit

Returns an array of food records for many FDC IDs in one call, each with its description, data type and nutrient table at the requested detail level.

fdcIdsformat?nutrients?
GET /v1/data/usda-food/list1 credit

Returns a page of abridged food records straight out of a FoodData Central dataset with no search term: FDC ID, description, data type, publication date (null on some older records) and summary nutrients.

dataType?pageSize?pageNumber?sortBy?sortOrder?
GET /v1/data/usda-food/search1 credit

Full-text search over FoodData Central, returning each match's FDC ID, description, data type, brand owner, GTIN/UPC and a summary nutrient list, plus totalHits and totalPages for paging.

querydataType?pageSize?pageNumber?sortBy?sortOrder?brandOwner?requireAllWords?
GET /v1/data/usda-food/spec1 credit

Returns FoodData Central's own OpenAPI 3.0 document: every path, every accepted parameter and the full response schemas for AbridgedFoodItem, BrandedFoodItem, FoundationFoodItem, SRLegacyFoodItem and SurveyFoodItem.

No parameters

Response example

The shape of data from usda-food/barcode (Food by barcode (GTIN/UPC)). A sample, not live data.

Example truncated, full shape in JSON from the API.

JSON
{
  "totalHits": 1,
  "currentPage": 1,
  "totalPages": 1,
  "pageList": [
    1
  ],
  "foodSearchCriteria": {
    "dataType": [
      "Branded"
    ],
    "query": "gtinUpc:094395000172",
    "generalSearchInput": "gtinUpc:094395000172",
    "pageNumber": 1,
    "numberOfResultsPerPage": 50,
    "pageSize": 50,
    "requireAllWords": false,
    "foodTypes": [
      "Branded"
    ]
  },
  "foods": [
    {
      "fdcId": 2057648,
      "description": "CHEDDAR CHEESE",
      "dataType": "Branded",
      "gtinUpc": "094395000172",
      "publishedDate": "2021-10-28",
      "brandOwner": "Grafton Village Cheese Co, LLC",
      "brandName": "GRAFTON VILLAGE",
      "ingredients": "UNPASTEURIZED MILK, SALT, TRUFFLES (TRUFFLE, WATER, SALT, AROMAS), TRUFFLE OIL (OLIVE OIL, TRUFFLE FLAVOR), CULTURES, ENZYMES.",
      "marketCountry": "United States",
      "foodCategory": "Cheese",
      "modifiedDate": "2017-08-10",
      "dataSource": "LI",
      "packageWeight": "8 oz/227 g",
      "servingSizeUnit": "g",
      "servingSize": 28,
      "householdServingFullText": "1 ONZ",
      "tradeChannels": [
        "NO_TRADE_CHANNEL"
      ],
      "allHighlightFields": "<b>GTIN/UPC</b>: <em>094395000172</em>",
      "score": 382.2293,
      "microbes": [],
      "foodNutrients": [
        {
          "nutrientId": 1003,
          "nutrientName": "Protein",
          "nutrientNumber": "203",
          "unitName": "G",
          "derivationCode": "LCCS",
          "derivationDescription": "Calculated from value per serving size measure",
          "derivationId": 70,
          "value": 21.4,
          "foodNutrientSourceId": 9,
          "foodNutrientSourceCode": "12",
          "foodNutrientSourceDescription": "Manufacturer's analytical; partial documentation",
          "rank": 600,
          "indentLevel": 1,
          "foodNutrientId": 25591523
        },
        {
          "nutrientId": 1004,
          "nutrientName": "Total lipid (fat)",
          "nutrientNumber": "204",
          "unitName": "G",
          "derivationCode": "LCCS",
          "derivationDescription": "Calculated from value per serving size measure",
          "derivationId": 70,
          "value": 28.6,
          "foodNutrientSourceId": 9,
          "foodNutrientSourceCode": "12",
          "foodNutrientSourceDescription": "Manufacturer's analytical; partial documentation",
          "rank": 800,
          "indentLevel": 1,
          "foodNutrientId": 25591524,
          "percentDailyValue": 12
        },
        {
          "nutrientId": 1005,
          "nutrientName": "Carbohydrate, by difference",
          "nutrientNumber": "205",
          "unitName": "G",
          "derivationCode": "LCCS",
          "derivationDescription": "Calculated from value per serving size measure",
          "derivationId": 70,
          "value": 3.57,
          "foodNutrientSourceId": 9,
          "foodNutrientSourceCode": "12",
          "foodNutrientSourceDescription": "Manufacturer's analytical; partial documentation",
          "rank": 1110,
          "indentLevel": 2,
          "foodNutrientId": 25591525,
          "percentDailyValue": 0
        },
        {
          "nutrientId": 1008,
          "nutrientName": "Energy",
          "nutrientNumber": "208",
          "unitName": "KCAL",
          "derivationCode": "LCCS",
          "derivationDescription": "Calculated from value per serving size measure",
          "derivationId": 70,
          "value": 393,
          "foodNutrientSourceId": 9,
          "foodNutrientSourceCode": "12",
          "foodNutrientSourceDescription": "Manufacturer's analytical; partial documentation",
          "rank": 300,
          "indentLevel": 1,
          "foodNutrientId": 25591526
        },
        {
          "nutrientId": 2000,
          "nutrientName": "Total Sugars",
          "nutrientNumber": "269",
          "unitName": "G",
          "derivationCode": "LCCS",
          "derivationDescription": "Calculated from value per serving size measu

Ask with this source

A prompt for your agent that names this source and how to call it through the crw MCP.

  • Food by barcode (GTIN/UPC)

    Use USDA FoodData Central (usda-food) from fastCRW Pergamon, capability "Food by barcode (GTIN/UPC)" (barcode). You scanned or were given a product barcode and want the nutrition facts for that exact package. Example options: gtinUpc=094395000172. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "usda-food" and capability "barcode". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Food detail by FDC ID

    Use USDA FoodData Central (usda-food) from fastCRW Pergamon, capability "Food detail by FDC ID" (food). You already hold an FDC ID and want that one food's full nutrient profile. Example options: fdcId=1750340, format=abridged, nutrients=203,204,205. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "usda-food" and capability "food". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Foods by ID batch

    Use USDA FoodData Central (usda-food) from fastCRW Pergamon, capability "Foods by ID batch" (foods). You are holding a list of FDC IDs from an earlier search and want them all without one request per food. Example options: fdcIds=1750340,747447, format=abridged, nutrients=203,204,205. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "usda-food" and capability "foods". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Browse the food catalogue

    Use USDA FoodData Central (usda-food) from fastCRW Pergamon, capability "Browse the food catalogue" (list). You want to enumerate or sample a whole FDC dataset rather than look up one named food. Example options: dataType=Foundation, pageSize=5, pageNumber=1. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "usda-food" and capability "list". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

Licence

Work of the United States federal government, not subject to copyright in the US (17 U.S.C. 105). Free to use, including commercially, with the agency named as the source.

https://fdc.nal.usda.gov/api-guide.html

Attribution

Display this wherever you show the data. It arrives on every response as provenance.attribution_text.

Source: USDA FoodData Central

Cache: up to 86400s