Open Food Facts EAN UPC GTIN Lookup avatar

Open Food Facts EAN UPC GTIN Lookup

Pricing

from $5.04 / 1,000 item extracteds

Go to Apify Store
Open Food Facts EAN UPC GTIN Lookup

Open Food Facts EAN UPC GTIN Lookup

Resolve food-product EAN, UPC, and GTIN barcodes into normalized Open Food Facts identity, ingredient, nutrition, image, provenance, and status records.

Pricing

from $5.04 / 1,000 item extracteds

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

Resolve batches of food-product EAN, UPC, and GTIN barcodes into normalized openfoodfacts records. The Actor returns product identity, brands, categories, ingredients, allergens, nutrition, food scores, images, source revisions, and an explicit status for every unique lookup.

It uses the anonymous Open Food Facts API. No API key, browser, proxy, or customer account is required.

What can you do with this Open Food Facts lookup?

  • Enrich grocery catalogs with product names, brands, package sizes, and categories.
  • Validate barcode lists and separate found, not-found, and temporary lookup-error records.
  • Add ingredients, allergens, Nutri-Score, NOVA group, Eco-Score, and per-100g nutrition to product data.
  • Audit source freshness with Open Food Facts creation, modification, and revision metadata.
  • Run repeatable barcode batches from Apify schedules, API clients, webhooks, or MCP tools.

This Actor is source-specific and food-focused. For a broader multi-database lookup with fewer food-specific fields, use UPC Barcode Product Lookup.

Who is this Actor for?

  • E-commerce catalog teams matching supplier GTINs to readable food-product data.
  • Nutrition and diet app developers importing ingredients and nutrition facts.
  • Data quality teams checking whether barcode identifiers have public product records.
  • Market researchers creating source-attributed food assortments.
  • Automation engineers resolving recurring barcode batches without maintaining an Open Food Facts API client.

Input

Provide codes as strings so leading zeroes are preserved.

FieldTypeDefaultDescription
codesstring arrayrequiredValid EAN-8/GTIN-8, UPC-A, EAN-13, or GTIN-14 barcodes. Spaces and hyphens are accepted.
maxItemsinteger100Maximum unique barcodes processed after deduplication, from 1 to 500.
maxConcurrencyinteger3Concurrent source requests, from 1 to 5. Keep the default for stable, respectful access.
{
"codes": ["3017620422003", "5449000000996", "2225954479223"],
"maxItems": 3,
"maxConcurrency": 2
}

Each barcode is validated with its standard GTIN check digit before any request starts. Duplicate inputs are looked up once and reported in duplicateCount.

Output fields

The default dataset contains one row per unique processed barcode.

GroupFields
IdentifierinputCode, gtin, format, status, duplicateCount
IdentityproductName, genericName, brands, categories, quantity
IngredientsingredientsText, allergens, labels, countries
ScoresnutriScoreGrade, novaGroup, ecoScoreGrade
NutritionnutritionPer100g.energyKcal, fat, saturated fat, carbohydrates, sugars, fiber, proteins, salt, sodium
Imagesimages.front, images.ingredients, images.nutrition
ProvenancesourceUrl, sourceApiUrl, sourceRevision, sourceCreatedAt, sourceLastModifiedAt, lookedUpAt
Failure detailerror for exhausted transient failures

status is found, not_found, or lookup_error. Missing optional Open Food Facts fields are returned as null or empty arrays rather than guessed.

Example product record

{
"inputCode": "3017620422003",
"gtin": "3017620422003",
"format": "EAN-13",
"status": "found",
"productName": "Nutella",
"brands": ["nutella", "ferrero"],
"categories": ["spreads", "sweet spreads"],
"quantity": "400 g",
"nutriScoreGrade": "e",
"novaGroup": 4,
"nutritionPer100g": {
"energyKcal": 539,
"fat": 30.9,
"sugars": 56.3,
"proteins": 6.3
},
"sourceUrl": "https://world.openfoodfacts.org/product/3017620422003",
"duplicateCount": 1,
"error": null
}

Source records are community-maintained and can change. Treat the example as a shape illustration, not a permanent claim about that product.

How much does it cost to look up Open Food Facts products?

Pay-per-event pricing has a $0.005 run-start fee plus a tiered lookup-record event. At the BRONZE tier, each found or confirmed not-found record is $0.0084.

