Open Food Facts Scraper — Barcode, Nutrition & Labels avatar

Open Food Facts Scraper — Barcode, Nutrition & Labels

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Open Food Facts Scraper — Barcode, Nutrition & Labels

Open Food Facts Scraper — Barcode, Nutrition & Labels

Look up food products by barcode, or pull by category or brand, with Nutri-Score, NOVA, Eco-Score, nutrition facts per 100g, ingredients, allergens, labels and image. Powered by Open Food Facts. Keyless, no anti-bot.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Haketa

Haketa

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

Open Food Facts Scraper — Barcode, Nutrition, Nutri-Score & Allergens

Apify Actor Open Food Facts Data Format Scale Pricing

Turn any food barcode, category, or brand into clean, structured nutrition intelligence. This Open Food Facts scraper looks up products by barcode (EAN/UPC) or executes deep sweeps across entire categories or brands, extracting Nutri-Score, NOVA group, Eco-Score, full nutrition facts per 100 g, serving size, ingredient lists, declared allergens, traces ("may contain"), certified labels, countries, stores, and front-of-pack images — no login, no API key, and no anti-bot roadblocks. If you need to scrape Open Food Facts at scale, this Actor delivers normalized, deduplicated tabular datasets ready for spreadsheets, databases, or AI applications.

Export every product record directly to JSON, CSV, Excel, or API.

Built for diet, fitness, and health application developers, e-commerce and grocery catalog teams, CPG and food market researchers, and AI/LLM teams who require verified, standardized food and nutrition datasets.


⚡ At a glance

FeatureSpecification
Target DatabaseOpen Food Facts (world.openfoodfacts.org) — Global Packaged Food Registry
Lookup MethodsBarcode lookup (EAN-13, EAN-8, UPC), category tag search, brand tag search
Nutritional ScoringNutri-Score (A–E), NOVA food processing classification (1–4), Eco-Score (A–E)
Nutritional ProfileEnergy (kcal), fat, saturated fat, sugars, salt, proteins, fiber (all per 100g/ml)
Allergen & Safety ScreeningDeclared allergen ingredients + "may contain" cross-contamination traces
Scale & PaginationDeep multi-page pagination (1,000+ items per category/brand, 0 = unlimited)
Speed & ConcurrencyConfigurable parallel queries (default 5, up to 20 workers)
Output FormatsJSON, CSV, XML, Excel (XLSX), HTML Table, Apify Dataset API
IntegrationsPython SDK, Node.js SDK, REST API, Webhooks, Zapier, Make

🔎 Why scrape Open Food Facts?

Open Food Facts is the world's premier open database of packaged food products — holding more than three million food items across 150+ countries. Each record contains packaging photos, ingredient declarations, nutrition facts, additive lists, and standardized health metrics like Nutri-Score and NOVA processing scores.

For grocery retailers, digital health platforms, and consumer packaged goods (CPG) brands, accessing this data at scale is indispensable:

  • E-Commerce Grocery Enrichment: Retailers often receive basic product names and barcodes from distributors without comprehensive nutrition tables or allergen warnings. Scraping Open Food Facts fills these gaps automatically.
  • Calorie Counters & Diet Trackers: Mobile health apps require instant, accurate macronutrient lookups when users scan barcodes at the grocery store.
  • Formulation & Market Benchmarking: Food scientists and CPG brand managers sweep entire categories (e.g. chocolates, plant-based-milks, energy-bars) to benchmark sugar, saturated fat, and sodium profiles against competing products.
  • Clean Label & ESG Compliance: Environmental analysts use Eco-Score ratings and organic/fair-trade labels to evaluate product sustainability across international markets.

✨ Key Features & Capabilities

  • ✅ High-Accuracy Barcode Lookup — paste any list of EAN-13, EAN-8, or UPC barcodes to instantly retrieve full product dossiers.
  • ✅ Category-Wide Sweeps — supply English category tags (e.g., breakfast-cereals, yogurts, chocolates) to extract all cataloged items.
  • ✅ Brand-Wide Catalogs — extract every product manufactured by brands like nestle, danone, coca-cola, or barilla.
  • ✅ Comprehensive Nutritional Breakdown — captures energy (kcal), total fat, saturated fat, sugars, salt, proteins, and dietary fiber standardized per 100g.
  • ✅ Multi-Tier Health & Eco Scoring — pulls official Nutri-Score grades (A to E), NOVA processing groups (1 to 4), and Eco-Score environmental impact grades.
  • ✅ Dual Allergen Screening — isolates declared allergens from cross-contamination traces (may contain) for sensitive consumer screening.
  • ✅ High-Resolution Packaging Imagery — provides canonical URLs to original packaging and front-of-pack photographs.
  • ✅ Deep Automated Pagination — requests pages in 100-item chunks without artificial ceilings (set maxItemsPerQuery: 0 for unlimited extraction).
  • ✅ Automatic Concurrency & Politeness — balances high throughput with polite request throttling and automatic proxy rotation.

