# Open Food Facts Product Lookup (Barcode) (`fit_melon/open-food-facts-product-lookup`) Actor

Look up food & grocery products by barcode (EAN/UPC): name, brand, Nutri-Score, NOVA, ingredients, allergens and nutrition facts. Free, powered by Open Food Facts.

- **URL**: https://apify.com/fit\_melon/open-food-facts-product-lookup.md
- **Developed by:** [D N](https://apify.com/fit_melon) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Open Food Facts Product Lookup (Barcode) — Free

Look up **food, drink and grocery products by barcode** (EAN-13, EAN-8, UPC) and get clean, structured data: product name, brand, **Nutri-Score**, **NOVA** processing group, Eco-Score, ingredients, allergens and full nutrition facts per 100 g. Powered by the open [Open Food Facts](https://world.openfoodfacts.org) database (recherche produit alimentaire par code-barres).

This actor is **free** — you only pay for your own Apify platform usage.

### What it does

Give it a list of barcodes; it returns one structured record per barcode with an explicit `status` (`found` / `not_found` / `error`). Ideal for enriching product catalogs, checking nutrition quality, or building diet and grocery apps without scraping retailer sites.

### Input

| Field | Type | Description |
|---|---|---|
| `barcodes` | array of strings | Product barcodes (EAN/UPC). One result per barcode. |
| `language` | string | Preferred language for localized fields (`en`, `fr`, `de`…). Default `en`. |

### Output (example)

```json
{
  "barcode": "3017620422003",
  "status": "found",
  "product_name": "Nutella",
  "brands": "Nutella, Ferrero",
  "nutriscore_grade": "e",
  "nova_group": 4,
  "ingredients_text": "Sugar, palm oil, hazelnuts 13%, ...",
  "nutrition_per_100g": { "energy_kcal": 539, "sugars_g": 56.3, "proteins_g": 6.3 },
  "url": "https://world.openfoodfacts.org/product/3017620422003"
}
```

### Use cases

- Enrich an e-commerce or inventory catalog with nutrition & Nutri-Score data.
- Power diet, allergen-check or grocery-scanner apps.
- Bulk-audit the nutritional quality of a product range.
- Academic / open-data nutrition research.

### Limitations & fair use

Data is crowd-sourced by the Open Food Facts community (Open Database License); coverage and completeness vary by product and region. The actor adds a polite delay between requests and identifies itself with a proper User-Agent. Please respect Open Food Facts' fair-use guidelines.

### More actors by this developer

See the full range of free open-data actors on the [fit\_melon profile](https://apify.com/fit_melon).

# Actor input Schema

## `barcodes` (type: `array`):

List of product barcodes (EAN-13, EAN-8, UPC). One result item per barcode.

## `language` (type: `string`):

Preferred language for localized fields (product name, ingredients). ISO code, e.g. en, fr, de.

## Actor input object example

```json
{
  "barcodes": [
    "3017620422003",
    "5449000000996",
    "0000000000000"
  ],
  "language": "en"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "barcodes": [
        "3017620422003",
        "5449000000996",
        "0000000000000"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fit_melon/open-food-facts-product-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "barcodes": [
        "3017620422003",
        "5449000000996",
        "0000000000000",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fit_melon/open-food-facts-product-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "barcodes": [
    "3017620422003",
    "5449000000996",
    "0000000000000"
  ]
}' |
apify call fit_melon/open-food-facts-product-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fit_melon/open-food-facts-product-lookup",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/gPw42l0GTGyeR5Bjv/builds/ukNIN7dX9odv9grbJ/openapi.json
