Food Barcode & Nutrition MCP Server
Pricing
from $3.00 / 1,000 read operations
Food Barcode & Nutrition MCP Server
Food barcode MCP server for Claude, ChatGPT and Cursor: look up packaged food, cosmetics or pet food by barcode for ingredients, allergens, Nutri-Score, NOVA group, Green-Score and nutrients per 100 g. Compare products and find healthier ones. Data by Open Food Facts contributors, under the ODbL.
Pricing
from $3.00 / 1,000 read operations
Rating
0.0
(0)
Developer
MrBridge
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
6 days ago
Last modified
Categories
Share
🥫 Food Barcode & Nutrition MCP Server
Give Claude, ChatGPT, Cursor, VS Code or any MCP client the product behind a barcode. This MCP server reads the Open Food Facts databases (packaged food, cosmetics, pet food) through 11 read-only tools: barcode lookup, nutrition table, allergen check, keyword and criteria search, side-by-side comparison, healthier alternatives and two taxonomy tools, plus the search and fetch pair for ChatGPT.
Ask "does the product with barcode 3017620422003 contain nuts, and is there a healthier spread?" and your assistant calls food_check_allergens, then food_find_alternatives. You get one verdict per allergen (contains, may contain, not declared or unknown) and products of the same category with a better Nutri-Score, each with its product page. Data (c) Open Food Facts contributors, under the Open Database License.
Quick start
- Copy your Apify API token from Apify Console > Settings > API & Integrations.
- Point your MCP client at
https://mrbridge--food-barcode-mcp.apify.actor/mcpwith that token, as a Bearer header or as?token=in claude.ai and ChatGPT, plus your contact e-mail (Connect has every recipe). - Ask in plain language.
What this server exposes
This server reads product data from Open Food Facts, the collaborative database of packaged food, and from its sibling databases Open Beauty Facts (cosmetics) and Open Pet Food Facts, through their public API. It has 11 read-only tools: a barcode lookup, the nutrition table, an allergen check, a keyword search, a search by category, label, country, Nutri-Score and nutrient limits, a side-by-side comparison of up to five products, healthier alternatives in the same category, and two taxonomy tools for category, label, allergen and additive names, plus the search and fetch pair for ChatGPT. It needs no API key and no account, only your contact e-mail, which the Open Food Facts sites ask of every caller (see Connect). Answers give the product page link, the photo links, and the source and licence of the data.
Tools
| Tool | What it answers | Billed event |
|---|---|---|
food_get_product | Look up a product by barcode | tool-read |
food_get_nutrition | Get the nutrition facts of a product | tool-read |
food_check_allergens | Check a product for allergens | tool-read |
food_search_products | Search products by name or keywords | tool-read |
food_filter_products | Filter products by category, label and nutrition | tool-read |
food_compare_products | Compare products side by side | tool-action |
food_find_alternatives | Find healthier alternatives to a food product | tool-action |
food_suggest_tags | Suggest category, label and ingredient names | tool-read |
food_explain_tag | Explain an additive, label, category or ingredient | tool-read |
search | Search | tool-read |
fetch | Fetch | tool-read |
food_get_product: Look up a product by barcode
Use this when you have a barcode (EAN-13, EAN-8, UPC or GTIN-14, or a product page link) and need the product behind it: name, brand, quantity, categories, labels, ingredients, allergens and traces, additives, vegan and palm-oil status, Nutri-Score, NOVA processing group, Green-Score, key nutrients per 100 g and the photo URL. Covers food (Open Food Facts), cosmetics (Open Beauty Facts), pet food (Open Pet Food Facts) and other products. Do not use for finding products by name (use food_search_products), for the full nutrition table (food_get_nutrition) or for an allergen check against a list (food_check_allergens). Parameters: barcode (string, e.g. "3017620422003"), database ("auto" default, "food", "beauty", "petfood"), language (two letters, default "en"), response_format ("concise" default, "detailed" adds countries, origins, per-serving values, all photos and data quality warnings). Data is contributed by volunteers and can be incomplete: every answer carries the source, the licences and a not-medical-advice notice.
| Parameter | Type | Required | Example |
|---|---|---|---|
barcode | string | yes | "3017620422003" |
database | "auto" or "food" or "beauty" or "petfood" | no | "auto" |
language | string | no | "en" |
response_format | "concise" or "detailed" | no | "concise" |
Returns { product, next_calls[], attribution }. Upstream: Open Food Facts, Open Beauty Facts, Open Pet Food Facts. Cache: daily (1 day). Read-only.
food_get_nutrition: Get the nutrition facts of a product
Use this when you need the nutrition table of a food or pet food product from its barcode: energy, fat, saturated fat, carbohydrates, sugars, fibre, proteins, salt and sodium per 100 g and per serving, the low, moderate or high levels, the Nutri-Score grade and score, and the NOVA group. The detailed format adds every other nutrient recorded (vitamins, minerals) and the Nutri-Score points per component. Do not use for cosmetics (no nutrition table), for the product overview (food_get_product) or for medical or dietary decisions: values are typed from labels by volunteers and can be wrong. Parameters: barcode (string, e.g. "3017620422003"), database ("auto" default, "food", "petfood"), response_format ("concise" default or "detailed").
| Parameter | Type | Required | Example |
|---|---|---|---|
barcode | string | yes | "3017620422003" |
database | "auto" or "food" or "petfood" | no | "auto" |
response_format | "concise" or "detailed" | no | "concise" |
Returns { product, basis, serving_size, nutrients[], other_nutrients[], nutrient_levels, nutri_score, nutri_score_points, nova_group, attribution }. Upstream: Open Food Facts, Open Pet Food Facts. Cache: daily (1 day). Read-only.
food_check_allergens: Check a product for allergens
Use this when you need to know whether a product (by barcode) contains or may contain given allergens, or is vegan or vegetarian: declared allergens, "may contain" traces, vegan, vegetarian and palm-oil status, the ingredient list, and one verdict per allergen asked in avoid (contains, may_contain_traces, not_declared, unknown). Do not use for medical decisions or as a guarantee that a product is safe: the data is typed by volunteers, can be incomplete, and only the package label is authoritative. Do not use for nutrition values (food_get_nutrition). Parameters: barcode (string, e.g. "3017620422003"), avoid (optional list of up to 14 allergens of the EU list, e.g. ["milk", "gluten", "tree nuts"], aliases such as "dairy" or "soy", or ids such as "en:sesame-seeds". "nuts" alone is refused as ambiguous: say "tree nuts" or "peanuts"), database ("auto" default, "food", "beauty", "petfood"), language (two letters, default "en"), response_format ("concise" default or "detailed" with additives and analysis tags).
| Parameter | Type | Required | Example |
|---|---|---|---|
barcode | string | yes | "3017620422003" |
avoid | array of string | no | ["milk","tree nuts"] |
database | "auto" or "food" or "beauty" or "petfood" | no | "auto" |
language | string | no | "en" |
response_format | "concise" or "detailed" | no | "concise" |
Returns { product, allergens[], traces[], checks[], ingredient_analysis, ingredients_text, additives[], analysis_tags[], attribution }. Upstream: Open Food Facts, Open Beauty Facts, Open Pet Food Facts. Cache: daily (1 day). Read-only.
food_search_products: Search products by name or keywords
Use this when you need products matching a name, a brand or keywords, for example "oat milk", "nutella" or "greek yogurt": barcode, name, brand, quantity, Nutri-Score, NOVA group, Green-Score, product page and thumbnail URL, with the total number of matches. Do not use for a known barcode (food_get_product), for filters such as category, label, Nutri-Score or nutrient limits (food_filter_products), or for bulk downloads (the first 500 results only, bulk use goes through the data exports at https://world.openfoodfacts.org/data). Parameters: query (string, e.g. "oat milk"), database ("food" default, "beauty", "petfood"), country (optional, e.g. "France"), sort ("popularity" default, "name", "newest", "recently_updated"), language (two letters, default "en"), limit (1 to 50, default 10), offset (default 0), response_format ("concise" default, "detailed" adds categories, labels and countries, at most 25 rows).
| Parameter | Type | Required | Example |
|---|---|---|---|
query | string | yes | "oat milk" |
database | "food" or "beauty" or "petfood" | no | "food" |
country | string | no | "France" |
sort | "popularity" or "name" or "newest" or "recently_updated" | no | "popularity" |
language | string | no | "en" |
limit | integer | no | 10 |
offset | integer | no | 0 |
response_format | "concise" or "detailed" | no | "concise" |
Returns { query, database, country, products[], pagination, attribution }. Upstream: Open Food Facts search, Open Beauty Facts search, Open Pet Food Facts search. Cache: hourly (1 hour). Read-only.
food_filter_products: Filter products by category, label and nutrition
Use this when you need products, or the number of products, matching criteria: a category, a brand, a label (organic, fair trade), a country or store where it is sold, allergens it must not contain, Nutri-Score grades, and nutrient limits per 100 g (sugars, salt, saturated fat, fat, energy, proteins, fibre). For example breakfast cereals graded A or B with less than 5 g of sugar sold in France. The total match count answers "how many" questions. Do not use for free-text names (food_search_products), for one barcode (food_get_product), or for bulk extraction (the first 500 results only, bulk use goes through https://world.openfoodfacts.org/data). Use food_suggest_tags to find exact category and label names. Parameters (at least one filter): category (e.g. "Breakfast cereals" or "en:breakfast-cereals"), brand (e.g. "Kellogg's"), label (e.g. "Organic"), country (e.g. "France"), store (e.g. "Carrefour"), without_allergens (e.g. ["milk", "tree nuts"]), nutri_score (grades, e.g. ["a", "b"]), max_sugars_100g, max_salt_100g, max_saturated_fat_100g, max_fat_100g, max_energy_kcal_100g, min_proteins_100g, min_fiber_100g (numbers, g or kcal per 100 g), database ("food" default, "beauty", "petfood"), sort ("popularity" default, "nutri_score", "green_score", "name", "newest", "recently_updated"), language (names in filters and answers, default "en"), limit (1 to 50, default 10), offset, response_format.
| Parameter | Type | Required | Example |
|---|---|---|---|
category | string | no | "Breakfast cereals" |
brand | string | no | "Kellogg's" |
label | string | no | "Organic" |
country | string | no | "France" |
store | string | no | "Carrefour" |
without_allergens | array of string | no | ["milk","tree nuts"] |
nutri_score | array of string | no | ["a","b"] |
max_sugars_100g | number | no | 5 |
max_salt_100g | number | no | 0.5 |
max_saturated_fat_100g | number | no | 2 |
max_fat_100g | number | no | 10 |
max_energy_kcal_100g | number | no | 400 |
min_proteins_100g | number | no | 10 |
min_fiber_100g | number | no | 6 |
database | "food" or "beauty" or "petfood" | no | "food" |
sort | "popularity" or "nutri_score" or "green_score" or "name" or "newest" or "recently_updated" | no | "popularity" |
language | string | no | "en" |
limit | integer | no | 10 |
offset | integer | no | 0 |
response_format | "concise" or "detailed" | no | "concise" |
Returns { database, filters, products[], pagination, attribution }. Upstream: Open Food Facts search, Open Beauty Facts search, Open Pet Food Facts search. Cache: hourly (1 hour). Read-only.
food_compare_products: Compare products side by side
Use this when you need to compare two to five products by barcode: Nutri-Score, NOVA group, Green-Score and energy, fat, saturated fat, carbohydrates, sugars, fibre, proteins and salt per 100 g, side by side, with the leader on each metric (best grade, lowest sugars, salt, saturated fat and energy, highest proteins and fibre). One request for all the products. Do not use for one product (food_get_product), for finding alternatives (food_find_alternatives) or as dietary advice: the leaders are computed by this server from volunteer data per 100 g, not per serving. Parameters: barcodes (2 to 5 barcodes, e.g. ["3017620422003", "3017624010701"]), database ("food" default or "petfood"), language (two letters, default "en"), response_format ("concise" default, "detailed" adds nutrient levels, categories, labels, allergens and vegan status).
| Parameter | Type | Required | Example |
|---|---|---|---|
barcodes | array of string | yes | ["3017620422003","3017624010701"] |
database | "food" or "petfood" | no | "food" |
language | string | no | "en" |
response_format | "concise" or "detailed" | no | "concise" |
Returns { database, products[], not_found[], leaders[], attribution }. Upstream: Open Food Facts search, Open Pet Food Facts search. Cache: hourly (1 hour). Read-only.
food_find_alternatives: Find healthier alternatives to a food product
Use this when you need healthier alternatives to a food product (by barcode): products of the same category with a strictly better Nutri-Score, ranked by grade then popularity, optionally sold in one country. Returns the product, its category and grade, and the alternatives with their Nutri-Score, NOVA group, Green-Score and links. Do not use for cosmetics or pet food (no Nutri-Score), for a product already graded A, or as personal dietary advice: the ranking is computed by this server from volunteer data. Parameters: barcode (string, e.g. "3017620422003"), country (optional, e.g. "France"), limit (1 to 20, default 5), language (two letters, default "en"), response_format ("concise" default, "detailed" adds sugars, saturated fat, salt and energy per 100 g).
| Parameter | Type | Required | Example |
|---|---|---|---|
barcode | string | yes | "3017620422003" |
country | string | no | "France" |
limit | integer | no | 5 |
language | string | no | "en" |
response_format | "concise" or "detailed" | no | "concise" |
Returns { product, criteria, alternatives[], candidates_considered, attribution }. Upstream: Open Food Facts, Open Food Facts search. Cache: hourly (1 hour). Read-only.
food_suggest_tags: Suggest category, label and ingredient names
Use this when you need the exact name Open Food Facts uses for a category, label, allergen, additive, ingredient, brand, country, origin or packaging shape or material, from a partial word in any supported language, for example "cereal" in categories or "bio" in labels. Returns the matching names in the chosen language with the synonym that matched, and a ready call to food_filter_products or food_explain_tag with the first match. Do not use for products (food_search_products) or for the description of one tag (food_explain_tag). Parameters: tag_type (one of "categories", "labels", "allergens", "additives", "ingredients", "brands", "countries", "origins", "packaging_shapes", "packaging_materials"), query (string, e.g. "cereal"), database ("food" default, "beauty", "petfood"), language (two letters, default "en"), limit (1 to 50, default 15), offset, response_format.
| Parameter | Type | Required | Example |
|---|---|---|---|
tag_type | "categories" or "labels" or "allergens" or "additives" or "ingredients" or "brands" or "countries" or "origins" or "packaging_shapes" or "packaging_materials" | yes | "categories" |
query | string | yes | "cereal" |
database | "food" or "beauty" or "petfood" | no | "food" |
language | string | no | "en" |
limit | integer | no | 15 |
offset | integer | no | 0 |
response_format | "concise" or "detailed" | no | "concise" |
Returns { tag_type, query, suggestions[], next_calls[], pagination, attribution }. Upstream: Open Food Facts search, Open Beauty Facts search, Open Pet Food Facts search. Cache: daily (1 day). Read-only.
food_explain_tag: Explain an additive, label, category or ingredient
Use this when you need what one Open Food Facts taxonomy entry is: an additive (for example E322 or E471), an allergen, a label (organic, fair trade), a category, an ingredient, a country, an origin or a packaging shape or material. Returns its name in the chosen language, description when there is one, Wikidata id and link, parent and child entries, and the page listing its products. Do not use for finding names from a partial word (food_suggest_tags) or for products (food_filter_products). Parameters: tag_type (one of "additives", "allergens", "labels", "categories", "ingredients", "countries", "origins", "packaging_shapes", "packaging_materials"), tag (a tag id such as "en:e322", an E number such as "E471" for additives, or a name in language such as "Organic"), database ("food" default, "beauty", "petfood"), language (two letters, default "en"), response_format ("concise" default, "detailed" adds the names in the other returned languages).
| Parameter | Type | Required | Example |
|---|---|---|---|
tag_type | "additives" or "allergens" or "labels" or "categories" or "ingredients" or "countries" or "origins" or "packaging_shapes" or "packaging_materials" | yes | "additives" |
tag | string | yes | "E322" |
database | "food" or "beauty" or "petfood" | no | "food" |
language | string | no | "en" |
response_format | "concise" or "detailed" | no | "concise" |
Returns { id, tag_type, name, description, wikidata, parents[], children[], children_count, url, names, attribution }. Upstream: Open Food Facts search, Open Beauty Facts search, Open Pet Food Facts search. Cache: daily (1 day). Read-only.
search: Search
Use this when ChatGPT needs to find food products in Open Food Facts by name, brand or keywords, or one product by barcode (a query of 8 to 14 digits is looked up in every Open Facts database). Do not use for details, call fetch with a result id. Parameter query (string), e.g. "oat milk" or "3017620422003".
| Parameter | Type | Required | Example |
|---|---|---|---|
query | string | yes | "oat milk" |
Returns { results[], notices[] }. Upstream: Open Food Facts, Open Food Facts search, Open Beauty Facts, Open Beauty Facts search, Open Pet Food Facts, Open Pet Food Facts search. Cache: hourly (1 hour). Read-only.
fetch: Fetch
Use this when ChatGPT needs the product sheet of one result returned by search: name, brand, categories, labels, Nutri-Score, NOVA group, Green-Score, allergens, ingredients, nutrition per 100 g, photo link, source and licence. Do not use for free-text queries (call search first), or as medical or dietary advice. Parameter id (an id from search, a bare barcode or a product page link), e.g. "food:3017620422003".
| Parameter | Type | Required | Example |
|---|---|---|---|
id | string | yes | "food:3017620422003" |
Returns { id, title, text, url, metadata, notices[] }. Upstream: Open Food Facts, Open Food Facts search, Open Beauty Facts, Open Beauty Facts search, Open Pet Food Facts, Open Pet Food Facts search. Cache: hourly (1 hour). Read-only.
Connect
Endpoint (Streamable HTTP): https://mrbridge--food-barcode-mcp.apify.actor/mcp
Every client authenticates with your Apify API token, found in Apify Console > Settings > API & Integrations. Clients that support custom headers send it as Authorization: Bearer <token>. The others use the ?token= URL variant, which must be treated as a secret: keep it out of commits, screenshots and shared logs.
Contact e-mail for Open Food Facts, Open Food Facts search, Open Beauty Facts, Open Beauty Facts search, Open Pet Food Facts and Open Pet Food Facts search
Open Food Facts, Open Food Facts search, Open Beauty Facts, Open Beauty Facts search, Open Pet Food Facts and Open Pet Food Facts search ask every caller for a contact e-mail. The tools that call them need yours, and answer INVALID_INPUT without a charge until you add it to the connection:
- Claude Code: add
--header "X-Contact-Email: you@example.com"to theclaude mcp addcommand. - Cursor, VS Code, other JSON configurations and the OpenAI Responses API: add
"X-Contact-Email": "you@example.com"toheaders. - claude.ai, Claude Desktop and ChatGPT: add
&contact_email=you@example.comat the end of the URL, after the token. - Anthropic Messages API: add
?contact_email=you@example.comto the serverurl.
The address is sent only to Open Food Facts, Open Food Facts search, Open Beauty Facts, Open Beauty Facts search, Open Pet Food Facts and Open Pet Food Facts search, in the User-Agent of their requests, and is never stored or logged. Every other source gets the application URL only.
Claude Code
$claude mcp add --transport http food-barcode "https://mrbridge--food-barcode-mcp.apify.actor/mcp" --header "Authorization: Bearer ${APIFY_TOKEN}"
Cursor, VS Code and other JSON configurations
{"mcpServers": {"food-barcode": {"type": "http","url": "https://mrbridge--food-barcode-mcp.apify.actor/mcp","headers": {"Authorization": "Bearer ${APIFY_TOKEN}"}}}}
claude.ai and Claude Desktop
Add a custom connector with the URL https://mrbridge--food-barcode-mcp.apify.actor/mcp?token=YOUR_APIFY_TOKEN and no authentication. Prefilled link (replace the token placeholder before saving): add Food Barcode & Nutrition MCP Server to Claude.
ChatGPT (developer mode)
Settings > Apps > Create, URL https://mrbridge--food-barcode-mcp.apify.actor/mcp?token=YOUR_APIFY_TOKEN, authentication "No authentication". ChatGPT snapshots the tool list: after a server update, an admin has to click Refresh on the app.
OpenAI Responses API
{"type": "mcp","server_label": "food_barcode","server_url": "https://mrbridge--food-barcode-mcp.apify.actor/mcp","headers": {"Authorization": "Bearer YOUR_APIFY_TOKEN"},"require_approval": "never"}
Add allowed_tools to restrict the tool list. Tool calls must finish within about 60 seconds on this API, and every tool of this server answers in under 50 seconds.
Anthropic Messages API
{"mcp_servers": [{"type": "url","url": "https://mrbridge--food-barcode-mcp.apify.actor/mcp","name": "food-barcode","authorization_token": "YOUR_APIFY_TOKEN"}],"tools": [{"type": "mcp_toolset","mcp_server_name": "food-barcode"}]}
Send the beta header anthropic-beta: mcp-client-2025-11-20.
One-click OAuth alternative
https://mcp.apify.com/?tools=mrbridge/food-barcode-mcp connects through Apify OAuth without a token. It exposes the Actor as a single tool rather than the granular tools listed above.
Cost control
Each Standby run has a spending limit (maxTotalChargeUsd). When a call uses the last of it, the result is still returned, and later calls in that run answer CHARGE_LIMIT_REACHED until the limit is raised.
Why use this server
- One barcode, three databases. Food, cosmetics or pet food: one call finds it wherever it is listed. EAN-13, EAN-8, UPC, GTIN-14 and product page links are all accepted.
- Allergen answers that never say "safe". Checks cover the 14 EU allergens with common aliases (dairy, soy, tree nuts) and keep declared allergens apart from "may contain" traces. Missing data reads as unknown.
- Healthier swaps. Alternatives come from the same comparison category with a strictly better Nutri-Score, optionally limited to products sold in one country.
- Comparisons in one request. Up to five products side by side, with the leader on each nutrient and score.
- Search by what matters. Filter by category, label, country, Nutri-Score grade and limits on sugar, salt, fat, energy, protein or fibre per 100 g.
- Licence handled. Each answer carries credit, licence names and product link, as the ODbL asks. Contributor user names are never returned.
Pricing (Pay-per-Event)
| Event | Charged when | Price |
|---|---|---|
apify-actor-start | run start (platform default) | see the Store page |
tool-read (primary event) | each successful read tool call | see the Store page |
tool-action | each successful call of a detailed or computed tool | see the Store page |
Never charged: initialize, tools/list, pings, readiness probes, and any call that ends in an error (invalid input, not found, upstream failure, timeout, spending limit).
Platform usage comes on top of these events. This server runs in Apify Standby mode, and you also pay the platform usage of your own Standby run, billed to your Apify account like any other run: the memory set for the Standby run, for as long as the server is up, idle time included, until the run stops at its idle timeout. The Apify pay-per-event documentation says so: "For runs in Standby mode, users always pay the platform usage costs in addition to the event charges."
Limits, caveats and attribution
- Not medical or dietary advice. Volunteers type the data from labels and photos. It can be incomplete, out of date or wrong, and Open Food Facts states that it must not be used for medical purposes. An allergen check never says a product is safe:
not_declaredmeans the recorded ingredient list declares neither the allergen nor its traces, andunknownmeans no ingredient list is recorded. The label on the package is the reference. - Attribution. Every answer carries an
attributionblock: the source database and its URL, the credit "(c) Open Food Facts contributors", the three licences with their links, the terms page and the notices. Product rows carry their product page link, which is the attribution form the Open Food Facts terms ask for. Keep them when you show or reuse the data. - Photos. Product photos are returned as links to the Open Food Facts image servers, never copied or resized by this server. The photos are under CC BY-SA 3.0, and the packaging, brands or people they show can belong to third parties.
- Scores. The Nutri-Score, the NOVA group and the Green-Score (formerly Eco-Score) are computed by Open Food Facts from the recorded data and can be missing. Cosmetics have none of them, and pet food has no Nutri-Score. Comparisons, rankings and allergen verdicts are computed by this server and say so.
- Rate limits. Open Food Facts allows 15 product reads and 10 searches per minute per IP address and may ban an address that goes beyond. This server keeps to half of that per instance, with short bursts, caches products for a day and searches for an hour. A busy period can answer
UPSTREAM_RATE_LIMITED: retry a minute later. - No bulk use. Each tool call makes one request (two for alternatives), and a query can browse its first 500 results only. The API terms reserve the API for "1 API call = 1 real scan by a user". For the whole database, use the daily exports at https://world.openfoodfacts.org/data.
- Search. Keyword search uses the legacy Open Food Facts search, which matches words in names, brands and other fields and is not a relevance engine. Category, label and country filters take the exact names that
food_suggest_tagsreturns, or tag ids such asen:breakfast-cereals. - Barcode lookup across databases. With
databaseset toauto, a barcode is looked up once and the API sends it on to the database that holds it, Open Products Facts included. The forwarded request keeps its User-Agent, so your contact e-mail reaches that database too. Unknown barcodes answerNOT_FOUNDand are not charged. - Freshness. Product records are cached for up to a day, so an edit made on Open Food Facts can take a day to show up.
- Affiliation. This server is not affiliated with or endorsed by the Open Food Facts association.
Data terms
The data comes from Open Food Facts, Open Beauty Facts, Open Pet Food Facts and Open Products Facts, published by the Open Food Facts association under three licences:
- the database under the Open Database License 1.0 (ODbL),
- each item of data under the Database Contents License 1.0,
- product photos under Creative Commons Attribution-ShareAlike 3.0.
By using this server you agree to use what it returns in line with the Open Food Facts terms of use, contribution and re-use, and to pass the same obligations on to anyone you share the data with. In practice:
- Credit the source wherever you show the data. Write "(c) Open Food Facts contributors" with a link to https://world.openfoodfacts.org or to the product page, and name the licence. The Open Food Facts wiki explains the attribution it expects in apps and on websites: https://wiki.openfoodfacts.org/ODBL_License.
- Share alike if you build a database. If you store answers from this server and combine, correct or extend them into a database of your own (a derivative database under the ODbL) and use it publicly, you have to offer that database, or the changes you made, under the ODbL too. You also have to keep the ODbL notices and credit Open Food Facts on anything you publish from it. The simplest way is to send your corrections back to Open Food Facts through its app or its API. Products built from the data, such as an app screen or a chart, need the credit and the licence notice only.
- Photos are CC BY-SA. Credit the photo and share any edited version under the same licence. Check the other rights a photo can carry (packaging design, trademarks, people) before you reuse it.
- Do not present the data as medical advice, and pass the Open Food Facts warning on to your own users: the data "can contain errors and must not be used for medical purposes".
The fee for this server pays for the service (hosting, caching, normalisation, the answers it computes), not for a licence on the data, which Open Food Facts gives to everyone for free.
Use cases
- Shopping assistants. A user types the barcode printed on a package, or an app passes it on, and the assistant explains what is inside and what the Nutri-Score means.
- Meal planning with allergies in mind. An agent screens a shopping list for declared allergens and traces, and flags products with no ingredient list so the user reads the label.
- Healthier swaps. Nutrition coaches and food apps suggest products of the same category with a better grade, in one country.
- Product research. Brand and category managers count products by label, grade or nutrient limit, or compare a range with rival ones. Pet food and cosmetics work the same way.
FAQ
Why does the server ask for my e-mail?
The Open Food Facts sites ask every caller for a contact e-mail. Add yours once to your connection: an X-Contact-Email header, or &contact_email= after the token in URLs for claude.ai and ChatGPT (see Connect). It goes only to those sites, inside the request User-Agent, and is never stored or logged. Without it, the tools answer with an error that is not charged.
Can I rely on the allergen check?
Use it as a first screen, never as medical advice. Volunteers enter the data from labels and photos, so it can be incomplete or out of date. Trust the printed label first.
How many products are covered?
Millions of packaged foods worldwide, unevenly spread by country, plus cosmetics and pet food. Cosmetics carry no nutrition table or scores, pet food no Nutri-Score.
Can I pull the whole database through it?
No. The API serves one product at a time, a query browses its first 500 results only, and this server stays under per-minute limits. For bulk use, take the free daily exports at https://world.openfoodfacts.org/data.
What does a call cost?
Each successful tool call is one event, at the price shown on the Pricing tab for your Apify plan: tool-action for food_compare_products and food_find_alternatives, tool-read for every other tool. Paid Apify plans get lower prices. On the free plan, a read costs $0.005 and an action $0.01, so 100 barcode lookups come to $0.50 in events. On top of that, your Apify account pays the platform usage of your own Standby run while the server is up, idle minutes included. Unknown barcodes and errors are never charged, and maxTotalChargeUsd caps what one run can spend.
Why is the first call slower?
The first call after a quiet period starts a new Standby run on your Apify account, which takes a few seconds. Then it answers quickly, and it shuts down after about 5 idle minutes.
Is this server affiliated with Open Food Facts?
No. It reads their public API and credits contributors in every answer. The association behind the project does not endorse it.
Your feedback
Found a bug or a product that reads wrong? Tell us on the Issues tab. Wrong product data can be corrected on Open Food Facts itself, where anyone may edit.
More MCP servers, scrapers and data studies from the same team: mr-bridge.com.
Changelog
- 0.1.4: Output, dataset and key-value store schemas, as Apify asks for publication: the Output tab of a run started from the Console shows the connection details and one row per tool.
- 0.1.3: the Input tab shows the endpoint and how to connect an AI client, and a run started from the Console outputs the connection details and the tool list
- 0.1.2: pricing events tool-read and tool-action
- 0.1.1: healthier alternatives search only categories of the Open Food Facts taxonomy, never a tag typed as free text, and product answers name and list those categories first. A busy keyword search (HTTP 503) answers with the reason and the routes that still work. The ChatGPT
searchnow builds its request with the code offood_search_products(both already sent the same URL, so one cached answer serves both). - 0.1.0: initial build (private, unpublished)