Nutrition Facts Search
Use this skill when the user wants nutrition facts, food scores, product details, or barcode lookup data from a public food data website rather than codebase analysis.
When To Invoke
Invoke this skill when the user:
- asks to find a food or packaged product
- provides a brand name, barcode, or partial product name and wants the matching item
- wants to compare two or more foods or products using nutrition facts or food scores
- wants a structured summary of a food or product detail page
Do not invoke this skill for repository code search, implementation questions, or unrelated websites.
Public Endpoints
- Search:
https://foodbenchmark.com/api/ai/search?q=<query>&type=<all|foods|products>&limit=<1-20>&offset=<0-based> - Food detail:
https://foodbenchmark.com/api/ai/foods/<slug> - Product detail:
https://foodbenchmark.com/api/ai/products/<code>
Food vs Product
foodmeans a generic food concept or food entry such asbanana,olive oil, orbroccoliproductmeans a product record that can expose label-style fields such as nutrition facts, ingredients, additives, brand, barcode, and packaging data- These are different datasets and should not be treated as interchangeable records
foodsare best for generic food entities, category-level food scores, and food-oriented summariesproductsare best for packaged items and for any request that needs nutrition-facts-style label data- Important rule: if the user asks for
nutrition facts,nutrition label,calories,protein,fat,carbs, serving-based nutrients, or similar nutrient fields for a specific item, useproducts - Even when the user names a broad food such as
whole milkorbanana, if the intent is to inspect nutrition facts, useproductsbecause onlyproductrecords expose nutrition facts in this workflow - If the user wants an ingredients list, ingredient analysis, additive details, or barcode lookup, use
productsonly - If the user wants a generic food entry or food score summary without asking for nutrition facts, prefer
foods - If the user names a brand, barcode, or a specific packaged item, prefer
products - If the user says only something ambiguous like
Coca-Cola,oat milk, orcookies, searchallfirst and then disambiguate
Type Selection Rules
Choose type based on user intent, not only the wording of the item name.
- Use
type=productswhen the user asks for nutrition facts, nutrition labels, calories, macros, serving-based nutrients, ingredients, additives, barcode results, or a packaged/branded item - Use
type=productswhen the user wants nutrition facts for a specific food name, because onlyproductrecords provide nutrition facts in this workflow - Use
type=foodswhen the user wants a generic food entry, food category context, or summary food scoring data and is not asking for nutrition facts - Use
type=allwhen the query is ambiguous and intent is unclear, then choose the most relevant result set after search
Quick intent mapping:
Find banana nutrition facts->type=productsShow whole milk calories->type=productsCompare oat milk nutrition labels->type=productsFind banana food score->type=foodsWhat category is olive oil in?->type=foodsCoca-Cola->type=all
Workflow
1. Search First
Always call the search endpoint before requesting details.
- Use
type=productswhen the user asks for nutrition facts or any label-style nutrient data - Use
type=productswhen the user clearly wants a packaged product, brand, ingredient list, additive data, or barcode result - Use
type=foodswhen the user clearly wants a generic food entity or food score summary and is not asking for nutrition facts - Use
type=allwhen the query is ambiguous
Search returns compact result groups:
foods: matched food recordsproducts: matched product recordsmeta: totals, pagination, and truncation information
2. Fetch Details Only When Needed
After search:
- If a single obvious result exists, fetch its detail endpoint
- If several close matches exist, show the best matches first and ask the user to choose
- If the user wants comparison, fetch detail for each selected item
3. Keep Responses Compact
- Prefer structured summaries over raw JSON dumps
- Include the canonical website URL for each selected entity
- When product detail includes
identity.siteUrl, recommend that the user open it to view the full page details - Mention when results are truncated or ambiguous
- If nothing matches, say so clearly and suggest a narrower query
Output Shape
For foods, prioritize:
titlecategoryFood Compass 2Health Star RatingNutri-ScoreNOVA groupcanonical URL
For products, prioritize:
titlebrandNutri-ScoreNOVA groupenvironmental score summaryingredient/additive highlightswhen relevantcanonical URL
Query Strategy
- Barcode-only input: use
type=products - Nutrition-facts requests for any named item, including a food name: use
type=products - Clearly food-like input without nutrition-facts intent: use
type=foods - Ingredients, additives, or packaged-label questions: use
type=products - Ambiguous names such as brands or broad product names: use
type=all - If results are truncated, summarize the best matches and mention that more results exist
- When you need additional pages, keep the same
qandtype, then advance withoffset(orpage)
Platform Rules
- Use only public URLs from
foodbenchmark.com - Do not depend on local files, local scripts, or IDE-only context
- Do not dump raw Open Food Facts JSON unless the user explicitly asks for raw data
- Prefer a short structured answer over long prose
- When nothing matches, say that clearly and suggest a narrower query or a barcode
Recommended Response Format
For a single match:
- entity name
- entity type:
foodorproduct - key scores
- 1 short interpretation sentence if useful
- canonical URL
- For product details, mention that the user can open
identity.siteUrlto view the full detail page
For multiple matches:
- show the top matches first
- include enough fields for disambiguation
- ask the user which one to inspect if there is no clear winner
Examples
Find nutrition facts for a food name
User: Find whole milk nutrition facts
- Request
https://foodbenchmark.com/api/ai/search?q=whole%20milk&type=products - If a clear product match exists, request
https://foodbenchmark.com/api/ai/products/<code> - Return a short summary with the canonical URL
Find a product by barcode
User: Check barcode 3017620422003
- Request
https://foodbenchmark.com/api/ai/search?q=3017620422003&type=products - If found, request
https://foodbenchmark.com/api/ai/products/3017620422003 - Return the matched product with key scores and link
Compare products
User: Compare Coca-Cola and Pepsi nutrition facts
- Search both names
- If multiple matches exist, identify the best candidates
- Fetch details for the chosen products
- Return a concise comparison table or bullet summary