Open Food Facts Scraper — Barcode, Nutrition & Labels
Pricing
from $2.00 / 1,000 results
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Features
Share
Open Food Facts Scraper — Barcode, Nutrition, Nutri-Score & Allergens
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
| Feature | Specification |
|---|---|
| Target Database | Open Food Facts (world.openfoodfacts.org) — Global Packaged Food Registry |
| Lookup Methods | Barcode lookup (EAN-13, EAN-8, UPC), category tag search, brand tag search |
| Nutritional Scoring | Nutri-Score (A–E), NOVA food processing classification (1–4), Eco-Score (A–E) |
| Nutritional Profile | Energy (kcal), fat, saturated fat, sugars, salt, proteins, fiber (all per 100g/ml) |
| Allergen & Safety Screening | Declared allergen ingredients + "may contain" cross-contamination traces |
| Scale & Pagination | Deep multi-page pagination (1,000+ items per category/brand, 0 = unlimited) |
| Speed & Concurrency | Configurable parallel queries (default 5, up to 20 workers) |
| Output Formats | JSON, CSV, XML, Excel (XLSX), HTML Table, Apify Dataset API |
| Integrations | Python 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, orbarilla. - ✅ 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: 0for 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.
| Field | Type | Description | Default | Prefill |
|---|---|---|---|---|
barcodes | Array | Product barcodes (EAN-13/UPC), one per line (e.g., 3017620422003, 5449000000996). | [] | ["3017620422003", "5449000000996", "7622210449283"] |
categories | Array | Category tag slugs (e.g. chocolates, breakfast-cereals, sodas). | [] | [] |
brands | Array | Brand tag slugs (e.g. lindt, coca-cola, nestle). | [] | [] |
maxItemsPerQuery | Integer | Max products per category/brand query. Set to 0 for unlimited pagination. | 0 | 100 |
maxConcurrency | Integer | Parallel query workers (keep modest for public community infrastructure). | 5 | 5 |
proxyConfiguration | Object | Apify 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
| Field | Type | Description | Coverage |
|---|---|---|---|
barcode | String | Standard GTIN / EAN / UPC product code. | 🟢 High (100%) |
productName | String | Packaged product commercial title. | 🟢 High (97%) |
brands | String | Declared brand names, comma-separated. | 🟢 High (97%) |
categories | String | Categorization hierarchy and tags. | 🟢 High (100%) |
quantity | String | Net package quantity (e.g., 400 g, 1 L). | 🟢 High (88%) |
servingSize | String | Suggested serving size stated on package. | 🟡 Conditional (72%) |
url | String | Direct canonical URL to the product page on Open Food Facts. | 🟢 High (100%) |
🏅 Health, Processing & Eco Ratings
| Field | Type | Description | Coverage |
|---|---|---|---|
nutriscoreGrade | String | Nutri-Score nutritional quality grade (a through e). | 🟢 High (92%) |
novaGroup | String | NOVA food processing group (1=unprocessed, 4=ultra-processed). | 🟢 High (85%) |
ecoscoreGrade | String | Eco-Score environmental impact grade (a through e). | 🟢 High (82%) |
🥗 Nutritional Profile (per 100g / 100ml)
| Field | Type | Description | Coverage |
|---|---|---|---|
energyKcal | String | Energy value in kilocalories per 100g. | 🟢 High (98%) |
fat | String | Total lipid fat in grams per 100g. | 🟢 High (98%) |
saturatedFat | String | Saturated fatty acids in grams per 100g. | 🟢 High (97%) |
sugars | String | Total sugars in grams per 100g. | 🟢 High (97%) |
salt | String | Sodium salt equivalent in grams per 100g. | 🟢 High (96%) |
proteins | String | Total protein content in grams per 100g. | 🟢 High (97%) |
fiber | String | Dietary fiber content in grams per 100g. | 🟡 Conditional (65%) |
⚠️ Ingredients, Safety & Distribution
| Field | Type | Description | Coverage |
|---|---|---|---|
ingredientsText | String | Full ingredient list as printed on packaging. | 🟢 High (89%) |
allergens | String | Confirmed allergen ingredients (e.g. milk, nuts, gluten). | 🟡 Conditional (65%) |
traces | String | Cross-contamination allergen warnings ("may contain"). | 🟡 Conditional (40%) |
labels | String | Certification labels (Organic, Vegan, Halal, Kosher, Fairtrade). | 🟢 High (77%) |
countries | String | Target retail distribution countries. | 🟢 High (94%) |
stores | String | Retail supermarkets where reported sold. | 🟡 Conditional (60%) |
imageUrl | String | Direct URL to front-of-package product photograph. | 🟢 High (99%) |
scrapedAt | String | ISO 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 ApifyClientclient = 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 / Symptom | Probable Cause | Recommended Resolution |
|---|---|---|
| Barcode returns 0 records | Barcode has non-standard checksum or is not yet indexed | Confirm barcode format (12 or 13 digits). If uncataloged, Open Food Facts relies on community uploads. |
| Incomplete nutrition numbers | Packaged product has no nutrition facts table printed | Products like produce, raw spices, and alcoholic beverages often lack nutrition panels by law. |
Missing nutriscoreGrade | Product category is exempt or data is insufficient | Nutri-Score requires energy, saturated fat, sugars, sodium, fiber, and fruit/veg % to calculate. |
| Multi-language ingredient lists | Product sold across European regions | The scraper retrieves the standardized primary ingredients string, preserving localized declarations when available. |
| Missing package dimensions / weight | Packaging values not provided by community contributor | Quantitative measures depend on packaging submissions; field remains blank if omitted on carton. |
| Rate-limiting (HTTP 429) | High concurrency on a single IP address | Open 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 datasetdf = pd.read_csv("openfoodfacts_products.csv")# Convert nutritional fields to numericfor col in ["energyKcal", "sugars", "fat", "salt", "proteins"]:df[col] = pd.to_numeric(df[col], errors="coerce")# Calculate average sugar and calorie contentprint("Average calories:", df["energyKcal"].mean())print("Average sugars:", df["sugars"].mean())# Filter for low-sugar, high-protein productshealthy_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 gradescat dataset.json | jq -r '.[] | "\(.barcode)\t\(.nutriscoreGrade)\t\(.productName)"'# Filter products with gluten or nuts declared in allergenscat 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
allergensandtracesproperties. - 📦 Serving Size vs Per-100g: Note that nutrition values are normalized to per 100g/ml. Multiply by
servingSizeif 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
- USAspending Federal Awards Scraper — Extract federal contracts, grants, and spending.
- Article Content Extractor — Clean text, markdown, and article metadata.
- RSS Feed Reader — Parse RSS, Atom, and podcast feeds to JSON.
- Substack Scraper — Extract newsletters, posts, and creator profiles.
📋 Changelog
- v1.2 (2026-11):
- 🚀 Unlocked 1,000+ Deep Pagination: Enabled
maxItemsPerQuery: 0for 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.
- 🚀 Unlocked 1,000+ Deep Pagination: Enabled
- 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.