Openfoodfacts Scraper avatar

Openfoodfacts Scraper

Pricing

Pay per event

Go to Apify Store
Openfoodfacts Scraper

Openfoodfacts Scraper

Search the Open Food Facts database for food products. Get nutrition facts, ingredients, Nutri-Score, allergens, labels, and barcodes.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Open Food Facts Scraper

Search the Open Food Facts database and extract detailed food product data including nutrition facts, ingredients, Nutri-Score grades, allergens, barcodes, and labels for products sold worldwide.

What does Open Food Facts Scraper do?

This actor searches Open Food Facts — the world's largest open food product database with over 3 million products — and returns structured data for each matching product. It extracts:

  • Product identifiers: barcode (EAN/UPC), product name, brand
  • Nutrition facts per 100g: calories, fat, saturated fat, carbs, sugars, fiber, proteins, salt, sodium
  • Quality scores: Nutri-Score (A–E), NOVA food processing group (1–4), Eco-Score
  • Ingredients & allergens: full ingredient text, allergen list, traces
  • Labels & categories: organic, fair trade, vegan, kosher, and more
  • Origin data: countries where sold, product origins

Why use Open Food Facts Scraper?

  • Free, open data — Open Food Facts is a collaborative, community-maintained database with no licensing fees
  • 3M+ products — one of the largest food databases covering 180+ countries
  • Rich nutrition data — complete nutrition facts per 100g for most products
  • Nutri-Score & Eco-Score — quality grades that are increasingly required on EU food labels
  • No rate limits — search freely without API key restrictions
  • Structured output — clean JSON ready for analysis, dashboards, or integration

Use cases

  • Nutrition analysis: Compare nutrition profiles across brands and categories
  • Health app backends: Power food databases, calorie counters, and diet trackers
  • Market research: Analyze product availability and brand presence by country
  • Label compliance: Track Nutri-Score distribution across product lines
  • Academic research: Study food composition, additives, and labeling trends
  • Price comparison tools: Enrich product databases with nutrition and ingredient data
  • Allergen monitoring: Track allergen presence across food categories

How to use

  1. Go to the Open Food Facts Scraper page on Apify Store.
  2. Enter a search query (e.g., "chocolate", "oat milk", "pasta").
  3. Optionally filter by category, country, or Nutri-Score grade.
  4. Set the maximum number of results (1–500).
  5. Click Start and wait for the run to finish.
  6. Download your data as JSON, CSV, or Excel.

Input parameters

ParameterTypeDescription
searchQueryStringSearch term for food products (required). Example: "chocolate", "oat milk", "pasta"
categoriesStringFilter by category tag. Example: "breakfast-cereals", "beverages", "snacks"
countryStringFilter by country tag. Example: "united-states", "france", "germany"
nutriScoreStringFilter by Nutri-Score grade: "a", "b", "c", "d", or "e"
maxResultsIntegerMaximum products to extract (1–500, default: 50)

Output example

Each product in the dataset contains these fields:

{
"barcode": "3175681851856",
"productName": "Oat Drink Barista Edition",
"brands": "Oatly",
"categories": "Plant-based milk substitutes, Oat milks",
"labels": "No gluten, Vegan, Organic",
"quantity": "1 L",
"servingSize": "250 ml",
"nutriScore": "a",
"novaGroup": 4,
"ecoScore": "b",
"ingredients": "Water, oats (10%), rapeseed oil, calcium carbonate...",
"allergens": "en:oats",
"traces": "",
"calories": 48,
"fat": 3,
"saturatedFat": 0.3,
"carbohydrates": 3.9,
"sugars": 3.2,
"fiber": 0.8,
"proteins": 1,
"salt": 0.1,
"sodium": 0.04,
"countries": "France, Germany, United Kingdom",
"origins": "Sweden",
"imageUrl": "https://images.openfoodfacts.org/images/products/317/568/185/1856/front_en.jpg",
"productUrl": "https://world.openfoodfacts.org/product/3175681851856",
"scrapedAt": "2026-03-03T12:00:00.000Z"
}

Pricing

Open Food Facts Scraper uses a pay-per-event pricing model:

EventPrice
Run started$0.001
Per product extracted$0.001

Cost examples:

  • 50 products: $0.001 + (50 × $0.001) = $0.051
  • 200 products: $0.001 + (200 × $0.001) = $0.201
  • 500 products: $0.001 + (500 × $0.001) = $0.501

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('YOUR_USERNAME/openfoodfacts-scraper').call({
searchQuery: 'oat milk',
nutriScore: 'a',
maxResults: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(product => {
console.log(`${product.productName} - ${product.brands} - Score: ${product.nutriScore}`);
});

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('YOUR_USERNAME/openfoodfacts-scraper').call(run_input={
'searchQuery': 'oat milk',
'nutriScore': 'a',
'maxResults': 50,
})
dataset = client.dataset(run['defaultDatasetId']).list_items().items
for product in dataset:
print(f"{product['productName']} - {product['brands']} - Score: {product['nutriScore']}")

Integrations

Connect Open Food Facts Scraper with other tools using Apify integrations:

  • Google Sheets — Export food product data to spreadsheets for nutrition analysis
  • Slack / Email — Get notified when new products match your criteria
  • Webhooks — Trigger downstream processing when extraction completes
  • Zapier / Make — Connect to 5,000+ apps for automated workflows
  • Amazon S3 / Google Cloud — Store large datasets in cloud storage

Tips and best practices

  • Use specific search terms — "organic dark chocolate 70%" returns more relevant results than just "chocolate"
  • Filter by country — reduces noise and returns locally available products; use lowercase hyphenated tags like "united-states"
  • Category tags — use Open Food Facts category taxonomy (e.g., "breakfast-cereals", "plant-based-milk-substitutes")
  • Nutri-Score filter — use "a" for healthiest options; not all products have scores assigned
  • Data completeness varies — community-contributed data means some products may have missing fields
  • Pagination — the actor handles pagination automatically up to 500 products per run

Data source

All data comes from Open Food Facts, a free, open, collaborative database of food products from around the world. The data is contributed by volunteers and is available under the Open Database License (ODbL).

FAQ

Q: How fresh is the data? A: Data is fetched live from Open Food Facts at the time of each run — always up to date.

Q: Why are some fields empty? A: Open Food Facts is community-contributed. Not all products have complete nutrition data, ingredients, or Nutri-Score grades.

Q: What barcode formats are supported? A: Products are identified by EAN-13, UPC-A, and other international barcode standards.

Q: Can I search by barcode? A: The search API matches barcodes as part of the search query. Enter the barcode number in the search field.

Q: What is the Nutri-Score? A: Nutri-Score is a European nutrition label system rating food from A (healthiest) to E (least healthy) based on nutritional composition per 100g.