GnistAI GnistAI
Log in

Open Food Facts

Food product database — barcode lookup, nutrition facts, Nutri-Score, ingredients.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 3 tools tools 3 3 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Food & Drink

Data source: Open Food Facts (community database)

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/openfoodfacts/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (3)

get_food_product

Look up a food product by barcode (EAN-13 or UPC-A).

Returns product name, brand, Nutri-Score, NOVA group, ingredients, and
full nutrition facts per 100g.

Args:
barcode: Product barcode (e.g. "3017620422003" for Nutella).

ParameterTypeRequiredDescription
barcodestringrequired
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_food_product",
    "arguments": {
      "barcode": "example"
    }
  }
}
search_food_products

Search the Open Food Facts database for food products by name.

Returns matching products with barcode, name, brand, and Nutri-Score.

Args:
query: Product name search (e.g. "nutella", "oat milk", "granola").
limit: Maximum number of results (1-50, default 10).

ParameterTypeRequiredDescription
querystringrequired
limitintegeroptional (default: 10)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_food_products",
    "arguments": {
      "query": "example"
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/openfoodfacts/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_food_product", "arguments": {"barcode": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/openfoodfacts/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_food_product",
    "arguments": {
      "barcode": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Food & Drink)

Resources