Search by

apiverve / nutrition

APIVerve

Nutrition returns the nutrition facts for a generic whole food by name - calories and the core macronutrients per 100 grams straight from the USDA food composition database - plus, on paid plans, a full micronutrient panel and derived nutrition intelligence like calories per gram and the protein, fa

Package info

github.com/apiverve/nutrition-api

Homepage

Documentation

Language:C#

pkg:composer/apiverve/nutrition

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2.3 2026-10-26 14:42 UTC

This package is auto-updated.

Last update: 2026-10-26 17:27:09 UTC


README

Nutrition returns the nutrition facts for a generic whole food by name - calories and the core macronutrients per 100 grams straight from the USDA food composition database - plus, on paid plans, a full micronutrient panel and derived nutrition intelligence like calories per gram and the protein, fat and carbohydrate share of calories.

The Nutrition API provides a simple, reliable way to integrate nutrition functionality into your applications. Built for developers who need production-ready nutrition capabilities without the complexity of building from scratch.

View API Details →

License: MIT API Status Method Platform

Available on: npm NuGet PyPI RubyGems Packagist Go Dart JitPack

Quick Start

Using JavaScript

async function callNutritionAPI() {
    try {
        const params = new URLSearchParams({
            food: 'banana'
        });

        const response = await fetch(`https://api.apiverve.com/v1/nutrition?${params}`, {
            method: 'GET',
            headers: {
                'x-api-key': 'YOUR_API_KEY_HERE'
            }
        });

        const data = await response.json();
        console.log(data);
    } catch (error) {
        console.error('Error:', error);
    }
}

callNutritionAPI();

Using cURL

curl -X GET "https://api.apiverve.com/v1/nutrition?food=banana" \
  -H "x-api-key: YOUR_API_KEY_HERE"

Get your API key: https://apiverve.com

📁 For more examples, see the examples folder

Installation

Choose your preferred programming language:

📦 NPM (JavaScript/Node.js)

npm install @apiverve/nutrition

View NPM Package → | Package Code →

🔷 NuGet (.NET/C#)

dotnet add package APIVerve.API.Nutrition

View NuGet Package → | Package Code →

🐍 Python (PyPI)

pip install apiverve-nutrition

View PyPI Package → | Package Code →

💎 Ruby (RubyGems)

gem install apiverve_nutrition

View RubyGems Package → | Package Code →

🐘 PHP (Packagist)

composer require apiverve/nutrition

View Packagist Package → | Package Code →

🎯 Dart (pub.dev)

dart pub add apiverve_nutrition

View pub.dev Package → | Package Code →

🤖 Android (JitPack)

implementation 'com.github.apiverve:nutrition-api:1.0.0'

Package Code →

🐹 Go

go get github.com/apiverve/nutrition-api/go

Package Code →

Why Use This API?

Feature Benefit
Multi-language SDKs Native packages for JavaScript, Python, C#, Go, and Android
Simple Integration Single API key authentication, consistent response format
Production Ready 99.9% uptime SLA, served from 24 global regions
Comprehensive Docs Full examples, OpenAPI spec, and dedicated support

Documentation

What Can You Build?

The Nutrition API is commonly used for:

  • Web Applications - Add nutrition features to your frontend or backend
  • Mobile Apps - Native SDKs for Android development
  • Automation - Integrate with n8n, Zapier, or custom workflows
  • SaaS Products - Enhance your product with nutrition capabilities
  • Data Pipelines - Process and analyze data at scale

API Reference

Authentication

All requests require an API key in the header:

x-api-key: YOUR_API_KEY_HERE

Get your API key: https://apiverve.com

Response Format

Every APIVerve endpoint returns the same envelope — check status, then read data:

{
  "status": "ok",
  "error": null,
  "data": { ... }
}

Example Response

A real response from the Nutrition API:

{
  "status": "ok",
  "error": null,
  "data": {
    "food": "Bananas, raw",
    "fdcId": 173944,
    "category": "Fruits and Fruit Juices",
    "basis": "per 100g",
    "servingSizes": [
      {
        "label": "1 NLEA serving",
        "grams": 126
      },
      {
        "label": "1 extra large (9\" or longer)",
        "grams": 152
      },
      {
        "label": "1 large (8\" to 8-7/8\" long)",
        "grams": 136
      }
    ],
    "nutrition": {
      "calories": 89,
      "protein": 1.09,
      "totalFat": 0.33,
      "carbohydrates": 22.8,
      "fiber": 2.6,
      "sugars": 12.2
    },
    "micronutrients": {
      "sodium": 1,
      "potassium": 358,
      "cholesterol": 0,
      "saturatedFat": 0.112,
      "transFat": 0,
      "monounsaturatedFat": 0.032,
      "polyunsaturatedFat": 0.073,
      "calcium": 5,
      "iron": 0.26,
      "magnesium": 27,
      "phosphorus": 22,
      "zinc": 0.15,
      "vitaminC": 8.7,
      "vitaminA": 3,
      "vitaminD": 0,
      "vitaminE": 0.1,
      "vitaminK": 0.5,
      "thiamin": 0.031,
      "riboflavin": 0.073,
      "niacin": 0.665,
      "vitaminB6": 0.367,
      "folate": 20,
      "vitaminB12": 0,
      "water": 74.9
    },
    "analytics": {
      "caloriesPerGram": 0.89,
      "proteinCaloriePercent": 4.4,
      "fatCaloriePercent": 3,
      "carbCaloriePercent": 92.6,
      "proteinPer100Calories": 1.22
    },
    "dailyValues": {
      "protein": 2.2,
      "totalFat": 0.4,
      "saturatedFat": 0.6,
      "cholesterol": 0,
      "sodium": 0,
      "carbohydrates": 8.3,
      "fiber": 9.3,
      "potassium": 7.6,
      "calcium": 0.4,
      "iron": 1.4,
      "magnesium": 6.4,
      "phosphorus": 1.8,
      "zinc": 1.4,
      "vitaminC": 9.7,
      "vitaminA": 0.3,
      "vitaminD": 0,
      "vitaminE": 0.7,
      "vitaminK": 0.4,
      "thiamin": 2.6,
      "riboflavin": 5.6,
      "niacin": 4.2,
      "vitaminB6": 21.6,
      "folate": 5,
      "vitaminB12": 0
    },
    "dietaryFlags": {
      "highProtein": false,
      "goodSourceOfProtein": false,
      "highFiber": false,
      "goodSourceOfFiber": false,
      "lowSodium": true,
      "lowFat": true,
      "lowSaturatedFat": true,
      "lowCholesterol": true,
      "lowCalorie": false
    }
  }
}

Support & Community

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Security

For security concerns, please review our Security Policy.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Built with ❤️ by APIVerve

Copyright © 2026 APIVerve. All rights reserved.