GnistAI GnistAI
Log in

Open Food Facts

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

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 3 tools tools 3 3 Food & Drink

Data source: Open Food Facts (community database)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/openfoodfacts/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-openfoodfacts": {
      "url": "https://context.gnist.ai/mcp/openfoodfacts/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
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"}}}'

API REST API

API Root https://context.gnist.ai/rest/openfoodfacts/

3 endpoints available:

Shell
curl "https://context.gnist.ai/rest/openfoodfacts/get_food_product?barcode=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/openfoodfacts/get_food_product",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "barcode": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc openfoodfacts

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (3)

get_food_product
Look up a food product by barcode (EAN-13 or UPC-A).
ParameterTypeRequiredDescription
barcodestringrequired
search_food_products
Search the Open Food Facts database for food products by name.
ParameterTypeRequiredDescription
querystringrequired
limitintegeroptional (default: 10)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related