Skip to main content
POST
/
v1
/
nutrients
/
analyze
Analyze Nutrients
curl --request POST \
  --url https://api.mrcook.app/v1/nutrients/analyze \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "ingredients": [
    "500 grams ground beef",
    "4 slices bacon",
    "4 slices cheddar cheese",
    "4 hamburger buns"
  ],
  "servings": "4 servings"
}'
{
  "success": true,
  "data": {
    "calories": 550,
    "carbohydrates": 30.5,
    "protein": 45.2,
    "fat": 28.8,
    "sugar": 5.1,
    "confidence": 92
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
ingredients
string[]
required

An array of strings, where each string is one ingredient.

Minimum length: 1
Example:
[
"500 grams ground beef",
"4 slices bacon",
"4 slices cheddar cheese",
"4 hamburger buns"
]
servings
string

The number of servings the ingredients are for (e.g., '4 servings'). Defaults to 1 if not specified.

Example:

"4 servings"

Response

Successfully analyzed nutrients.

success
boolean
required
data
object
required
I