BRONZE calculation examples:

Unique barcodesBilling formula
1one run-start event + one item event
10one run-start event + ten item events
100one run-start event + one hundred item events

Your Apify pricing tier may have a different per-record rate. Duplicates beyond their first occurrence do not create another lookup record or item charge.

Getting started

  1. Open the Actor in Apify Console.
  2. Paste real barcode strings into EAN, UPC, or GTIN codes.
  3. Keep concurrency at 3 unless you have a reason to lower it.
  4. Click Start.
  5. Review the Product lookups dataset view.
  6. Export JSON, CSV, Excel, XML, or RSS, or connect the dataset to another workflow.

Catalog enrichment workflow

Run the Actor with a supplier barcode column, then join the output back to your catalog on gtin. Use status to route records:

  • found: import reviewed identity and food-specific fields;
  • not_found: send to a manual data-completion queue;
  • lookup_error: retry later because the source request failed temporarily.

For change monitoring, schedule the same task and compare sourceRevision or sourceLastModifiedAt with your previous dataset. The Actor reports timestamps; it does not itself store diffs or send alerts.

Use the Actor with the Apify API

Replace YOUR_TOKEN with an Apify API token.

cURL

curl -X POST \
"https://api.apify.com/v2/acts/automation-lab~ean-upc-gtin-product-lookup/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"codes":["3017620422003","5449000000996"],"maxItems":2}'

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/ean-upc-gtin-product-lookup').call({
codes: ['3017620422003', '5449000000996'],
maxItems: 2,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation-lab/ean-upc-gtin-product-lookup").call(
run_input={"codes": ["3017620422003", "5449000000996"], "maxItems": 2}
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)

Use with MCP and AI agents

Claude Code

Add the Actor to Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/ean-upc-gtin-product-lookup"

Claude Desktop, Cursor, and VS Code

Use this MCP server configuration in Claude Desktop, Cursor, or VS Code:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/ean-upc-gtin-product-lookup"
}
}
}

Example prompts:

  • “Look up these grocery GTINs and return only products containing milk allergens.”
  • “Resolve this supplier barcode batch and summarize all not-found identifiers.”
  • “Compare the Open Food Facts source revision fields in these two run datasets.”

Legality and responsible use

Open Food Facts is a collaborative database. Records may be incomplete, multilingual, outdated, or entered differently across markets. Verify important nutrition, allergen, safety, and compliance decisions against packaging or an authoritative source. This Actor normalizes public fields but does not certify their accuracy.

Use the data in accordance with Open Food Facts terms and database licensing requirements. Preserve attribution and share-alike obligations where they apply. Do not use this Actor to make unsupported medical or health claims.

Limits and failure behavior

  • Only standard 8, 12, 13, and 14 digit GTIN formats are accepted.
  • Invalid lengths or check digits fail the run before charging the start event.
  • At most 500 unique codes are processed per run.
  • The Actor does not search by product name, category, brand, or image.
  • The source can return products with only some fields populated.
  • Transient 429, 5xx, timeout, and network failures are retried with backoff.
  • An exhausted source failure produces a lookup_error row for diagnosis.
  • No proxy fallback is used or needed for the public API route.

Troubleshooting

The run says the check digit is wrong. Confirm that the full printed barcode was copied, including leading zeroes. Supply codes as strings, not spreadsheet numbers.

A known product is not_found. Check the product page URL in the output and retry the exact code. Open Food Facts may not contain that regional code or may store a different package variant.

Some nutrition fields are null. The source record did not expose those values. The Actor does not infer missing nutrition.

I received lookup_error. Inspect error and the run log, then retry later.

FAQ

Does the OpenFoodFacts API require a key?

No. This Actor uses anonymous product lookup with a descriptive User-Agent. Your Apify token is still required when starting the Actor through Apify API or MCP.

Can I look up UPC codes with leading zeroes?

Yes. Enter them as strings. The output preserves the normalized submitted identifier and reports format as UPC-A.

Does the Actor download images?

No. It returns public image URLs, avoiding unnecessary transfer and storage costs.

Can I monitor product changes?

Yes. Schedule recurring runs and compare source revision or modification fields downstream. The Actor does not send alerts by itself.

Are not-found rows charged?

Yes, because they are confirmed lookup results and support validation workflows.