Recipe - Food - Nutrition

FREEMIUM
Verified
Por David | Atualizado 24 days ago | Food
Popularidade

9.9 / 10

Latência

1,410ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

How to get the recipes for the category?

Rapid account: Wsawalhi
wsawalhi
7 years ago

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 years ago

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 years ago

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 years ago

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

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários