john-hu / untitled

0 stars 0 forks source link

API: spoonacular.com #11

Closed john-hu closed 2 years ago

john-hu commented 2 years ago

https://spoonacular.com/

Testing account: John Hu's email

john-hu commented 2 years ago

We can call the random recipe x 100 every day. It can enrich our DB.

john-hu commented 2 years ago

Example payload

{
  "recipes": [
    {
      "vegetarian": false,
      "vegan": false,
      "glutenFree": false,
      "dairyFree": false,
      "veryHealthy": false,
      "cheap": false,
      "veryPopular": false,
      "sustainable": false,
      "weightWatcherSmartPoints": 1,
      "gaps": "no",
      "lowFodmap": false,
      "aggregateLikes": 11,
      "spoonacularScore": 21,
      "healthScore": 1,
      "creditsText": "Foodista.com – The Cooking Encyclopedia Everyone Can Edit",
      "license": "CC BY 3.0",
      "sourceName": "Foodista",
      "pricePerServing": 12.65,
      "extendedIngredients": [
        {
          "id": 1123,
          "aisle": "Milk, Eggs, Other Dairy",
          "image": "egg.png",
          "consistency": "solid",
          "name": "eggs",
          "nameClean": "egg",
          "original": "3 eggs, slightly beaten",
          "originalString": "3 eggs, slightly beaten",
          "originalName": "eggs, slightly beaten",
          "amount": 3,
          "unit": "",
          "meta": [
            "slightly beaten"
          ],
          "metaInformation": [
            "slightly beaten"
          ],
          "measures": {
            "us": {
              "amount": 3,
              "unitShort": "",
              "unitLong": ""
            },
            "metric": {
              "amount": 3,
              "unitShort": "",
              "unitLong": ""
            }
          }
        },
        {
          "id": 20081,
          "aisle": "Baking",
          "image": "flour.png",
          "consistency": "solid",
          "name": "flour",
          "nameClean": "wheat flour",
          "original": "15 tablespoons flour - (a scant cup)",
          "originalString": "15 tablespoons flour - (a scant cup)",
          "originalName": "flour - (a scant cup)",
          "amount": 15,
          "unit": "tablespoons",
          "meta": [
            "(a scant cup)"
          ],
          "metaInformation": [
            "(a scant cup)"
          ],
          "measures": {
            "us": {
              "amount": 15,
              "unitShort": "Tbsps",
              "unitLong": "Tbsps"
            },
            "metric": {
              "amount": 15,
              "unitShort": "Tbsps",
              "unitLong": "Tbsps"
            }
          }
        },
        {
          "id": 1077,
          "aisle": "Milk, Eggs, Other Dairy",
          "image": "milk.png",
          "consistency": "liquid",
          "name": "milk",
          "nameClean": "milk",
          "original": "1 cup milk",
          "originalString": "1 cup milk",
          "originalName": "milk",
          "amount": 1,
          "unit": "cup",
          "meta": [],
          "metaInformation": [],
          "measures": {
            "us": {
              "amount": 1,
              "unitShort": "cup",
              "unitLong": "cup"
            },
            "metric": {
              "amount": 236.588,
              "unitShort": "ml",
              "unitLong": "milliliters"
            }
          }
        },
        {
          "id": 93713,
          "aisle": "Meat",
          "image": "roast-beef-slices.jpg",
          "consistency": "solid",
          "name": "roast beef",
          "nameClean": "roast beef",
          "original": "1/2 cup pan drippings from roast beef preferably",
          "originalString": "1/2 cup pan drippings from roast beef preferably",
          "originalName": "pan drippings from roast beef preferably",
          "amount": 0.5,
          "unit": "cup",
          "meta": [],
          "metaInformation": [],
          "measures": {
            "us": {
              "amount": 0.5,
              "unitShort": "cups",
              "unitLong": "cups"
            },
            "metric": {
              "amount": 118.294,
              "unitShort": "ml",
              "unitLong": "milliliters"
            }
          }
        },
        {
          "id": 2047,
          "aisle": "Spices and Seasonings",
          "image": "salt.jpg",
          "consistency": "solid",
          "name": "salt",
          "nameClean": "salt",
          "original": "1 teaspoon salt",
          "originalString": "1 teaspoon salt",
          "originalName": "salt",
          "amount": 1,
          "unit": "teaspoon",
          "meta": [],
          "metaInformation": [],
          "measures": {
            "us": {
              "amount": 1,
              "unitShort": "tsp",
              "unitLong": "teaspoon"
            },
            "metric": {
              "amount": 1,
              "unitShort": "tsp",
              "unitLong": "teaspoon"
            }
          }
        }
      ],
      "id": 665573,
      "title": "Yorkshire Pudding",
      "readyInMinutes": 45,
      "servings": 12,
      "sourceUrl": "http://www.foodista.com/recipe/KPRQCDW7/yorkshire-pudding",
      "image": "https://spoonacular.com/recipeImages/665573-556x370.jpg",
      "imageType": "jpg",
      "summary": "You can never have too many side dish recipes, so give Yorkshire Pudding a try. One serving contains <b>64 calories</b>, <b>3g of protein</b>, and <b>2g of fat</b>. For <b>13 cents per serving</b>, this recipe <b>covers 3%</b> of your daily requirements of vitamins and minerals. 11 person were impressed by this recipe. Head to the store and pick up eggs, salt, milk, and a few other things to make it today. From preparation to the plate, this recipe takes roughly <b>45 minutes</b>. All things considered, we decided this recipe <b>deserves a spoonacular score of 23%</b>. This score is not so great. Try <a href=\"https://spoonacular.com/recipes/yorkshire-pudding-775318\">Yorkshire Pudding</a>, <a href=\"https://spoonacular.com/recipes/yorkshire-pudding-247472\">Yorkshire Pudding</a>, and <a href=\"https://spoonacular.com/recipes/yorkshire-pudding-79167\">Yorkshire Pudding</a> for similar recipes.",
      "cuisines": [],
      "dishTypes": [
        "side dish"
      ],
      "diets": [],
      "occasions": [],
      "instructions": "<ol><li>Preheat oven to 400-450 F  depending on your oven, once you have made these a few times you will work out the best temperature.</li><li>Pass the flour and salt through a sieve and mix together, in a seperate bowl beat the eggs and milk then combine the two</li><li>Poor the dripping into your yorkshire tray, a muffin or cupcake tray would probably work too and place in the oven to get the oil nice and hot.</li><li>Take the oil out of the oven and spoon a couple of tablespoons into each section of your pan.</li><li>Place back in the oven and cook for 20 minutes or so. Do not open the oven once added, this is very important, if you don't leave them alone you will get flat doughy puddings.</li></ol>",
      "analyzedInstructions": [
        {
          "name": "",
          "steps": [
            {
              "number": 1,
              "step": "Preheat oven to 400-450 F  depending on your oven, once you have made these a few times you will work out the best temperature.Pass the flour and salt through a sieve and mix together, in a seperate bowl beat the eggs and milk then combine the two",
              "ingredients": [
                {
                  "id": 20081,
                  "name": "all purpose flour",
                  "localizedName": "all purpose flour",
                  "image": "flour.png"
                },
                {
                  "id": 1123,
                  "name": "egg",
                  "localizedName": "egg",
                  "image": "egg.png"
                },
                {
                  "id": 1077,
                  "name": "milk",
                  "localizedName": "milk",
                  "image": "milk.png"
                },
                {
                  "id": 2047,
                  "name": "salt",
                  "localizedName": "salt",
                  "image": "salt.jpg"
                }
              ],
              "equipment": [
                {
                  "id": 405600,
                  "name": "sieve",
                  "localizedName": "sieve",
                  "image": "strainer.png"
                },
                {
                  "id": 404783,
                  "name": "bowl",
                  "localizedName": "bowl",
                  "image": "bowl.jpg"
                },
                {
                  "id": 404784,
                  "name": "oven",
                  "localizedName": "oven",
                  "image": "oven.jpg",
                  "temperature": {
                    "number": 450,
                    "unit": "Fahrenheit"
                  }
                }
              ]
            },
            {
              "number": 2,
              "step": "Poor the dripping into your yorkshire tray, a muffin or cupcake tray would probably work too and place in the oven to get the oil nice and hot.Take the oil out of the oven and spoon a couple of tablespoons into each section of your pan.",
              "ingredients": [
                {
                  "id": 18139,
                  "name": "cupcakes",
                  "localizedName": "cupcakes",
                  "image": "plain-cupcake.jpg"
                },
                {
                  "id": 4582,
                  "name": "cooking oil",
                  "localizedName": "cooking oil",
                  "image": "vegetable-oil.jpg"
                }
              ],
              "equipment": [
                {
                  "id": 404671,
                  "name": "muffin tray",
                  "localizedName": "muffin tray",
                  "image": "muffin-tray.jpg"
                },
                {
                  "id": 404784,
                  "name": "oven",
                  "localizedName": "oven",
                  "image": "oven.jpg"
                }
              ]
            },
            {
              "number": 3,
              "step": "Place back in the oven and cook for 20 minutes or so. Do not open the oven once added, this is very important, if you don't leave them alone you will get flat doughy puddings.",
              "ingredients": [],
              "equipment": [
                {
                  "id": 404784,
                  "name": "oven",
                  "localizedName": "oven",
                  "image": "oven.jpg"
                }
              ],
              "length": {
                "number": 20,
                "unit": "minutes"
              }
            }
          ]
        }
      ],
      "originalId": null,
      "spoonacularSourceUrl": "https://spoonacular.com/yorkshire-pudding-665573"
    }
  ]
}