Calorie API · Nutrition API · Food database

Calorie API for 3.4M foods

Scan a barcode or type a food name and get calories, protein, carbs and fat back in milliseconds. One API key for food and 1,900+ exercises with video.

100,000 calls/mo on Growth, 500,000 on Scale · Food data from Open Food Facts (ODbL)

What is it

A food calorie database in one API call

The WorkoutX Calorie API returns nutrition facts for 3.4 million packaged foods: calories, protein, fat, saturated fat, carbohydrates, sugars, fiber and salt per 100 g, plus the same values per serving when the label states one.

Look foods up by barcode (EAN-8, UPC-A, EAN-13, GTIN-14) or search by name and brand. It is made for calorie counters, macro trackers, barcode scanners, diet coaching and AI nutrition assistants. The data comes from Open Food Facts and is refreshed every month.

3.4Mpackaged foods
8nutrients per food
<1 msbarcode lookup
98%with full macros
01 / How it works

Scan. Look up. Log it.

1

Scan or type

Your app reads the barcode, or the user types “oat milk”.

2

One API call

WorkoutX finds the food among 3.4M products in milliseconds.

3

Show the macros

Calories, protein, carbs and fat per 100 g and per serving, ready to log.

02 / Real results

What the API returns

Actual values from the Calorie API, per 100 g. Bars show the share of protein, carbs and fat.

Protein Carbs Fat

FAGE · 5201054017432

Total 5% Fat Greek Yogurt

93 kcal

Protein
9 g
Carbs
3 g
Fat
5 g

Ülker · 8690504135913

Çikolatalı Gofret

543 kcal · 195 kcal per 36 g bar

Protein
6.5 g
Carbs
58 g
Fat
31 g

Ferrero · 3017620422003

Nutella

539 kcal

Protein
6.3 g
Carbs
57.5 g
Fat
30.9 g

Mars · 5000159407236

Mars bar

450 kcal

Protein
4 g
Carbs
70 g
Fat
16.8 g

Source: Open Food Facts contributors, under the ODbL.

GET /v2/foods/barcode/5201054017432Show the JSON
{
  "barcode": "5201054017432",
  "name": "Total 5% Fat Greek Yogurt",
  "brand": "FAGE",
  "nutritionPer100g": { "calories": 93, "protein": 9, "fat": 5, "carbs": 3, ... },
  "serving": { "label": "1 serving (100 g)", "grams": 100, ... },
  "attribution": { "source": "Open Food Facts", "license": "Open Database License (ODbL) 1.0", ... }
}
Free data

Calories in the most scanned foods

Calories and macros per 100 g for some of the most scanned packaged foods in the Open Food Facts database, as the Calorie API returns them. Free to cite with a link.

Calories and macronutrients per 100 g (per 100 ml for drinks). Updated November 2026.
FoodBarcodekcalProteinCarbsFat
Nutella Ferrero801771735396.3 g57.5 g30.9 g
Prince Chocolate Whole Wheat LU76222104492834676.3 g69 g17 g
Skyr nature 0% Yoplait3329770077003579.5 g3.6 g0.5 g
Excellence 85% Cacao Dark Chocolate Lindt304692002260658412.5 g22 g46 g
Excellence 70% Cacao Dark Chocolate Lindt30469200226515669.5 g35 g41 g
Wasa Fibres crispbread Wasa730040048158833312 g47 g5 g
Cruesly mixed nuts Quaker31689300102654628.5 g57 g19 g
100% Peanut butter Menguy's332727210796961028 g13 g48 g
Coke Zero Coca-Cola54490002147990.30 g0 g0 g
Pesto alla Genovese Barilla80768095137534924.7 g11 g47 g
Nocciolata hazelnut spread Rigoni di Asiago80525750902305448.1 g54 g32 g
Walnut kernels Alesto2000573371215.5 g3.7 g69.1 g
Oat chocolate biscuits Bjorg32298207945254548.1 g61 g18 g
Krisprolls wholegrain Krisprolls731107003261140013 g68 g6.6 g
Organic sandwich bread La Boulangère37600497902142688.1 g47 g4.2 g
Roasted almond drink, no sugar Alpro5411188112709150.5 g0 g1.1 g

