Open Food Facts API Scraper – Food Barcode Lookup
Pricing
from $1.00 / 1,000 run start fees
Open Food Facts API Scraper – Food Barcode Lookup
Food barcode lookup for developers and analysts: send a list of EAN/UPC codes or a set of filters and get one clean row per product from the open food barcode database. Ingredients, allergens, nutrition per 100g, Nutri-Score, NOVA, Eco-Score and product images, ready for JSON, CSV or Excel.
Pricing
from $1.00 / 1,000 run start fees
Rating
0.0
(0)
Developer
SR
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Features
Share
Open Food Facts API Scraper: barcode lookup, nutrition and allergens
Open Food Facts API Scraper turns the Open Food Facts API into ready-to-use dataset rows. Look up food products by EAN/UPC barcode, or search by category, brand, label, country, store, allergen and Nutri-Score. Each product includes the available ingredients, allergens, nutrition per 100g, Nutri-Score, NOVA and Eco-Score grades, and product images from the Open Food Facts public database. Export the results as JSON, CSV or Excel, or read them through the Apify API.
No API client, pagination code or retry handling is needed on your side. Send a list of barcodes or a set of filters and receive one flat row per product.
What you can do with Open Food Facts data
- Enrich a retail catalogue. Put the barcodes of your own assortment in and join ingredients, allergens and nutrition back to each product.
- Build a food nutrition API feed. Pull nutrition per 100g, energy in kcal, sugars, salt and fiber for apps, dashboards or diet tools.
- Check allergen and label claims. Find products that declare milk, gluten, nuts or soybeans, or that carry labels such as organic, vegan or gluten-free.
- Analyse an assortment. Extract one brand's products, one country's yogurts or one store's sodas, then compare Nutri-Score and NOVA grades.
- Verify packaging. Every row links to the front, ingredient-list and nutrition-table photos when the source has them.
- Research food categories. Sample a category and count how many products score A to E, or how many are ultra-processed (NOVA 4).
Open Food Facts API Scraper for barcode enrichment
Use a barcode as the exact join key between a retail catalogue and food metadata. Send the EAN or UPC values from your own records and join the returned barcode or gtin to the corresponding catalogue entry. This works as a food UPC lookup and a food barcode lookup in one step, and supports ingredient enrichment, assortment analysis, product classification and comparisons of nutritional information across brands.
The database may normalize a code. In a real lookup, the input 737628064502 returned 0737628064502, with its leading zero preserved. Keep barcode values as strings in your input and exports. Converting them to numbers loses leading zeros and makes catalogue joins harder.
A barcode lookup returns the product record that exists in the source. It does not infer a product from a similar name. An unknown barcode is reported in errors, while valid products from the same input remain in the dataset. Duplicate source barcodes produce one row.
Input
The original input fields and defaults remain available:
| Field | Accepted input | Default |
|---|---|---|
barcodes | Array of barcode strings, or comma/whitespace separated text | Empty |
categories | Category tag or list of tags | Empty |
brands | Brand tag or list of tags | Empty |
labels | Label tag or list of tags | Empty |
countries | Country tag or list of tags | Empty |
stores | Store tag or list of tags | Empty |
nutrition_grades | a, b, c, d, e, or empty | Empty |
allergens | Allergen tag or list of tags | Empty |
limit | Integer from 1 to 5000 | 100 |
retries | Integer from 1 to 8 | 4 |
Provide at least one barcode, a search category or a filter. Barcodes take precedence over all search filters. The category prefill in the input editor is not a category default for API calls.
This input was used for the original actor's measured barcode example:
{"barcodes": ["5000112548167", "737628064502"],"categories": "breakfast-cereals","limit": 100,"retries": 4}
The returned products were Coca-Cola Light and a Thai peanut noodle kit. The category is ignored because the barcode list is populated. The noodle record contained the declared allergens peanuts, sesame seeds and soybeans, as well as 385 kcal per 100g.
For search, leave barcodes empty. A measured search combined categories: yogurts, countries: netherlands and nutrition_grades: a with limit: 50. It returned 50 products from 140 reported matches. Counts describe the source at the time of the run and can change as contributors update records.
Use the source's tag form, including hyphens where applicable. Filters combine. The API also accepts the original _tags aliases and the additional filters nova_groups, ecoscore, origins, packaging, ingredients, additives, traces and states. Lists are combined with commas. The legacy search field selects categories through categories_tags_en; it is a category query, rather than a general product-name search.
Output
The default dataset contains one row per product. Every original output field is retained, including nullable fields and optional nutritional values:
- Identity:
barcode,product_name,generic_name,brands,quantity,serving_sizeandurl. - Composition:
ingredients_text,allergens,traces,additives,originsandpackaging. - Classification:
categories,labels,countriesandstores. - Scores:
nutriscore_grade,nova_groupandecoscore_grade. - Nutrition:
energy_kcal_100g,fat_100g,saturated_fat_100g,carbohydrates_100g,sugars_100g,fiber_100g,proteins_100g,salt_100gandsodium_100g. - Images:
image_url,image_ingredients_urlandimage_nutrition_url. - Record information:
completeness,is_stubandposition.
New catalogue fields are provided alongside the original fields: source, fetched_at, gtin, product_id, title and brand. They allow a common product representation without changing existing dataset columns. gtin contains a barcode with 8, 12, 13 or 14 digits, or null for other source codes. title and brand mirror the original product-name and brand fields.
Output example
A real row from a barcode lookup for 3017620422003, fetched on 6 October 2026. The category list is shortened here; everything else is as returned.
{"barcode": "3017620422003","product_name": "Nutella","generic_name": "Pâte à tartiner aux noisettes et au cacao","brands": "Nutella, Ferrero","quantity": "400 g e","serving_size": null,"categories": ["breakfasts", "spreads", "sweet spreads", "confectionary based spreads"],"labels": ["vegetarian", "no gluten", "triman"],"countries": ["france"],"stores": "Carrefour","origins": null,"nutriscore_grade": "E","nova_group": 4,"ecoscore_grade": "UNKNOWN","ingredients_text": "Sucre, huile de palme, NOISETTES 13%, cacao maigre 7,4%, LAIT écrémé en poudre 6,6%, LACTOSERUM en poudre, émulsifiants: lécithines [SOJA), vanilline. Sans gluten.","allergens": ["milk", "nuts", "soybeans"],"traces": null,"additives": ["e322", "e322i"],"packaging": "pot: clear glass (recycle in glass bin), lid: plastic (recycle in sorting bin), seal: aluminium (recycle in sorting bin), jar: clear glass (recycle)","image_url": "https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.879.400.jpg","image_ingredients_url": "https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_en.821.400.jpg","image_nutrition_url": "https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.822.400.jpg","url": "https://world.openfoodfacts.org/product/3017620422003","completeness": 0.8875,"is_stub": false,"position": 1,"source": "openfoodfacts-scraper","fetched_at": "2026-10-06T03:03:14.438Z","gtin": "3017620422003","product_id": "3017620422003","title": "Nutella","brand": "Nutella, Ferrero","energy_kcal_100g": 539,"fat_100g": 30.9,"saturated_fat_100g": 10.6,"carbohydrates_100g": 57.5,"sugars_100g": 56.3,"fiber_100g": 0,"proteins_100g": 6.3,"salt_100g": 0.107,"sodium_100g": 0.0428}
Missing text is null. A missing nutrient is absent from the row, preserving the original behavior. A numeric zero remains a real numeric value. Tags have their language prefix removed, hyphens replaced with spaces and duplicates removed, with up to 25 entries per list. Score text is returned in uppercase; it can include source values such as UNKNOWN or NOT-APPLICABLE.
The summary record reports returned products, total search matches, fetched search pages, available scores, nutrition coverage, stub products and errors. totalMatches is null for barcode lookups. When the source has more matches than the requested limit, samplingNote explains that the output is a sample. The errors record appears when a lookup or source request fails.
Open Food Facts API, data exports or this actor?
| Option | Best for | What you handle yourself |
|---|---|---|
| Official Open Food Facts API | Single lookups inside your own app | Request code, pagination, retries on temporary errors, tag clean-up and flattening of nested nutrient objects |
| Open Food Facts data exports | Loading the full food barcode database once | Downloading and parsing a very large file, filtering it and keeping it up to date |
| Other Open Food Facts scrapers in the Store | One-off product or category pulls | Checking which fields, filters and grades each one returns |
| This actor | Barcode lists and filtered searches that must land as clean rows | Nothing beyond choosing barcodes or filters |
This actor reads the same public Open Food Facts data and adds what a data pipeline needs: flat columns, consistent types, barcodes kept as strings, stub detection, a run summary and explicit errors. Unlike a general food nutrition API from a commercial vendor, the data is open and contributed by volunteers, so you can trace every row back to its public product page.
Pricing
The existing price is unchanged: $0.001 per run start and $0.001 per returned product. The start event applies once, including an empty run. Unknown barcodes and missing results do not incur a product event. Product events count delivered dataset rows after deduplication and the free-plan limit.
Users without a paid Apify subscription receive up to ten products per run. Paying users retain their requested limit. Apify charge limits continue to apply. A failed charge does not remove products already delivered.
Pagination and source errors
Large searches and barcode lists are collected in bounded parts automatically. The dataset combines those parts, removes duplicate barcodes and numbers the final rows continuously. Temporary source failures can be retried. If collection stops early, previously collected records remain available with an explicit error or warning.
An API error page is never interpreted as a valid empty search. retries controls the maximum attempts per source call within the available request budget. A source response indicating that a barcode does not exist is recorded as not_found. No matches, blocked requests and timeouts remain successful empty runs, consistent with the original actor.
FAQ
Do I need an Open Food Facts API key?
No. The Open Food Facts API is open for reading, and this actor needs only your Apify account. You do not register an app, manage a key or write request code.
Why is the product name null?
A contributor may have scanned a barcode without completing its product record. That row has is_stub: true. Keeping the record distinguishes an incomplete source entry from a barcode that does not exist in the database.
Can I combine barcode lookup and search filters?
You can send both, but a nonempty barcode list selects barcode lookup. Filters apply when the barcode list is empty. This preserves the original actor's selection behavior.
Why are nutritional values missing?
Open Food Facts is contributed data. A nutrient appears only when the source provides a numeric value. Missing values are not replaced with zero. Coverage varies by product, country and contributor activity.
Can I search by product name?
Search works on tags: category, brand, label, country, store, allergen and grade. For a known product, the barcode is the most reliable key. The legacy search field is a category query, not a free-text name search.
Does the actor return retail prices?
It returns food metadata. Join its barcode to retail price data from your catalogue or another product source. The source does not provide a retail price for this output, so no price is invented.
Where does the data come from?
The data comes from the Open Food Facts public API. Check the source's published attribution and reuse terms when sharing a derived dataset. Product images and contributor-provided text remain linked to their original source records.