Recipe - Food - Nutrition

免费增值
Verified
通过 David | 已更新 24日前 | Food
人气

9.9 / 10

延迟

1,479ms

服务等级

100%

Health Check

N/A

返回所有讨论

How to get the recipes for the category?

Rapid account: Wsawalhi
wsawalhi
7年前

Hi

I used the Search Recipes API to get the recipes for the category such as breakfast, lunch, dinner, dessert, vegan, healthy, salad, soups, drinks.
I filled the Type field with one of categories.
But I didn’t get any result.

And I didn’t get the same result when I call this API with the parameters in doc.
Request:
https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/search?diet=vegetarian&excludeIngredients=coconut&intolerances=egg%2C+gluten&limitLicense=false&number=10&offset=0&query=burger&type=main+course

Result:
{
“results”: [],
“baseUri”: “https://spoonacular.com/recipeImages/”,
“offset”: 0,
“number”: 10,
“totalResults”: 0,
“processingTimeMs”: 381,
“expires”: 1480487790002,
“isStale”: false
}

My Requirements:

  1. Is this API right to get the recipes for the category?
  2. If this API is not right, please tell me what API I should use.
  3. If this API is right, please check the sample request and tell me how to use this API.

Thanks.

Rapid account: Spoonacular
spoonacular Commented 7年前

All this information comes when you call the recipe information endpoint or you can use the complex search endpoint and set the addRecipeInformation parameter to true.

Best,
David

Rapid account: Wsawalhi
wsawalhi Commented 7年前

Hi

I want to get the recipes for the several kinds of category such as breakfast, lunch, dinner, dessert, vegan, healthy, salad, soups, drinks.
Please let me know about the API for that.

Thanks

Rapid account: Spoonacular
spoonacular Commented 7年前

Hi,

  1. Yes it is, your example request also works for me. I get burgers (which are main courses) as responses.
  2. does not apply (you can however also use the complex search endpoint for more options)
  3. You use it correctly. Maybe I didn’t quite understand you current problem. Please let me know if I’m not understanding something correctly.

Best,
David

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论