GnistAI GnistAI
Log in

Nutrition Data

Nutritional information for foods — calories, macros, vitamins. Search by name or barcode.

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 Health

Data source: Open Food Facts

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/nutrition/
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)

search_foods

Search food products by name, brand, or description and get nutritional information.

Args:
query: Search terms for food products (e.g. "granola", "orange juice", "Nutella").
limit: Number of results to return (1–50, default 10).

Returns:
Dictionary with 'count' and 'products' list. Each product has name, barcode, brands,
categories, image_url, nutriscore_grade, and nutrients (per 100g: energy_kcal, fat,
saturated_fat, carbohydrates, sugars, fiber, proteins, salt, sodium).

ParameterTypeRequiredDescription
querystringrequiredSearch terms for food products (e.g. "granola", "orange juice", "Nutella"). Searches product names, brands, and categories.
limitintegeroptionalNumber of results to return (1–50, default 10). (default: 10)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_foods",
    "arguments": {
      "query": "example"
    }
  }
}
get_product

Look up a specific food product by its barcode and get full nutritional details.

Args:
barcode: Product barcode (EAN/UPC, e.g. "3017620422003" for Nutella).

Returns:
Product record with name, barcode, brands, categories, image_url,
nutriscore_grade, and nutrients (per 100g).

ParameterTypeRequiredDescription
barcodestringrequiredProduct barcode (EAN/UPC, e.g. "3017620422003" for Nutella, "5449000000996" for Coca-Cola).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_product",
    "arguments": {
      "barcode": "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/nutrition/" \
  -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": "search_foods", "arguments": {"query": "example"}}}'
Python
import httpx

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

Related Toolkits (Health)

Resources