get_product
Pack: open-food-facts · Endpoint: https://gateway.pipeworx.io/open-food-facts/mcp
Get detailed food product info by barcode (EAN/UPC). Returns full nutrition facts, ingredients, Nutri-Score, allergens, and labels. Example: get_product(“3017620422003”) for Nutella.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
barcode | string | yes | Product barcode (EAN-13 or UPC-A, e.g., “3017620422003”) |
Example call
Arguments
{
"barcode": "3017620422003"
}
curl
curl -X POST https://gateway.pipeworx.io/open-food-facts/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_product","arguments":{"barcode":"3017620422003"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_product', {
"barcode": "3017620422003"
});
Response shape
Always returns: barcode, name, brands, categories, countries, quantity, ingredients, nutriscore, nova_group, ecoscore, allergens, labels, nutrition_per_100g, image_url
| Field | Type | Description |
|---|---|---|
barcode | string | null | Product barcode (EAN/UPC) |
name | string | null | Product name |
brands | string | null | Brand name(s) |
categories | string | null | Product categories |
countries | string | null | Countries of origin |
quantity | string | null | Product quantity/size |
ingredients | string | null | Ingredients list |
nutriscore | string | null | Nutri-Score grade (A-E) |
nova_group | number | null | NOVA processing group (1-4) |
ecoscore | string | null | Eco-Score grade |
allergens | string | null | Allergens present |
labels | string | null | Product labels/certifications |
nutrition_per_100g | object | null | Nutritional values per 100g |
image_url | string | null | Product image URL |
Full JSON Schema
{
"type": "object",
"properties": {
"barcode": {
"type": [
"string",
"null"
],
"description": "Product barcode (EAN/UPC)"
},
"name": {
"type": [
"string",
"null"
],
"description": "Product name"
},
"brands": {
"type": [
"string",
"null"
],
"description": "Brand name(s)"
},
"categories": {
"type": [
"string",
"null"
],
"description": "Product categories"
},
"countries": {
"type": [
"string",
"null"
],
"description": "Countries of origin"
},
"quantity": {
"type": [
"string",
"null"
],
"description": "Product quantity/size"
},
"ingredients": {
"type": [
"string",
"null"
],
"description": "Ingredients list"
},
"nutriscore": {
"type": [
"string",
"null"
],
"description": "Nutri-Score grade (A-E)"
},
"nova_group": {
"type": [
"number",
"null"
],
"description": "NOVA processing group (1-4)"
},
"ecoscore": {
"type": [
"string",
"null"
],
"description": "Eco-Score grade"
},
"allergens": {
"type": [
"string",
"null"
],
"description": "Allergens present"
},
"labels": {
"type": [
"string",
"null"
],
"description": "Product labels/certifications"
},
"nutrition_per_100g": {
"type": [
"object",
"null"
],
"description": "Nutritional values per 100g",
"properties": {
"energy_kcal": {
"type": [
"number",
"null"
],
"description": "Energy in kcal"
},
"fat_g": {
"type": [
"number",
"null"
],
"description": "Fat in grams"
},
"saturated_fat_g": {
"type": [
"number",
"null"
],
"description": "Saturated fat in grams"
},
"carbs_g": {
"type": [
"number",
"null"
],
"description": "Carbohydrates in grams"
},
"sugars_g": {
"type": [
"number",
"null"
],
"description": "Sugars in grams"
},
"fiber_g": {
"type": [
"number",
"null"
],
"description": "Dietary fiber in grams"
},
"protein_g": {
"type": [
"number",
"null"
],
"description": "Protein in grams"
},
"salt_g": {
"type": [
"number",
"null"
],
"description": "Salt in grams"
}
}
},
"image_url": {
"type": [
"string",
"null"
],
"description": "Product image URL"
}
},
"required": [
"barcode",
"name",
"brands",
"categories",
"countries",
"quantity",
"ingredients",
"nutriscore",
"nova_group",
"ecoscore",
"allergens",
"labels",
"nutrition_per_100g",
"image_url"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"open-food-facts": {
"url": "https://gateway.pipeworx.io/open-food-facts/mcp"
}
}
}
See Getting Started for client-specific install steps.