🎯 Use cases

1. E-Commerce & Online Supermarket Catalog Enrichment

Online supermarkets and quick-commerce delivery apps can match distributor product lists by barcode against Open Food Facts to automatically populate nutrition tables, ingredients lists, allergen badges, and high-res packaging photos on product detail pages.

2. Diet, Diabetes & Fitness Mobile Applications

Calorie-counting and meal-logging apps require comprehensive nutrition facts. Incorporate per-100g nutritional breakdowns, serving sizes, and NOVA ultra-processed indicators into personal health dashboards.

3. Allergen Safety & Dietary Filtering Engines

Developers building dietary restriction tools (gluten-free, vegan, nut-free, lactose-free) screen both the allergens and traces fields to ensure consumers avoid harmful ingredients.

4. CPG Brand Competitive Intelligence

Brand managers track category trends: compare average sugar content across 500 breakfast cereal brands, evaluate the adoption of Nutri-Score A/B ratings, or discover emerging clean-label ingredients.


📥 Input Parameters

Mix barcodes, categories, and brands in a single run. Running with default settings executes a fast demo on a globally recognized food barcode.

FieldTypeDescriptionDefaultPrefill
barcodesArrayProduct barcodes (EAN-13/UPC), one per line (e.g., 3017620422003, 5449000000996).[]["3017620422003", "5449000000996", "7622210449283"]
categoriesArrayCategory tag slugs (e.g. chocolates, breakfast-cereals, sodas).[][]
brandsArrayBrand tag slugs (e.g. lindt, coca-cola, nestle).[][]
maxItemsPerQueryIntegerMax products per category/brand query. Set to 0 for unlimited pagination.0100
maxConcurrencyIntegerParallel query workers (keep modest for public community infrastructure).55
proxyConfigurationObjectApify Proxy configuration for high-volume sweeps.{ "useApifyProxy": true }{ "useApifyProxy": true }

Example Input Configuration

{
"barcodes": [
"3017620422003",
"5449000000996",
"7622210449283"
],
"categories": [
"breakfast-cereals",
"plant-based-milks"
],
"brands": [
"lindt"
],
"maxItemsPerQuery": 200,
"maxConcurrency": 5,
"proxyConfiguration": { "useApifyProxy": true }
}

📤 Output Dataset & Field Specification

Each output record represents one packaged food product. Nutritional quantities are normalized to standard per 100 g / 100 ml units.

Real Output Sample

{
"source": "3017620422003",
"sourceType": "barcode",
"barcode": "3017620422003",
"productName": "Nutella",
"brands": "Nutella, Ferrero",
"categories": "Snacks, Sweet snacks, Cocoa and hazelnuts spreads, Spreads",
"quantity": "400 g e",
"servingSize": "15 g",
"nutriscoreGrade": "e",
"novaGroup": "4",
"ecoscoreGrade": "d",
"energyKcal": "539",
"fat": "30.9",
"saturatedFat": "10.6",
"sugars": "56.3",
"salt": "0.107",
"proteins": "6.3",
"fiber": "0",
"ingredientsText": "sugar, palm oil, hazelnuts (13%), skimmed milk powder (8.7%), fat-reduced cocoa (7.4%), emulsifier: lecithins (soya), vanillin",
"allergens": "milk, nuts, soybeans",
"traces": "",
"labels": "Vegetarian, No gluten, Green Dot",
"countries": "Belgium, France, Germany, United Kingdom, United States",
"stores": "Carrefour, Tesco, Walmart",
"imageUrl": "https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.879.400.jpg",
"url": "https://world.openfoodfacts.org/product/3017620422003",
"scrapedAt": "2026-11-10T16:40:00.000Z"
}

Field Breakdown & Data Coverage

