Helenis API
Start for free
2 eggs fried in butter, a slice of toast and a glass of orange juice: 390 kcal, 17.3 g protein, 17.9 g fat, 39.8 g carbs.

Everyday life · AI-assisted

Nutrition Analysis API

Calories, macros and 24 nutrients of any meal, from words in any language or a photo. USDA data.

Base URLhttps://nutrition-analysis-calories-macros-from-text.p.rapidapi.com/v1/nutritionopenapi.json

Free plan
20 credits a day
Paid plans
from $4.99 a month
One credit
Meal: 10 credits (photo 15) for up to 5 foods, +2 per extra food. Search, food, barcode: 1.
Endpoints
6, on /v1/nutrition

Example call

curl -X POST "https://nutrition-analysis-calories-macros-from-text.p.rapidapi.com/v1/nutrition/analyze" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: nutrition-analysis-calories-macros-from-text.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "2 eggs fried in butter, a slice of toast and a glass of orange juice"
  }'
Response200 OK
{
  "language": "en",
  "items": [
    {
      "input": "2 eggs fried in butter",
      "name": "egg, fried in butter",
      "quantity": 2.0,
      "unit": "egg",
      "grams": 110.0,
      "grams_source": "portion",
      "portion": { "label": "1 egg", "grams": 55.0 },
      "match": {
        "fdc_id": 2707159,
        "description": "Egg, whole, fried with butter",
        "dataset": "fndds",
        "category": "Eggs and omelets"
      },
      "nutrients": {
        "calories_kcal": 200.0,
        "protein_g": 12.8,
        "fat_g": 16.1,
        "saturated_fat_g": 6.6,
        "carbs_g": 0.99,
        "fiber_g": 0.0,
        "sugar_g": 0.24,
        "cholesterol_mg": 438.0,
        "sodium_mg": 289.0,
        "calcium_mg": 50.6,
        "iron_mg": 1.7,
        "vitamin_d_ug": 2.6,
        "vitamin_b12_ug": 0.84,
        "...": "..."
      }
    },
    {
      "input": "a slice of toast",
      "name": "bread, toasted",
      "quantity": 1.0,
      "unit": "slice",
      "grams": 25.0,
      "grams_source": "portion",
      "portion": { "label": "1 medium or regular slice", "grams": 25.0 },
      "match": { "fdc_id": 2707599, "description": "Bread, white, toasted", "dataset": "fndds", "category": "Yeast breads" },
      "nutrients": { "calories_kcal": 73.2, "protein_g": 2.6, "fat_g": 0.98, "carbs_g": 13.5, "...": "..." }
    },
    {
      "input": "a glass of orange juice",
      "name": "orange juice",
      "quantity": 1.0,
      "unit": "glass",
      "grams": 248.0,
      "grams_source": "estimated",
      "match": { "fdc_id": 2709186, "description": "Orange juice, 100%, NFS", "dataset": "fndds", "category": "Citrus juice" },
      "nutrients": { "calories_kcal": 117.0, "protein_g": 1.9, "carbs_g": 25.3, "vitamin_c_mg": 71.2, "...": "..." }
    }
  ],
  "unmatched": [],
  "totals": {
    "calories_kcal": 390.0,
    "protein_g": 17.3,
    "fat_g": 17.9,
    "carbs_g": 39.8,
    "fiber_g": 1.4,
    "sugar_g": 22.0,
    "sodium_mg": 418.0,
    "vitamin_c_mg": 71.2,
    "...": "..."
  },
  "incomplete": [],
  "macros": { "protein_pct": 17.8, "carbs_pct": 40.9, "fat_pct": 41.4 },
  "total_grams": 383.0,
  "source": "USDA FoodData Central (public domain)",
  "note": "Estimates for information only, not medical or dietary advice. Nutrient values come from USDA FoodData Central; quantities given without a weight are estimated."
}

Analyze Meal Text: POST /v1/nutrition/analyze. A real call and its real response, with long values shortened.

What the Nutrition Analysis API returns

Food logging without a food picker. Your users write the meal the way they would say it, in their own language: "2 eggs and a slice of toast with butter", "200 g de riz et un yaourt", "zwei Brötchen mit Nutella". Or they snap a photo. The API returns each food, its grams, its calories, macros and micronutrients, and the totals of the meal. Every value comes from USDA FoodData Central, never from the AI's imagination. From $0.006 a meal and $0.0006 a lookup.

