BYTETOOLS

Open Food Facts API

Free food product API with no key: look up nutrition, ingredients, allergens, Nutri-Score and eco-score by barcode. 3M+ products. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the Open Food Facts API?

Open Food Facts is a free, open-data API covering over three million food products worldwide. Look up any product by barcode to get ingredients, nutrition facts, allergens, Nutri-Score and eco-score, with no API key.

Open Food Facts is a collaborative open-data project, effectively Wikipedia for food products. Scan a barcode, get back the full ingredient list, nutrition table per 100g, allergen warnings and computed scores — all as open data with no commercial tier.

Because the data is crowd-sourced, completeness varies by product and region. Coverage is excellent across Europe and steadily improving elsewhere, but you should always code defensively: any given field may be absent for a given product.

Quick facts

Base URL
https://world.openfoodfacts.org/api/v2
Authentication
No key for reads. Writing product data requires an account, and a descriptive User-Agent is requested.
Rate limit
100 requests per minute for product queries; 10 per minute for search.
Pricing
Free open data under the Open Database Licence.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the Open Food Facts API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Look up a product by barcode

GET https://world.openfoodfacts.org/api/v2/product/737628064502.json

curl
curl 'https://world.openfoodfacts.org/api/v2/product/737628064502.json'
JavaScript (fetch)
const res = await fetch("https://world.openfoodfacts.org/api/v2/product/737628064502.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://world.openfoodfacts.org/api/v2/product/737628064502.json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "code": "0737628064502",
  "product": {
    "_id": "0737628064502",
    "_keywords": [
      "and",
      "asia",
      "beverage",
      "cereal",
      "food",
      "gluten",
      "include",
      "kit",
      "kitchen",
      "no",
      "noodle",
      "pasta",
      "peanut",
      "plant-based",
      "potatoe",
      "product",
      "rice",
      "seasoning",
      "simply",
      "stir-fry",
      "thai",
      "thailand",
      "their",
      "vegan",
      "vegetarian"
    ],
    "added_countries_tags": [],
    "additives_n": 1,
    "additives_original_tags": [
      "en:e330"
    ],
    "additives_tags": [
      "en:e330"
    ],
    "allergens": "peanuts, sesame seeds, soybeans",
    "allergens_from_ingredients": "en:sesame-seeds, en:peanuts, en:soybeans, en:peanuts, peanut",
    "allergens_from_user": "(en) en:peanuts",
    "allergens_hierarchy": [
      "en:peanuts",
      "en:sesame-seeds",
      "en:soybeans"
    ],
    "allergens_lc": "en",
    "allergens_tags": [
      "en:peanuts",
      "en:sesame-seeds",
      "en:soybeans"
    ],
    "amino_acids_prev_tags": [],
    "amino_acids_tags": [],
    "brand_owner": "Simply Asia Foods, Inc.",
    "brand_owner_imported": "Simply Asia Foods, Inc.",
    "brands": "Simply Asia, Thai Kitchen",
    "brands_tags": [
      "Simply Asia",
      "Thai Kitchen"
    ],
    "categories": "Cereals and their products, Noodles, Rice Noodles",
    "categories_hierarchy": [
      "en:plant-based-foods-and-beverages",
      "en:plant-based-foods",
      "en:cereals-and-potatoes",
      "en:cereals-and-their-products",

Parameters

ParameterTypeRequiredDescription
<barcode>pathRequiredEAN/UPC barcode of the product. 737628064502
fieldsstringOptionalComma-separated fields to return, shrinking a very large payload. product_name,nutriments
lcstringOptionalLanguage code for localised fields. en

Response fields

statusinteger
1 when the product was found, 0 when not.
product.product_namestring
Product name.
product.ingredients_textstring
Full ingredient list as text.
product.nutrimentsobject
Nutrition values per 100g and per serving.
product.allergens_tagsarray
Detected allergens as tags.
product.nutriscore_gradestring
Nutri-Score from a to e.
product.ecoscore_gradestring
Environmental score, where computed.

What you can build with the Open Food Facts API

  • Build a barcode-scanning nutrition or diet-tracking app
  • Check products against allergen or dietary restrictions
  • Compare nutritional quality using Nutri-Score
  • Support sustainability features with eco-score data

Common errors and how to fix them

status: 0

Barcode not in the database.

Fix: Coverage is crowd-sourced and incomplete — handle misses gracefully and consider letting users contribute the product.

Missing nutriment fields

Not every product has complete data.

Fix: Never assume a field exists; check before reading, especially for allergens and scores.

Very large response

Full product records are big.

Fix: Use the `fields` parameter to request only what you render.

Open Food Facts API — frequently asked questions

Is there a free barcode API for food products?

Yes. Open Food Facts covers over three million products worldwide with no API key, returning ingredients, nutrition, allergens and Nutri-Score by barcode.

How complete is the data?

It varies. The database is crowd-sourced, so coverage is strongest in Europe and thinner elsewhere, and individual fields may be missing for any product. Always code defensively.

What is Nutri-Score?

A front-of-pack nutritional rating from A (best) to E (worst) used across much of Europe, computed from the product's nutritional composition. Open Food Facts exposes it as `nutriscore_grade`.

Can I use Open Food Facts commercially?

Yes, the data is under the Open Database Licence, which permits commercial use provided you attribute the source and share adaptations under the same licence.

Tools that pair with this API

Open Food Facts is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.