Full nutrition facts of a food

GET https://api.api.sh/food/v1/nutrition-facts
1 credit / call public data try it in the playground →

Every nutrient USDA FoodData Central lists for one food (often 50-150: macronutrients, vitamins, minerals, fatty and amino acids), per 100 g or scaled to an amount in grams or a named portion (cup, slice, tbsp...), with its portions and link.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
fdc_idrequired integer FoodData Central id (from /food/v1/nutrition). Example: 173944
grams number Amount in grams (default 100).
portion string A portion name instead, e.g. cup, slice, medium.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/food/v1/nutrition-facts?fdc_id=173944" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.