Nutrition API

Food Barcode API

The food barcode API behind food scanner and nutrition apps. UPC or EAN in, normalized nutrition data out: one GET request returns the product name, brand, image, serving size, and full macros, built on USDA FoodData Central and Open Food Facts with coverage across 180+ countries. Try the live lookup below.

Try it live

Scan with your camera or enter a barcode. This demo calls the same endpoint your app would.

Try: 5449000000996 (Coca-Cola), 7622210449283 (Oreo), 3017620422003 (Nutella)

One request, normalized response

curl "https://exercise-api.ymove.app/api/v2/foods/barcode/041631000564?country=NL" \
  -H "Authorization: Bearer YOUR_API_KEY"

{
  "data": {
    "name": "Nature Valley Granola Bar",
    "displayName": "Granola Bar (Nature Valley)",
    "brand": "General Mills",
    "barcode": "041631000564",
    "servingSize": 42,
    "servingDescription": "1 bar (42g)",
    "calories": 190,
    "protein": 4,
    "fat": 7,
    "carbs": 29,
    "fiber": 2,
    "sugar": 11,
    "sodium": 160,
    "imageUrl": "https://...",
    "source": "openfoodfacts"
  }
}

The optional country parameter (ISO code, e.g. NL, FR, DE) localizes nutrition labels and serving descriptions where localized data exists. The response shape matches the food search endpoint, so scanned and searched foods flow through the same UI code.

Built for calorie trackers and nutrition apps

Generic barcode databases return product metadata: a name, a brand, sometimes a price. A food app needs more: a serving size, normalized macros, and a response that drops into the same data model as the rest of the food database. The YMove barcode api returns exactly that, one normalized food object with nutrition per serving, sourced from USDA FoodData Central for US branded foods and Open Food Facts for international coverage across 180+ countries.

Barcode lookup is included in the standard YMove plan alongside food search, AI food logging (text and photo), the recipe api, and the exercise api: one key, $19/mo, no per-lookup fees, no attribution requirements, and you can cache responses in your own database.

Build a food scanner with the nutrition scanning API

A food scanner pairs a client-side camera scanner with a server-side nutrition scanning API. The browser reads the barcode (the demo above uses the native BarcodeDetector), then your backend calls the food barcode API with your key and resolves the product to its nutrition facts. Because the barcode endpoint is part of the broader YMove nutrition API, the same key also powers food search, natural-language food logging, and image-to-nutrition analysis, so one integration covers scan, search, and photo-based food tracking.

A USDA FoodData Central barcode and food database API

The food barcode API resolves a UPC or EAN against a food database API spanning branded packaged products and generic foods, sourced from USDA FoodData Central branded foods for US products and Open Food Facts for international coverage across 180+ countries. If a shopper types a product name instead of scanning, the food search endpoint resolves it against the same dataset; if they scan, the barcode endpoint resolves the digits directly. For developers comparing food data APIs, the draw is that coverage behind one REST contract and one key.

Food Barcode API Comparison

Normalized nutrition per serving

YMove
Barcode Lookup
Go-UPC
Edamam Food DB
Open Food FactsRaw, varies

Food-first coverage (USDA + OFF)

YMove
Barcode Lookup
Go-UPC
Edamam Food DB
Open Food Facts

Country-aware label localization

YMove
Barcode Lookup
Go-UPC
Edamam Food DB
Open Food Facts

Product images

YMove
Barcode Lookup
Go-UPC
Edamam Food DB
Open Food Facts

Cache responses freely

YMove
Barcode LookupCheck ToS
Go-UPCCheck ToS
Edamam Food DBRestricted
Open Food FactsODbL share-alike

Bundled food search + AI logging + recipes + exercises

YMove
Barcode Lookup
Go-UPC
Edamam Food DB
Open Food Facts

Self-serve signup

YMove
Barcode Lookup
Go-UPC
Edamam Food DB
Open Food Facts

Pricing model

YMove$19/mo flat bundle
Barcode LookupPaid per-lookup plans
Go-UPCPaid per-lookup plans
Edamam Food DBPer-product tiers
Open Food FactsFree, rate-limited

Barcode Lookup (barcodelookup.com) and Go-UPC are general product databases; Edamam and Open Food Facts are food databases. Comparison reflects published docs and pricing pages as of June 2026.

Frequently asked questions

Is there a barcode API for food and nutrition data?

Yes. The YMove barcode API takes a UPC or EAN and returns the product with normalized nutrition per serving: calories, protein, fat, carbs, fiber, sugar, sodium, and saturated fat, plus brand, serving description, and a product image. It is built on USDA FoodData Central branded foods and Open Food Facts, covering products from 180+ countries.

What is a food barcode API?

A food barcode API is a REST endpoint that takes a product barcode (UPC, EAN, or GTIN) and returns that product's nutrition data as JSON: name, brand, serving size, and calories, protein, fat, and carbs. The YMove food barcode API is the barcode lookup API behind this page, so the same product and nutrition data you see in the demo is available to your app through a single GET request.

Is there a food scanner or nutrition scanning API?

Yes. Pair a client-side camera scanner with the YMove barcode endpoint to build a food scanner: the browser reads the barcode, then your server calls the nutrition scanning API with your key and resolves the product to its nutrition facts. The same nutrition API also covers food search, natural-language food logging, and image-to-nutrition analysis.

Does the barcode API use USDA FoodData Central?

Yes. US branded products resolve against USDA FoodData Central (the gold-standard branded foods dataset), and international products resolve against Open Food Facts. Together they form a food database API covering packaged products from 180+ countries behind one barcode lookup endpoint.

How do I get nutrition facts from a UPC code?

Call GET /api/v2/foods/barcode/{upc} with your API key. The response is a single normalized food object, the same shape the food search endpoint returns, so a scanned product drops straight into the same UI as a searched one.

Which barcode formats are supported?

UPC-A (12 digits, US/Canada), EAN-13 (13 digits, international), and the short EAN-8 and UPC-E formats. Pass the digits as printed; leading zeros are handled.

Does it work for international products?

Yes. Open Food Facts coverage spans 180+ countries, and the optional country parameter (e.g. country=NL or country=FR) localizes nutrition labels and serving descriptions where localized data exists.

Can I cache the responses?

Yes, cache freely. There are no attribution requirements and no restrictions on storing responses in your own database, unlike several competing food data APIs.

See also: the food search demo, the meal plan generator, and the full nutrition API.

Ready to Build?

Barcode lookup, food search, AI food logging, recipes, and exercise content, one key from $19/mo.

Start Free Trial