🏷️ Product Identification & Taxonomy
FieldTypeDescriptionCoverage
barcodeStringStandard GTIN / EAN / UPC product code.🟢 High (100%)
productNameStringPackaged product commercial title.🟢 High (97%)
brandsStringDeclared brand names, comma-separated.🟢 High (97%)
categoriesStringCategorization hierarchy and tags.🟢 High (100%)
quantityStringNet package quantity (e.g., 400 g, 1 L).🟢 High (88%)
servingSizeStringSuggested serving size stated on package.🟡 Conditional (72%)
urlStringDirect canonical URL to the product page on Open Food Facts.🟢 High (100%)
🏅 Health, Processing & Eco Ratings
FieldTypeDescriptionCoverage
nutriscoreGradeStringNutri-Score nutritional quality grade (a through e).🟢 High (92%)
novaGroupStringNOVA food processing group (1=unprocessed, 4=ultra-processed).🟢 High (85%)
ecoscoreGradeStringEco-Score environmental impact grade (a through e).🟢 High (82%)
🥗 Nutritional Profile (per 100g / 100ml)
FieldTypeDescriptionCoverage
energyKcalStringEnergy value in kilocalories per 100g.🟢 High (98%)
fatStringTotal lipid fat in grams per 100g.🟢 High (98%)
saturatedFatStringSaturated fatty acids in grams per 100g.🟢 High (97%)
sugarsStringTotal sugars in grams per 100g.🟢 High (97%)
saltStringSodium salt equivalent in grams per 100g.🟢 High (96%)
proteinsStringTotal protein content in grams per 100g.🟢 High (97%)
fiberStringDietary fiber content in grams per 100g.🟡 Conditional (65%)
⚠️ Ingredients, Safety & Distribution
FieldTypeDescriptionCoverage
ingredientsTextStringFull ingredient list as printed on packaging.🟢 High (89%)
allergensStringConfirmed allergen ingredients (e.g. milk, nuts, gluten).🟡 Conditional (65%)
tracesStringCross-contamination allergen warnings ("may contain").🟡 Conditional (40%)
labelsStringCertification labels (Organic, Vegan, Halal, Kosher, Fairtrade).🟢 High (77%)
countriesStringTarget retail distribution countries.🟢 High (94%)
storesStringRetail supermarkets where reported sold.🟡 Conditional (60%)
imageUrlStringDirect URL to front-of-package product photograph.🟢 High (99%)
scrapedAtStringISO 8601 timestamp of data extraction.🟢 High (100%)

🔁 Pagination & Unlimited Scale

The Open Food Facts Scraper is architected for both targeted precision audits and large-scale bulk ingestion:

  • 1,000+ Products per Query: By setting maxItemsPerQuery: 0, the scraper eliminates arbitrary caps, paginating across the catalog in blocks of 100 until all available items have been retrieved.
  • Multi-Query Concurrency: Process multiple categories and brand tags simultaneously. The worker pool ensures fast batch turnaround while preventing connection spikes.
  • Fast Prefill Performance: Standard prefill runs complete in under 20 seconds, allowing instant verification without burning compute budget.

💻 Integration & API Usage

Integrate food intelligence into your software pipelines via the Apify API.

Python SDK Example

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"barcodes": ["3017620422003", "5449000000996"],
"categories": ["plant-based-milks"],
"maxItemsPerQuery": 50,
}
run = client.actor("haketa/openfoodfacts-scraper").call(run_input=run_input)
for product in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{product['productName']} ({product['brands']}) - Nutri-Score: {product['nutriscoreGrade']} - Sugars: {product['sugars']}g")