Any language, plain words
Weights (g, kg, oz, lb), volumes (ml, cups, spoons), slices, pieces, glasses, cans, "a", "two", "half"
Meal photos
Foods and portions estimated by vision, with an optional hint ("about 300 g of curry")
24 nutrients per food
Calories, protein, carbs, fat (saturated, mono, poly), fiber, sugar, cholesterol, sodium, potassium, calcium, iron, magnesium, zinc, vitamins A, C, D, B12, folate, water, alcohol, caffeine
Meal totals and calorie split
% of calories from protein, carbs, fat and alcohol
Traceable
Each food is linked to its USDA entry (FDC id), with how its grams were found: stated, USDA household portion, or estimated
Food search, no AI
13,000 USDA foods (Foundation, SR Legacy, FNDDS) with nutrients per 100 g and household portions (1 large egg, 1 slice, 1 cup)
Barcodes
Packaged foods from Open Food Facts: nutrients per 100 g and per serving, Nutri-Score, NOVA group, allergens, ingredients

Endpoints

Host nutrition-analysis-calories-macros-from-text.p.rapidapi.com, header X-RapidAPI-Key. Parameters and examples for each one are in the API reference.

Meal Analysis

A meal in words or a photo, to calories, macros and micronutrients.

Food Database

USDA foods: search, nutrients per 100 g and household portions. No AI.

Barcode

Packaged food by barcode, from Open Food Facts. No AI.

Use cases

  • Food diaries and calorie counters. Let users type or say their meal instead of searching a database food by food
  • Fitness and coaching apps. Daily protein, carbs and fat from the meals clients send in chat
  • Chatbots and voice assistants. "what did I eat today?" turned into numbers, in the user's language
  • Recipe and meal-kit sites. Nutrition of a dish from its ingredient list
  • Grocery and scan apps. Nutri-Score, allergens and nutrition from a barcode

Tutorial

Pricing

Meal: 10 credits (photo 15) for up to 5 foods, +2 per extra food. Search, food, barcode: 1. Failed calls are never billed.

Nutrition Analysis API plans on RapidAPI
PlanPriceCredits includedAbove the quota
BASIC Free 20 / day resets every day
PRO $4.99/mo 8,000 / month $0.007 per credit
ULTRA $14.99/mo 25,000 / month $0.007 per credit
MEGA $49.99/mo 80,000 / month $0.007 per credit

Subscribe on RapidAPI (opens in a new tab)

No code: the Apify actor

The Calorie & Nutrition Calculator - Meals, Photos & Barcodes actor runs the same engine on a list of inputs and exports a table (JSON, CSV, Excel, Google Sheets). It is billed per result; free-plan users get 5 meals or photos and 20 barcodes per run. Publication on Apify is in progress.

Apify pay-per-event prices
EventCharged forPrice
meal-analyzedEach meal text analysed (5 foods)$0.0055
photo-analyzedEach meal photo analysed (5 foods)$0.008
extra-foodEach food beyond 5 in a meal$0.0008
barcode-productEach barcode found$0.001

Questions about the Nutrition Analysis API

Is the AI making up the calories?
No. The AI splits the meal into foods and reads the amounts. The calories and nutrients come from USDA FoodData Central, scaled to the grams. A food that has no credible USDA match is reported in unmatched instead of being guessed.
How accurate is it?
As accurate as the portions: with weights given ("150 g of rice"), the result is USDA's value for that weight. Counts ("2 eggs") use USDA household portions. Amounts not given and photos are estimates of an ordinary portion, close to what a dietitian would assume, not a measurement.
Which languages work?
Any language the AI reads: tested in English, French, Spanish, German, Italian, Portuguese and Japanese. Food search (/foods/search) is in English, USDA's language.
Is it medical advice?
No. The numbers are for information, food logging and wellness. They are not a diagnosis, a diet prescription or advice for a medical condition.
Do you store what users eat?
Helenis does not store meal texts or photos. The AI provider processes them and keeps them temporarily for abuse monitoring.
Limits?
A meal text is 2,000 characters at most (25 foods), a photo 20 MB. USDA describes U.S. foods: regional dishes are counted through their ingredients, and branded products are better looked up by barcode.
Is there a free plan for the Nutrition Analysis API?
Yes. The BASIC plan on RapidAPI is free, with 20 credits per day to test it on your own data. Paid plans start at $4.99 per month. On Apify you pay per result, and free-plan users get 5 meals or photos and 20 barcodes per run.
How are credits counted?
Meal: 10 credits (photo 15) for up to 5 foods, +2 per extra food. Search, food, barcode: 1. Calls that fail are never billed.
Should I use RapidAPI or Apify?
Use RapidAPI to call the REST API from your own code with a monthly plan. Use Apify for no-code runs on lists of inputs, schedules, exports to Google Sheets, Zapier or Make, and AI agents through MCP.
Do you store my data?
No. Inputs and results are processed in memory and never stored or logged; logs keep only technical metadata such as status and latency.