Recipe - Food - Nutrition

FREEMIUM
Verified
Durch David | Aktualisiert 25일 전 | Food
Popularität

9.9 / 10

Latenz

1,479ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

Find by Nutrients not showing the correct results

Rapid account: Gaianilu
gaianilu
8년 전

If I send this request
https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/findByIngredients?fillIngredients=false&ingredients=apples%2Cflour%2Csugar&limitLicense=false&number=5&ranking=1
almost all results are way out of the ranges I set in the request. Am I misinterpreting the results?

Rapid account: Spoonacular
spoonacular Commented 8년 전

Hi,

so the problem is that mashape did not use the correct camel casing. Please change in your request “minfat” to “minFat” and “mincarbs” to “minCarbs” etc. (also for calories and protein, min and max). I changed that again in mashape now, hope this time it sticks.

Also I added offset and limit parameters for paging.

Rapid account: Gaianilu
gaianilu Commented 8년 전

Also, in the same request findByNutrients is there a way to show more than the default 10 results? Now I’m only getting 10 random recipes while I would like to iterate over all the set of recipes which should be returned.

Rapid account: Gaianilu
gaianilu Commented 8년 전

For example with this request
https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/findByNutrients?maxcalories=250&maxcarbs=100&maxfat=20&maxprotein=100&mincalories=0&minCarbs=0&minfat=5&minProtein=0

I get recipes like
{
“id”: 167278,
“title”: “Double-Chocolate Cappuccino Cocoa”,
“image”: “https://spoonacular.com/recipeImages/Double-Chocolate-Cappuccino-Cocoa-167278.jpg”,
“imageType”: “jpg”,
“calories”: 394,
“protein”: “11g”,
“fat”: “25g”,
“carbs”: “36g”
}

where both calories and fat are out of the bounds I set. Almost all the results are like this.

Rapid account: Spoonacular
spoonacular Commented 8년 전

Hey Gaianilu,

I checked the request but could not understand what the problem you are having is. Could you please clarify?

Rapid account: Spoonacular
spoonacular Commented 8년 전

sorry for the delay, I will look into this issue shortly

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen