GnistAI GnistAI
Log in

Nutrition Data

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

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 3 tools tools 3 3 Health

Data source: Open Food Facts

MCP MCP Protocol

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

API REST API

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

3 endpoints available:

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

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

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc nutrition

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

Install
pip install gnistai

Available Tools (3)

search_foods
Search food products by name, brand, or description and get nutritional information.
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)
get_product
Look up a specific food product by its barcode and get full nutritional details.
ParameterTypeRequiredDescription
barcodestringrequiredProduct barcode (EAN/UPC, e.g. "3017620422003" for Nutella, "5449000000996" for Coca-Cola).
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related