Recipe - Food - Nutrition

FREEMIUM
Verified
By David | Updated 4 days ago | Food
Popularity

9.9 / 10

Latency

536ms

Service Level

100%

Health Check

N/A

Back to All Discussions

HTTP/1.1 500 Internal Server Error

Rapid account: 8603361873
8603361873
8 years ago

Hi Team,

I have an issue when try using Spoonacular API search with ingredients. Following the error thrown when i used. Please try to rectify and help us as soon as possible.

Contact us : vijay.p@pickzy.com

HTTP/1.1 500 Internal Server Error
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: : GET, HEAD, POST, OPTIONS, DELETE, PUT
Allow-Control-Allow-Methods: : GET, HEAD, POST, OPTIONS, DELETE, PUT
Allow-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 148
Content-Type: application/json
Date: Fri, 26 Aug 2016 13:57:57 GMT
Server: Mashape/5.0.6
X-Ratelimit-Autocompletes-Limit: 500
X-Ratelimit-Autocompletes-Remaining: 500
X-Ratelimit-Classifications-Limit: 50
X-Ratelimit-Classifications-Remaining: 49
X-Ratelimit-Requests-Limit: 50
X-Ratelimit-Requests-Remaining: 50

{
“status”: 500,
“code”: 0,
“message”: “We’re so sorry, something went wrong. If this error persists, please contact us.”,
“link”: “https://www.mashape.com/webknox/
}

Rapid account: Spoonacular
spoonacular Commented 8 years ago

You have to set your mashape key as a header. If that doesn’t work please contact mashape support as this is not something I have influence over.

Rapid account: 8603361873
8603361873 Commented 8 years ago

Hi team,

We have received the expected output as ingredients name as well with recipes. But now a small problem while running the API from our end.
Please find the input we have tried to run the API and we get the below error. Please Help.

Input:
<?php
require_once ‘unirest/src/Unirest.php’;

// These code snippets use an open-source library. http://unirest.io/php
$response = Unirest\Request::get(“https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/searchComplex?fillIngredients=true&includeIngredients=onions&limitLicense=true&number=100&offset=0&query=pizza&ranking=<required>”,array(“X-Mashape-Key” => “Lz1SaeW11KmshEhL6aNuInnItrnNp1Q5FB1jsnbFWaZDrZ4CBt”));

print_r($response);
?>

Error:
Unirest\Response Object ( [code] => 401 [raw_body] => [body] => [headers] => Array ( [{“message”] => “Missing Mashape application key. Go to http://docs.mashape.com/api-keys to learn how to get your API application key.”} ) )

Rapid account: Spoonacular
spoonacular Commented 8 years ago

set “fillIngredients” to true

Rapid account: 8603361873
8603361873 Commented 8 years ago

Hi David ,

We found this error “HTTP/1.1 500 Internal Server Error” on “Map Ingredients to Grocery Products”. Now we plan to use the complex search, we got the results on this search like this:
“results”: [
{
“id”: 98730,
“usedIngredientCount”: 3,
“missedIngredientCount”: 5,
“likes”: 0,
“title”: “Jalapeno Burger”,
“image”: “https://spoonacular.com/recipeImages/jalapeno-burger-2-98730.jpg”,
“imageType”: “jpg”,
“calories”: 481,
“protein”: “24g”,
“fat”: “26g”,
“carbs”: “39g”
},
]

On the above result got the ingredient count only like “usedIngredientCount”: 3,“missedIngredientCount”: 5. But our expectation is we need ingredient list that we are used for this recipes. like ingredient name, unit etc… this our expectation.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Hi, I still cannot reproduce the error. Which endpoint are you referring to? Is it complex search? (https://market.mashape.com/spoonacular/recipe-food-nutrition#complex-recipe-search)

Please list all the values for the parameters you are sending so I can try to reproduce the error.

Best,
David

Rapid account: 8603361873
8603361873 Commented 8 years ago

Hello Team,

As per our analysis of all APIs, while we search only ingredient count is getting as response.

We need that ingredient information that is used in that recipe.

Rapid account: 8603361873
8603361873 Commented 8 years ago

Hi team,

We need Recipe list and ingredient list with respect to the recipe when we search with these parameters.

Example:
Input Parameters: Cuisines, Ingredient, Recipe name, intolerances.

Whenever we give the input in search cuisines=chinese,
It should list all recipes with the ingredients list used in the recipe under chinese.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Assuming you mean this endpoint: https://market.mashape.com/spoonacular/recipe-food-nutrition#find-by-ingredients

Can you please let me know what you set for the parameters to get that error?

Join in the discussion - add comment below:

Login / Signup to post new comments