link Using this table? Please credit both sources:

Calorie data: <a href="https://workoutxapp.com/calorie-api.html">WorkoutX Calorie API</a>, from <a href="https://world.openfoodfacts.org">Open Food Facts</a> (ODbL)
03 / Calories in and out

Food and exercise in one API

Most fitness apps need both sides of the calorie balance. WorkoutX gives you both with one key and one bill.

restaurant

Calories in

Log meals by barcode or name: calories and macros per 100 g and per serving.

fitness_center

Calories out

Calories burned for any of 1,900+ exercises, from MET values, body weight and time.

trending_up

Progress

Show users their daily balance, with workouts from the AI Workout Generator.

Step-by-step guide with app code: How to add barcode nutrition lookup to your fitness app.

AI agents can use it too: the WorkoutX MCP server has search_foods and get_food_by_barcode. Endpoint details are in the API reference.

04 / Pricing

Included, not an add-on

The Calorie API comes with Growth and up, with its own monthly allowance. Food calls do not use your request quota, so tracking meals never eats into your exercise calls.

Scale

$79/mo

500,000 Calorie API calls a month, plus 100,000 requests, multi-week programs and priority support.

Enterprise

Custom

Custom Calorie API and request limits, an SLA and invoicing. Talk to us.

Compare all plans →

Data & license

Powered by Open Food Facts

The food data in the Calorie API comes from Open Food Facts, a free, open database of food products from around the world, built by thousands of contributors. It is available under the Open Database License (ODbL) 1.0; individual contents are under the Database Contents License.

WorkoutX filters the data (products without a name or calories, and impossible values, are left out) and serves it through the API. WorkoutX is not affiliated with Open Food Facts. Product images are not included.

Credit to show in your app

Food data from Open Food Facts (openfoodfacts.org), available under the ODbL.

  • Show it wherever your app displays the values, for example under the nutrition panel or on your about screen.
  • Every API response includes an attribution object with the same details.
  • If you publish a database built from this data, share it under the ODbL too.
05 / FAQ

Questions

What is the WorkoutX Calorie API?

A REST API that returns calories, protein, fat, saturated fat, carbohydrates, sugars, fiber and salt for 3.4 million packaged foods. You look foods up by barcode at /v2/foods/barcode/{code} or by name and brand at /v2/foods/search?q=.

Which plans include it?

Growth ($39 a month) with 100,000 Calorie API calls a month, Scale ($79 a month) with 500,000, and Enterprise with custom limits. Legacy Pro and Ultra subscribers have it too. There is no extra fee, and food calls have their own allowance: they do not count against your request quota.

What happens when I use up the Calorie API allowance?

The API answers 429 with the date the allowance starts over (the first day of the next month, UTC). Every response shows X-Food-Quota-Limit, X-Food-Quota-Remaining and X-Food-Quota-Reset, and /v2/account/usage reports it too. Your exercise requests keep working.

Where does the nutrition data come from?

From Open Food Facts, the open food products database, under the Open Database License (ODbL). We filter out products without a name or calories and entries with impossible values, and refresh the data every month.

Do I need to credit Open Food Facts?

Yes. Show a short credit such as "Food data from Open Food Facts (openfoodfacts.org), available under the ODbL" where your app displays the values. Every response includes an attribution object with the source, license and link.

Are values per 100 g or per serving?

Both. Values per 100 g (per 100 ml for drinks) are always included. When the label states a serving size, you also get its weight in grams and the same nutrients for one serving.

Does it return product images?

No. The Calorie API returns names, brands, barcodes and nutrition values only.

What happens if a barcode is not found?

The API answers 404 with a short message. Most apps then offer a name search or let the user enter the food by hand.

Can AI agents use it?

Yes. The WorkoutX MCP server has search_foods and get_food_by_barcode tools, so Claude, Cursor, ChatGPT and other MCP clients can look up calories with your API key.

Add calories to your app

Start free with the exercise API, then switch to Growth to unlock the Calorie API.

Food data from Open Food Facts, available under the Open Database License.