Node.js SDK Example

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('haketa/openfoodfacts-scraper').call({
categories: ['chocolates'],
maxItemsPerQuery: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Scraped ${items.length} products:`, items);

cURL API Trigger

curl --request POST \
--url "https://api.apify.com/v2/acts/haketa~openfoodfacts-scraper/runs?token=YOUR_APIFY_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"barcodes": ["3017620422003"],
"maxItemsPerQuery": 50
}'

🛠️ Troubleshooting & Common Edge Cases

Issue / SymptomProbable CauseRecommended Resolution
Barcode returns 0 recordsBarcode has non-standard checksum or is not yet indexedConfirm barcode format (12 or 13 digits). If uncataloged, Open Food Facts relies on community uploads.
Incomplete nutrition numbersPackaged product has no nutrition facts table printedProducts like produce, raw spices, and alcoholic beverages often lack nutrition panels by law.
Missing nutriscoreGradeProduct category is exempt or data is insufficientNutri-Score requires energy, saturated fat, sugars, sodium, fiber, and fruit/veg % to calculate.
Multi-language ingredient listsProduct sold across European regionsThe scraper retrieves the standardized primary ingredients string, preserving localized declarations when available.
Missing package dimensions / weightPackaging values not provided by community contributorQuantitative measures depend on packaging submissions; field remains blank if omitted on carton.
Rate-limiting (HTTP 429)High concurrency on a single IP addressOpen Food Facts is a community non-profit. Maintain proxyConfiguration: { "useApifyProxy": true } to rotate requests.

🔬 Data Processing & Analysis Examples

Analyze Macro Averages by Category with Pandas

import pandas as pd
# Load scraped Open Food Facts dataset
df = pd.read_csv("openfoodfacts_products.csv")
# Convert nutritional fields to numeric
for col in ["energyKcal", "sugars", "fat", "salt", "proteins"]:
df[col] = pd.to_numeric(df[col], errors="coerce")
# Calculate average sugar and calorie content
print("Average calories:", df["energyKcal"].mean())
print("Average sugars:", df["sugars"].mean())
# Filter for low-sugar, high-protein products
healthy_picks = df[(df["sugars"] < 5.0) & (df["proteins"] > 10.0)]
print(f"Found {len(healthy_picks)} healthy product matches.")

Quick CLI Extraction with jq

# Extract barcodes, product names, and Nutri-Score grades
cat dataset.json | jq -r '.[] | "\(.barcode)\t\(.nutriscoreGrade)\t\(.productName)"'
# Filter products with gluten or nuts declared in allergens
cat dataset.json | jq -r '.[] | select(.allergens | test("gluten|nuts"; "i")) | "\(.productName): \(.allergens)"'

💡 Best Practices & Pro Tips

  • 🎯 Use Barcodes for Absolute Precision: When enriching existing e-commerce catalogs, barcode lookups provide 1:1 deterministic matches without false positives.
  • 🥗 Tag Names Follow English Slugs: Always provide category and brand slugs in lowercase hyphenated format (e.g. plant-based-milks, energy-drinks, coca-cola).
  • ⚠️ Check Both Allergens and Traces: For strict allergen safety applications, always check both the allergens and traces properties.
  • 📦 Serving Size vs Per-100g: Note that nutrition values are normalized to per 100g/ml. Multiply by servingSize if you need per-portion figures.

❓ Frequently Asked Questions

Do I need an API key or Open Food Facts account?
No. Open Food Facts is an open community database with public endpoints. The scraper operates keyless.

How many products can I extract in a single run?
There is no hard ceiling. Setting maxItemsPerQuery: 0 removes all caps, allowing you to paginate through thousands of products across any category or brand.

Are the nutrition numbers per serving or per 100g?
All nutritional metrics (energyKcal, fat, sugars, salt, proteins, etc.) are standardized per 100 g (for solid foods) or 100 ml (for liquids) to enable accurate comparison across brands.

Can I download product packaging images?
Yes. The imageUrl property provides direct links to front-of-pack photographs hosted on Open Food Facts' CDN.

What is the NOVA food processing score?
NOVA categorizes foods into 4 groups: 1 = Unprocessed or minimally processed, 2 = Processed culinary ingredients, 3 = Processed foods, 4 = Ultra-processed food and drink products.

How is the Eco-Score determined?
Eco-Score measures the environmental footprint of food products from life-cycle assessments (production, transportation, packaging, recycling) on a scale from A (very low impact) to E (very high impact).

Can I run automated catalog checks on a schedule?
Yes. Use the Apify Console Schedule tab to trigger periodic runs (e.g. daily or weekly) with your inventory barcodes or brand lists to capture newly uploaded packaging revisions and updated Nutri-Score formulas.

Does this actor support UPC-A and EAN-8 barcodes?
Yes. Both 12-digit UPC codes (common in North America) and 8-digit EAN-8 codes (common on small confections) are supported alongside standard 13-digit EAN-13 barcodes.


🔗 Complementary Data Scrapers


📋 Changelog

  • v1.2 (2026-11):
    • 🚀 Unlocked 1,000+ Deep Pagination: Enabled maxItemsPerQuery: 0 for unlimited category and brand catalog sweeps.
    • ⚡ Optimized Prefill Execution: Fast sample test run completes in <20s with verified international barcodes.
    • 🧼 Clean Output Schema Compliance: Strict string-typed output schema for seamless CSV, Excel, and API consumption.
  • v1.1 (2026-08):
    • Added Eco-Score environmental impact grades and NOVA food processing classification.
    • Enhanced allergen extraction separating declared ingredients from cross-contamination traces.
  • v1.0 (2026-05):
    • Initial release with barcode lookup, category sweeps, brand catalog extraction, and normalized per-100g nutrition.