Food Nutrition Information API logo
FoodMAINTAINED5 tokens / call

Food Nutrition Information API

Nutrition facts by food name: calories, macronutrients and key micronutrients per serving

Search foods by name and get nutrition facts per serving: calories, macronutrients and key micronutrients, for fresh produce and packaged products. Built for diet, meal-planning and health apps.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 5 tokens per call, so the free plan covers about 100 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "fdcId": 1497465,
  "description": "CHEESE",
  "dataType": "Branded",
  "publicationDate": "3/19/2021",
  "brandName": "BELGIOIOSO",
  "brandOwner": "Belgioioso Cheese Inc.",
  "brandedFoodCategory": "Cheese",
  "ingredients": "CRAFTED FROM CULTURED MILK, ENZYMES, SALT.",
  "servingSize": 28,
  "servingSizeUnit": "g",
  "foodNutrients": [
    {
      "type": "FoodNutrient",
      "id": 17924051,
      "amount": 357,
      "nutrient": {
        "id": 1008,
        "number": "208",
        "name": "Energy",
        "unitName": "kcal"
      },
      "foodNutrientDerivation": {
        "code": "LCCS",
        "description": "Calculated from value per serving size measure"
      }
    },
    {
      "type": "FoodNutrient",
      "id": 17924048,
      "amount": 32.14,
      "nutrient": {
        "id": 1003,
        "number": "203",
        "name": "Protein",
        "unitName": "g"
      },
      "foodNutrientDerivation": {
        "code": "LCCS",
        "description": "Calculated from value per serving size measure"
      }
    },
    {
      "type": "FoodNutrient",
      "id": 17924054,
      "amount": 1071,
      "nutrient": {
        "id": 1087,
        "number": "301",
        "name": "Calcium, Ca",
        "unitName": "mg"
      },
      "foodNutrientDerivation": {
        "code": "LCCD",
        "description": "Calculated from a daily value percentage per serving size measure"
      }
    }
  ],
  "labelNutrients": {
    "fat": {
      "value": 7
    },
    "saturatedFat": {
      "value": 4
    },
    "transFat": {
      "value": 0
    },
    "cholesterol": {
      "value": 24.9
    },
    "sodium": {
      "value": 330
    },
    "carbohydrates": {
      "value": 0
    },
    "protein": {
      "value": 9
    },
    "calcium": {
      "value": 300
    },
    "calories": {
      "value": 100
    }
  }
}

Also available on

Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for Food Nutrition Information API

  • Let users log meals by searching a food and reading its calories and macros.

  • Build meal plans that total protein, carbohydrates and fat across a day.

  • Show nutrition facts next to recipes and menu items.

  • Compare foods on a nutrient such as fibre or sodium.

Food Nutrition Information API endpoints

Every endpoint with its parameters and a real example response.

GETGet Food

https://food-nutrition-information.dataandapis.com/v1/food/{id}

Path parameters

ParameterExample
id1750340Required

Example request

