I Tested 8 Nutrition APIs With the Same Query. Only 2 Returned Correct Data.

Published: (December 16, 2025 at 06:47 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Experiment Overview

Last week I ran a simple experiment: I sent the exact same query—“100 g skinless chicken breast”—to eight different nutrition APIs and compared their responses to the USDA FoodData Central database (the gold standard for nutrition data in the US).

USDA Reference

NutrientUSDA Value
Energy165 kcal
Protein31.02 g
Total Fat3.57 g
Saturated Fat1.01 g
Cholesterol85 mg

Results

APICaloriesProteinFatAccuracy
API A16531 g3.6 g
API B23927.3 g13.6 g
API C16531 g3.6 g
API D19529.5 g7.7 g
API E17226 g6.8 g
API F14831.5 g1.2 g
API G16530.9 g3.8 g⚠️
Nutrition Tracker API16531.02 g3.57 g

Only three of the eight APIs returned accurate data, and one of those (API G) showed slight rounding discrepancies.

Why Some APIs Were Inaccurate

  1. User‑submitted data without validation – Entries like “chicken breast” with skin, bones, or cooked in oil can become the default record.
  2. Outdated USDA data – One API was still using the 2015 USDA dataset; the USDA updates its database regularly, so old values become stale.
  3. Variant mismatches – “Chicken breast” can refer to raw vs. cooked, skinless vs. skin‑on, bone‑in vs. boneless, grilled vs. fried, etc. Some APIs returned the wrong variant entirely.

Real‑world impact

  • A 50 kcal error per meal × 4 meals/day = 200 kcal/day1,400 kcal/week, roughly half a pound of weight difference.
  • Protein misreporting (e.g., 27 g vs. 31 g) can affect clinical dosing (e.g., 1.2 g protein/kg body weight).
  • Nutrition labels have legal requirements; incorrect data can lead to FDA compliance issues and liability.

Ensuring Accurate Data

Every food item in the Nutrition Tracker API maps directly to a USDA FoodData Central record, eliminating ambiguity.

{
  "data": {
    "fdcId": 331960,
    "description": "Chicken, breast, meat only, raw"
  }
}

When you search “chicken breast,” the NLP parser identifies:

  • Base food (chicken breast)
  • Cooking method (if specified)
  • Portion/quantity (100 g, 1 cup, etc.)

and returns the exact USDA match.

Fat breakdown example

{
  "Fat": {
    "value": 3.57,
    "unit": "g",
    "breakdown": {
      "saturated": { "value": 1.01, "unit": "g" },
      "monounsaturated": { "value": 1.24, "unit": "g" },
      "polyunsaturated": { "value": 0.77, "unit": "g" },
      "trans": { "value": 0.02, "unit": "g" },
      "other": { "value": 0.53, "unit": "g", "note": "Includes phospholipids and minor fatty acids" }
    }
  }
}

1.01 + 1.24 + 0.77 + 0.02 + 0.53 = 3.57 g ✓ – the math checks out.

Every response includes the USDA FDC ID, so you can verify the source yourself—no black boxes.

How to Verify Yourself

  1. Pick a food you know well.
  2. Send the same query to multiple nutrition APIs.
  3. Compare the results to USDA FoodData Central.

You’ll likely see the same patterns of discrepancy.

Test It Yourself

curl -X POST "https://nutrition-tracker-api.p.rapidapi.com/v1/calculate/natural" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "100g chicken breast"}'

Compare the response to the USDA FDC record. Every single value should match.

  • 🔬 [Verify on USDA FoodData Central]
  • 🚀 [Try the API on RapidAPI]
  • 📦 SDKs (Python, JavaScript, Java)

If you find a data discrepancy in any nutrition API, feel free to comment or open an issue. I’ll fix it or explain why the USDA value differs from expectations.

Back to Blog

Related posts

Read more »