Calories and macros for a food, dish or product, for the amount the user says
get_food_nutritionCalories and macros for a food, dish or product, for the amount the user says. Use for "how many calories in a Big Mac?", "protein in 200g chicken breast", "calories in chicken biryani", "a slice of pepperoni pizza", "a large latte" or a whole meal like "2 eggs, 2 slices of toast and a coffee". Put the whole amount and food in q, or pass grams or servings separately. Generic foods and dishes (thousands, including fast food and restaurant dishes) use USDA values with real portion weights (slice, cup, small, medium, large, one item); brands come from Open Food Facts. Chain items ("McDonald's large fries", "a Greggs sausage roll", "KFC Zinger burger", "grande latte from Starbucks", "6 inch Italian BMT from Subway", "20 piece McNuggets") use the chain's own published figures for that size, UK or US by country, and return a chain object (name, region, item, size, weight_published); when the chain doesn't publish a weight, amount.grams is null and per_100 values are null. For a chain item not in the table, a typical USDA version is used and the say line says so. A whole meal returns items (each food with its amount and nutrition) and total. Returns nutrition for the amount, per_100 values, portions, UK traffic lights (per 100 g, or per 100 ml for drinks) and caffeine_mg for drinks that have it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | The food or meal, optionally with amounts, for example 200g chicken breast, a large banana, or 2 eggs and a slice of toast. | |
| grams | No | Amount in grams (1 to 5000). Overrides any amount in q. | |
| country | No | Two-letter country code. Picks UK or US chain figures (GB and IE get UK ones) and prefers local versions of branded products. Default from the request. | |
| servings | No | Number of servings or items (0.25 to 20). |