curl
curl "https://food-nutrition-information.dataandapis.com/v1/food/1750340" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript / TypeScript (dataandapis package)
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.foodNutritionInformation.getFood({ id: 1750340 });
Example response
{
  "fdcId": 1750340,
  "description": "Cheese, cheddar",
  "dataType": "Foundation",
  "publicationDate": "4/1/2019",
  "foodCategory": {
    "description": "Dairy and Egg Products"
  },
  "foodNutrients": [
    {
      "nutrient": {
        "id": 1008,
        "name": "Energy",
        "unitName": "kcal"
      },
      "amount": 403
    },
    {
      "nutrient": {
        "id": 1003,
        "name": "Protein",
        "unitName": "g"
      },
      "amount": 22.9
    },
    {
      "nutrient": {
        "id": 1004,
…
Show full response
{
  "fdcId": 1750340,
  "description": "Cheese, cheddar",
  "dataType": "Foundation",
  "publicationDate": "4/1/2019",
  "foodCategory": {
    "description": "Dairy and Egg Products"
  },
  "foodNutrients": [
    {
      "nutrient": {
        "id": 1008,
        "name": "Energy",
        "unitName": "kcal"
      },
      "amount": 403
    },
    {
      "nutrient": {
        "id": 1003,
        "name": "Protein",
        "unitName": "g"
      },
      "amount": 22.9
    },
    {
      "nutrient": {
        "id": 1004,
        "name": "Total lipid (fat)",
        "unitName": "g"
      },
      "amount": 33.3
    },
    {
      "nutrient": {
        "id": 1005,
        "name": "Carbohydrate, by difference",
        "unitName": "g"
      },
      "amount": 3.09
    },
    {
      "nutrient": {
        "id": 1087,
        "name": "Calcium, Ca",
        "unitName": "mg"
      },
      "amount": 710
    }
  ]
}

GETSearch Foods

https://food-nutrition-information.dataandapis.com/v1/foods/search

Query parameters

ParameterExample
brandOwnerKraft HeinzOptional
pageNumber1Optional
pageSize10Optional
querycheddar cheeseRequired

Example request

curl
curl "https://food-nutrition-information.dataandapis.com/v1/foods/search?brandOwner=Kraft%20Heinz&pageNumber=1&pageSize=10&query=cheddar%20cheese" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript / TypeScript (dataandapis package)
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.foodNutritionInformation.searchFoods({
  brandOwner: "Kraft Heinz",
  pageNumber: 1,
  pageSize: 10,
  query: "cheddar cheese",
});
Example response
{
  "totalHits": 1240,
  "currentPage": 1,
  "totalPages": 124,
  "pageSize": 10,
  "foods": [
    {
      "fdcId": 1750340,
      "description": "Cheese, cheddar",
      "dataType": "Foundation",
      "brandOwner": "",
      "publishedDate": "2019-04-01",
      "foodNutrients": [
        {
          "nutrientId": 1008,
          "nutrientName": "Energy",
          "unitName": "KCAL",
          "value": 403
        },
        {
          "nutrientId": 1003,
          "nutrientName": "Protein",
          "unitName": "G",
          "value": 22.9
        },
        {
          "nutrientId": 1004,
          "nutrientName": "Total lipid (fat)",
…
Show full response
{
  "totalHits": 1240,
  "currentPage": 1,
  "totalPages": 124,
  "pageSize": 10,
  "foods": [
    {
      "fdcId": 1750340,
      "description": "Cheese, cheddar",
      "dataType": "Foundation",
      "brandOwner": "",
      "publishedDate": "2019-04-01",
      "foodNutrients": [
        {
          "nutrientId": 1008,
          "nutrientName": "Energy",
          "unitName": "KCAL",
          "value": 403
        },
        {
          "nutrientId": 1003,
          "nutrientName": "Protein",
          "unitName": "G",
          "value": 22.9
        },
        {
          "nutrientId": 1004,
          "nutrientName": "Total lipid (fat)",
          "unitName": "G",
          "value": 33.3
        },
        {
          "nutrientId": 1005,
          "nutrientName": "Carbohydrate, by difference",
          "unitName": "G",
          "value": 3.09
        }
      ]
    }
  ]
}

Where the data comes from

Source
Compiled food nutrition database.
Freshness
Updated with database releases.

One install. Every endpoint.

Install the dataandapis package from npm and call this API with typed methods, or use any HTTP client in the language you prefer.

4languages
2endpoints
RESTarchitecture
1key for all APIs
  • Typed parameters and responses, with auto-completion in your editor
  • Works with import and require on Node.js 18 or later, with no dependencies
  • One key works across 125+ APIs on the platform

Read the npm package guide →

// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.foodNutritionInformation.getFood({ id: 1750340 });

Food Nutrition Information API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Path Parameters

id
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis({ apiKey: "YOUR_API_KEY" });

const data = await client.foodNutritionInformation.getFood({ id: 1750340 });

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about Food Nutrition Information API

Ship Food Nutrition Information API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.