### Get Recipe Information Request Example Source: https://spoonacular.com/food-api/docs This example shows how to retrieve detailed information for a specific recipe using its ID. The request is a GET request to the /recipes/{id}/information endpoint, where {id} should be replaced with the actual recipe ID. ```http GET https://api.spoonacular.com/recipes/{id}/information ``` -------------------------------- ### Get Recipe Information Bulk - API Request Example Source: https://spoonacular.com/food-api/docs This is an example of an HTTP GET request to the 'Get Recipe Information Bulk' endpoint. It demonstrates how to pass a comma-separated list of recipe IDs as a query parameter. ```http GET https://api.spoonacular.com/recipes/informationBulk?ids=715538,716429 ``` -------------------------------- ### Search Restaurants API Request Example (GET) Source: https://spoonacular.com/food-api/docs This example demonstrates how to make a GET request to the Spoonacular API to search for restaurants. It includes common parameters like cuisine and location. The response is a JSON object containing a list of restaurants. ```http GET https://api.spoonacular.com/food/restaurants/search?cuisine=italian&lat=37.7786357&lng=-122.3918135 ``` -------------------------------- ### Get Recipe Information with Parameters (API Request) Source: https://spoonacular.com/food-api/docs This example demonstrates how to make a GET request to the Spoonacular API to retrieve detailed information about a specific recipe. It includes optional parameters like `includeNutrition`, `addWinePairing`, and `addTasteData` to customize the response. ```http GET https://api.spoonacular.com/recipes/716429/information?includeNutrition=false ``` -------------------------------- ### Get Recipe Price Breakdown (JSON Example) Source: https://spoonacular.com/food-api/docs This snippet shows an example JSON response for the recipe price breakdown endpoint. It includes details about each ingredient's amount, image, name, and price, along with the total cost and cost per serving. This data can be used to display pricing information for recipes. ```json { "ingredients": [ { "amount": { "metric": { "unit": "g", "value": 222.0 }, "us": { "unit": "cups", "value": 1.5 } }, "image": "blueberries.jpg", "name": "blueberries", "price": 174.43 }, { "amount": { "metric": { "unit": "", "value": 1.0 }, "us": { "unit": "", "value": 1.0 } }, "image": "egg-white.jpg", "name": "egg white", "price": 18.21 }, { "amount": { "metric": { "unit": "Tbsps", "value": 2.0 }, "us": { "unit": "Tbsps", "value": 2.0 } }, "image": "flour.png", "name": "flour", "price": 2.0 }, { "amount": { "metric": { "unit": "g", "value": 150.0 }, "us": { "unit": "cup", "value": 0.75 } }, "image": "sugar-in-bowl.png", "name": "granulated sugar", "price": 20.67 }, { "amount": { "metric": { "unit": "tsp", "value": 1.0 }, "us": { "unit": "tsp", "value": 1.0 } }, "image": "lemon-juice.jpg", "name": "fresh lemon juice", "price": 3.39 }, { "amount": { "metric": { "unit": "pinch", "value": 1.0 }, "us": { "unit": "pinch", "value": 1.0 } }, "image": "ground-nutmeg.jpg", "name": "nutmeg", "price": 7.39 }, { "amount": { "metric": { "unit": "", "value": 2.0 }, "us": { "unit": "", "value": 2.0 } }, "image": "pie-crust.jpg", "name": "pie dough round", "price": 364.29 }, { "amount": { "metric": { "unit": "Tbsps", "value": 2.0 }, "us": { "unit": "Tbsps", "value": 2.0 } }, "image": "tapioca-pearls.png", "name": "quick cooking tapioca", "price": 50.89 }, { "amount": { "metric": { "unit": "g", "value": 305.0 }, "us": { "unit": "cups", "value": 2.5 } }, "image": "rhubarb.jpg", "name": "trimmed rhubarb", "price": 185.18 }, { "amount": { "metric": { "unit": "Tbsps", "value": 0.5 }, "us": { "unit": "Tbsps", "value": 0.5 } }, "image": "butter-sliced.jpg", "name": "unsalted butter", "price": 6.0 } ], "totalCost": 832.45, "totalCostPerServing": 104.06 } ``` -------------------------------- ### Example GET Request for Meal Planner Week Source: https://spoonacular.com/food-api/docs This snippet shows an example GET request to the Spoonacular API for retrieving a weekly meal plan. It requires a username, a start date in 'yyyy-mm-dd' format, and a private hash for authentication. The response is a JSON object containing daily nutrition summaries and planned food items. ```HTTP GET https://api.spoonacular.com/mealplanner/dsky/week/2020-06-01?hash=4b5v4398573406 ``` -------------------------------- ### Get Recipe Information - Quota Example Source: https://spoonacular.com/food-api/docs This snippet illustrates the quota points required for the 'Get Recipe Information' endpoint. It specifies base costs and additional costs for optional parameters like 'includeNutrition' and 'addWinePairing'. ```text Calling this endpoint requires 1 point and 0.1 points if `includeNutrition` is true + 1 point if `addWinePairing` is true and + 0.5 points if `addTasteData` is true.. Learn more about quotas. ``` -------------------------------- ### Get Recipe Information Bulk - Quota Example Source: https://spoonacular.com/food-api/docs This snippet outlines the quota points for the 'Get Recipe Information Bulk' endpoint. It details the cost per recipe, with a higher cost for the first recipe and a lower cost for subsequent recipes. ```text Calling this endpoint requires 1 point for the first recipe and 0.5 points for every additional recipe returned. Learn more about quotas. ``` -------------------------------- ### GET /mealplanner/{username}/week/{start-date} Source: https://spoonacular.com/food-api/docs Get a weekly meal plan for a specific user. Requires username, start date, and a private hash. ```APIDOC ## GET /mealplanner/{username}/week/{start-date} ### Description Retrieves a weekly meal plan for a given user, starting from a specified date. This endpoint is useful for generating personalized meal suggestions. ### Method GET ### Endpoint `/mealplanner/{username}/week/{start-date}` ### Parameters #### Path Parameters - **username** (string) - Required - The username for whom the meal plan is generated. - **start-date** (string) - Required - The start date of the meal planned week in the format yyyy-mm-dd. #### Query Parameters - **hash** (string) - Required - The private hash for the username, used for authentication and authorization. ### Request Example ``` GET https://api.spoonacular.com/mealplanner/dsky/week/2020-06-01?hash=4b5v4398573406 ``` ### Response #### Success Response (200) - **days** (array) - An array of objects, where each object represents a day in the meal plan. - **nutritionSummary** (object) - A summary of the nutritional information for the day. - **nutrients** (array) - An array of nutrient objects (e.g., Calories, Fat, Carbohydrates, Protein). - **nutritionSummaryBreakfast** (object) - Nutritional summary for breakfast. - **nutritionSummaryLunch** (object) - Nutritional summary for lunch. - **nutritionSummaryDinner** (object) - Nutritional summary for dinner. - **date** (integer) - The date of the day in Unix timestamp format. - **day** (string) - The name of the day (e.g., "Monday"). - **items** (array) - An array of food items planned for the day. - **id** (integer) - The ID of the food item. - **slot** (integer) - The slot number for the item (e.g., breakfast, lunch, dinner). - **position** (integer) - The position of the item within the slot. - **type** (string) - The type of the item (e.g., "RECIPE", "CUSTOM_FOOD"). - **value** (object) - Details about the food item. - **servings** (integer) - Number of servings. - **id** (integer) - The ID of the recipe or food. - **title** (string) - The title of the recipe or food. - **imageType** (string) - The image type of the food item. #### Response Example ```json { "days": [ { "nutritionSummary": { "nutrients": [ { "name": "Calories", "amount": 310, "unit": "cal", "percentOfDailyNeeds": 16 }, { "name": "Fat", "amount": 25, "unit": "g", "percentOfDailyNeeds": 38 }, { "name": "Carbohydrates", "amount": 1, "unit": "g", "percentOfDailyNeeds": 0 }, { "name": "Protein", "amount": 20, "unit": "g", "percentOfDailyNeeds": 40 } ] }, "nutritionSummaryBreakfast": { "nutrients": [ { "name": "Calories", "amount": 0, "unit": "cal", "percentOfDailyNeeds": 0 }, { "name": "Fat", "amount": 0, "unit": "g", "percentOfDailyNeeds": 0 }, { "name": "Carbohydrates", "amount": 0, "unit": "g", "percentOfDailyNeeds": 0 }, { "name": "Protein", "amount": 0, "unit": "g", "percentOfDailyNeeds": 0 } ] }, "nutritionSummaryLunch": { "nutrients": [ { "name": "Calories", "amount": 310, "unit": "cal", "percentOfDailyNeeds": 16 }, { "name": "Fat", "amount": 25, "unit": "g", "percentOfDailyNeeds": 38 }, { "name": "Carbohydrates", "amount": 1, "unit": "g", "percentOfDailyNeeds": 0 }, { "name": "Protein", "amount": 20, "unit": "g", "percentOfDailyNeeds": 40 } ] }, "nutritionSummaryDinner": { "nutrients": [ { "name": "Calories", "amount": 0, "unit": "cal", "percentOfDailyNeeds": 0 }, { "name": "Fat", "amount": 0, "unit": "g", "percentOfDailyNeeds": 0 }, { "name": "Carbohydrates", "amount": 0, "unit": "g", "percentOfDailyNeeds": 0 }, { "name": "Protein", "amount": 0, "unit": "g", "percentOfDailyNeeds": 0 } ] }, "date": 1589155200, "day": "Monday", "items": [ { "id": 1976489, "slot": 1, "position": 1, "type": "RECIPE", "value": { "servings": 2, "id": 1023004, "title": "Foolproof Meatloaf", "imageType": "" } }, { "id": 1976490, "slot": 2, "position": 2, "type": "CUSTOM_FOOD", "value": { "servings": 1, "title": "Custom Food Item", "imageType": "" } } ] } ] } ``` ``` -------------------------------- ### Get Recipe Information - Example Data Structure Source: https://spoonacular.com/food-api/docs This snippet shows the structure of recipe information returned by the Spoonacular API, including ingredient details, summary, and wine pairing suggestions. It details properties like 'aisle', 'amount', 'measures', 'summary', and 'winePairing'. ```json { "aisle": "Pasta and Rice", "amount": 0.25, "consistency": "solid", "id": 99025, "image": "breadcrumbs.jpg", "measures": { "metric": { "amount": 59.147, "unitLong": "milliliters", "unitShort": "ml" }, "us": { "amount": 0.25, "unitLong": "cups", "unitShort": "cups" } }, "meta": [ "whole wheat", "(I used panko)" ], "name": "whole wheat bread crumbs", "original": "1/4 cup whole wheat bread crumbs (I used panko)", "originalName": "whole wheat bread crumbs (I used panko)", "unit": "cup" } ], "summary": "Pasta with Garlic, Scallions, Cauliflower & Breadcrumbs might be a good recipe to expand your main course repertoire. One portion of this dish contains approximately 19g of protein , 20g of fat , and a total of 584 calories . For $1.63 per serving , this recipe covers 23% of your daily requirements of vitamins and minerals. This recipe serves 2. It is brought to you by fullbellysisters.blogspot.com. 209 people were glad they tried this recipe. A mixture of scallions, salt and pepper, white wine, and a handful of other ingredients are all it takes to make this recipe so scrumptious. From preparation to the plate, this recipe takes approximately 45 minutes . All things considered, we decided this recipe deserves a spoonacular score of 83% . This score is awesome. If you like this recipe, take a look at these similar recipes: Cauliflower Gratin with Garlic Breadcrumbs, < href=\"https://spoonacular.com/recipes/pasta-with-cauliflower-sausage-breadcrumbs-30437\">Pasta With Cauliflower, Sausage, & Breadcrumbs, and Pasta With Roasted Cauliflower, Parsley, And Breadcrumbs.", "winePairing": { "pairedWines": [ "chardonnay", "gruener veltliner", "sauvignon blanc" ], "pairingText": "Chardonnay, Gruener Veltliner, and Sauvignon Blanc are great choices for Pasta. Sauvignon Blanc and Gruner Veltliner both have herby notes that complement salads with enough acid to match tart vinaigrettes, while a Chardonnay can be a good pick for creamy salad dressings. The Buddha Kat Winery Chardonnay with a 4 out of 5 star rating seems like a good match. It costs about 25 dollars per bottle.", "productMatches": [ { "id": 469199, "title": "Buddha Kat Winery Chardonnay", "description": "We barrel ferment our Chardonnay and age it in a mix of Oak and Stainless. Giving this light bodied wine modest oak character, a delicate floral aroma, and a warming finish.", "price": "$25.0", "imageUrl": "https://img.spoonacular.com/products/469199-312x231.jpg", "averageRating": 0.8, "ratingCount": 1.0, "score": 0.55, "link": "https://www.amazon.com/2015-Buddha-Kat-Winery-Chardonnay/dp/B00OSAVVM4?tag=spoonacular-20" } ] } } ``` -------------------------------- ### GET /recipes/{id}/analyzedInstructions Source: https://spoonacular.com/food-api/docs Get an analyzed breakdown of a recipe's instructions. Each step is enriched with the ingredients and equipment required. ```APIDOC ## GET /recipes/{id}/analyzedInstructions ### Description Get an analyzed breakdown of a recipe's instructions. Each step is enriched with the ingredients and equipment required. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/analyzedInstructions ### Parameters #### Path Parameters - **id** (number) - Required - The recipe ID. ### Headers - **Content-Type**: application/json ``` -------------------------------- ### GET /recipes/{id}/equipmentWidget.json Source: https://spoonacular.com/food-api/docs Get a recipe's equipment list. This endpoint returns a list of kitchen equipment required to make a specific recipe. ```APIDOC ## GET /recipes/{id}/equipmentWidget.json ### Description Get a recipe's equipment list. This endpoint returns a list of kitchen equipment required to make a specific recipe. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/equipmentWidget.json ### Parameters #### Path Parameters - **`id`** (number) - Required - The recipe id. ### Response #### Success Response (200) - **`equipment`** (array) - A list of equipment objects, each containing the name and other details of a piece of equipment. #### Response Example ```json { "equipment": [ { "id": 404750, "name": "baking sheet", "localizedName": "baking sheet", "image": "baking-sheet.png", "temperature": { "number": 400, "unit": "Fahrenheit" } } ] } ``` ``` -------------------------------- ### Complex Recipe Search Request Example Source: https://spoonacular.com/food-api/docs This example demonstrates how to perform a complex search for recipes using the Spoonacular API. It includes parameters for query, maximum fat content, and the number of results. The response provides a list of matching recipes with basic information. ```http GET https://api.spoonacular.com/recipes/complexSearch?query=pasta&maxFat=25&number=2 ``` -------------------------------- ### POST /recipes/visualizeEquipment Source: https://spoonacular.com/food-api/docs Visualizes the equipment needed for a recipe. The response is HTML. ```APIDOC ## POST /recipes/visualizeEquipment ### Description Visualizes the equipment needed for a recipe. The response is HTML. ### Method POST ### Endpoint https://api.spoonacular.com/recipes/visualizeEquipment ### Parameters #### Query Parameters - **instructions** (string) - Required - The recipe's instructions. - **view** (string) - Optional - How to visualize the equipment, either "grid" or "list". - **defaultCss** (boolean) - Optional - Whether the default CSS should be added to the response. - **showBacklink** (boolean) - Optional - Whether to show a backlink to spoonacular. If set false, this call counts against your quota. ### Request Example ```json { "instructions": "Preheat oven. Cut cucumber with a knife and put in a blender.", "view": "grid", "defaultCss": true, "showBacklink": true } ``` ### Response #### Success Response (200) - **HTML** - The recipe's equipment visualization in HTML format. #### Response Example ```html /* HTML response */ ``` ``` -------------------------------- ### Visualize Equipment API Request (HTML) Source: https://spoonacular.com/food-api/docs This snippet demonstrates a POST request to the Spoonacular API to visualize recipe equipment. It requires an 'instructions' parameter and accepts optional 'view', 'defaultCss', and 'showBacklink' parameters. The response is in HTML format. ```html POST https://api.spoonacular.com/recipes/visualizeEquipment /* HTML response */ ``` -------------------------------- ### Get Shopping List (GET) Source: https://spoonacular.com/food-api/docs Retrieves the shopping list for a user from their meal planner. Requires username and hash. Returns a JSON object containing aisles, cost, start date, and end date. ```HTTP GET https://api.spoonacular.com/mealplanner/dsky/shopping-list ``` ```JSON { "aisles": [ { "aisle": "Baking", "items": [ { "id": 115388, "name": "baking powder", "measures": { "original": { "amount": 1.0, "unit": "package" }, "metric": { "amount": 1.0, "unit": "pkg" }, "us": { "amount": 1.0, "unit": "pkg" } }, "pantryItem": false, "aisle": "Baking", "cost": 0.71, "ingredientId": 18369 } ] } ], "cost": 1.43, "startDate": 1588291200, "endDate": 1588896000 } ``` -------------------------------- ### POST /recipes/visualizeEquipment Source: https://spoonacular.com/food-api/docs Generates an HTML widget visualizing the equipment used to make a recipe. ```APIDOC ## POST /recipes/visualizeEquipment ### Description Visualize the equipment used to make a recipe. You can play around with that endpoint! ### Method POST ### Endpoint https://api.spoonacular.com/recipes/visualizeEquipment ### Parameters #### Request Body Parameters - **ingredientList** (string) - Required - The ingredient list of the recipe, one ingredient per line. - **servings** (number) - Required - The number of servings. ### Request Example ``` { "ingredientList": "3 oz flour", "servings": 2 } ``` ### Response #### Success Response (200) - Content-Type: text/html - The response will be an HTML string representing the equipment widget. #### Response Example ```html ``` ``` -------------------------------- ### Basic HTML Structure for Recipe Search App Source: https://spoonacular.com/food-api/docs Sets up the fundamental HTML for a recipe search application. Includes an input field for search queries, a button to initiate the search, and a div to display results. The script tag is placed at the end of the body to ensure HTML elements are loaded before execution. ```html Spoonacular Recipe Search App

Spoonacular Recipe Search

``` -------------------------------- ### POST /recipes/analyzeInstructions Source: https://spoonacular.com/food-api/docs Analyze recipe instructions to break them down into atomic steps, identifying ingredients and equipment for each step and overall. ```APIDOC ## POST /recipes/analyzeInstructions ### Description This endpoint allows you to break down instructions into atomic steps. Furthermore, each step will contain the ingredients and equipment required. Additionally, all ingredients and equipment from the recipe's instructions will be extracted independently of the step they're used in. ### Method POST ### Endpoint https://api.spoonacular.com/recipes/analyzeInstructions ### Parameters #### Request Body - **instructions** (string) - Required - The instructions to analyze, one step per line (separate lines with \n). - **ingredients** (string) - Optional - The ingredients of the recipe, one ingredient per line (separate lines with \n). - **title** (string) - Optional - The title of the recipe. - **url** (string) - Optional - The URL of the recipe. - **summary** (string) - Optional - A summary of the recipe. - **mask** (string) - Optional - The mask to put over the recipe image ("ellipseMask", "diamondMask", "starMask", "heartMask", "potMask", "fishMask"). - **backgroundImage** (string) - Optional - The background image ("none","background1", or "background2"). - **backgroundColor** (string) - Optional - The background color for the recipe card as a hex-string. - **fontColor** (string) - Optional - The font color for the recipe card as a hex-string. - **source** (string) - Optional - The source of the recipe. ### Request Example ```json { "instructions": "1. Chop onions. 2. Sauté onions in a pan. 3. Add tomatoes and simmer.", "ingredients": "1 onion\n2 tomatoes", "title": "Simple Tomato Sauce" } ``` ### Response #### Success Response (200) - **parsedInstructions** (array) - An array of objects, where each object represents a step in the recipe and contains its ingredients and equipment. - **ingredients** (array) - An array of all ingredients used in the recipe. - **equipment** (array) - An array of all equipment used in the recipe. #### Response Example ```json { "parsedInstructions": [ { "steps": [ { "number": 1, "step": "Chop the onions.", "ingredients": [ { "id": 1001, "name": "onion", "localizedName": "onion", "image": "onion.png" } ], "equipment": [ { "id": 4001, "name": "knife", "localizedName": "knife", "image": "knife.png" }, { "id": 4002, "name": "cutting board", "localizedName": "cutting board", "image": "cutting-board.png" } ] } ] } ], "ingredients": [ { "id": 1001, "name": "onion", "localizedName": "onion", "image": "onion.png" } ], "equipment": [ { "id": 4001, "name": "knife", "localizedName": "knife", "image": "knife.png" } ] } ``` ``` -------------------------------- ### Get Recipe Summary API Response (JSON) Source: https://spoonacular.com/food-api/docs This snippet shows an example JSON response from the Spoonacular API's 'Summarize Recipe' endpoint. It includes the recipe's ID, a detailed summary, and its title. ```json { "id": 4632, "summary": "The recipe Soy-and-Ginger-Glazed Salmon with Udon Noodles can be made in approximately 1 hour and 35 minutes . One portion of this dish contains about 48g of protein , 17g of fat , and a total of 552 calories . This recipe serves 4. For $5.91 per serving , this recipe covers 47% of your daily requirements of vitamins and minerals. It works well as a main course. 1 person has tried and liked this recipe. It is brought to you by Food and Wine. If you have fresh ginger, udon noodles, salmon fillets, and a few other ingredients on hand, you can make it. It is a good option if you're following a dairy free and pescatarian diet. All things considered, we decided this recipe deserves a spoonacular score of 92% . This score is great. If you like this recipe, take a look at these similar recipes: Salmon With Soy-ginger Noodles, Ginger-Soy Salmon With Soba Noodles, and Soy & ginger salmon with soba noodles.", "title": "Soy-and-Ginger-Glazed Salmon with Udon Noodles" } ``` -------------------------------- ### Constructing a Spoonacular Recipe Search API Request Source: https://spoonacular.com/food-api/docs This example demonstrates how to construct a URL for the Spoonacular 'Search Recipes' API. It includes essential parameters like the search query, number of results, a flag to add nutrition information, and the API key for authentication. The API returns results in JSON format. ```URL https://api.spoonacular.com/recipes/complexSearch?query=burger&number=5&addRecipeNutrition=true&apiKey=YOUR_API_KEY ``` -------------------------------- ### Equipment by ID Widget Source: https://spoonacular.com/food-api/docs Visualize a recipe's equipment list as an HTML widget. ```APIDOC ## GET /recipes/{id}/equipmentWidget ### Description Visualizes a recipe's equipment list as an HTML widget. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/equipmentWidget ### Parameters #### Path Parameters - **id** (number) - Required - The ID of the recipe. #### Query Parameters - **defaultCss** (boolean) - Optional - Whether to include the default CSS in the response. Defaults to true. ### Request Example ``` GET https://api.spoonacular.com/recipes/44860/equipmentWidget?defaultCss=true ``` ### Response #### Success Response (200) - **Content-Type**: text/html - The response body will be an HTML string representing the equipment widget. #### Response Example ```html ``` #### Quotas This endpoint requires 1 point. ``` -------------------------------- ### Food Search API Request Example Source: https://spoonacular.com/food-api/docs Demonstrates a GET request to the Spoonacular Food API to search for food items. It includes query parameters for the search term and the number of results. The API returns a JSON object containing search results categorized by type (Recipes, Products, Menu Items, Articles, Videos, Simple Foods). ```HTTP GET https://api.spoonacular.com/food/search?query=apple&number=2 ``` -------------------------------- ### GET /recipes/{id}/priceBreakdownWidget.json Source: https://spoonacular.com/food-api/docs Get a recipe's price breakdown data. ```APIDOC ## GET /recipes/{id}/priceBreakdownWidget.json ### Description Get a recipe's price breakdown data. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/priceBreakdownWidget.json ### Parameters #### Path Parameters - **id** (number) - Required - The recipe id. ### Response #### Success Response (200) - **priceBreakdown** (object) - Contains price breakdown information for the recipe. - **ingredients** (array) - List of ingredients with their price details. - **totalCost** (number) - The total cost of the recipe. - **totalCostPerServing** (number) - The total cost per serving of the recipe. #### Response Example ```json { "ingredients": [ { "amount": 1, "unit": "", "name": "chicken breast", "id": 506, "estimatedCost": 1.50 } ], "totalCost": 1.50, "totalCostPerServing": 0.75 } ``` ``` -------------------------------- ### Equipment by ID Image Source: https://spoonacular.com/food-api/docs Visualize a recipe's equipment list as a PNG image. ```APIDOC ## GET /recipes/{id}/equipmentWidget.png ### Description Visualizes a recipe's equipment list as a PNG image. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/equipmentWidget.png ### Parameters #### Path Parameters - **id** (number) - Required - The ID of the recipe. ### Request Example ``` GET https://api.spoonacular.com/recipes/44860/equipmentWidget.png ``` ### Response #### Success Response (200) - **Content-Type**: image/png - The response body will be a PNG image representing the equipment widget. #### Response Example ```png ``` #### Quotas This endpoint requires 3 points. ``` -------------------------------- ### GET /recipes/{id}/nutritionLabel Source: https://spoonacular.com/food-api/docs Get a recipe's nutrition label as an HTML widget. ```APIDOC ## GET /recipes/{id}/nutritionLabel ### Description Get a recipe's nutrition label as an HTML widget. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/nutritionLabel ### Parameters #### Path Parameters - **`id`** (number) - Required - The recipe id. ### Response #### Success Response (200) - **Content-Type**: text/html #### Response Example ```html ``` ``` -------------------------------- ### GET /recipes/{id}/ingredientWidget.json Source: https://spoonacular.com/food-api/docs Get a recipe's ingredient list using its ID. ```APIDOC ## GET /recipes/{id}/ingredientWidget.json ### Description Get a recipe's ingredient list using its ID. ### Method GET ### Endpoint https://api.spoonacular.com/recipes/{id}/ingredientWidget.json ### Parameters #### Path Parameters - **`id`** (number) - Required - The recipe id. ### Response #### Success Response (200) - **`Content-Type`** (string) - `application/json` (Note: The specific structure of the ingredient list response body is not provided in the input text.) ``` -------------------------------- ### Get Ingredient Information Source: https://spoonacular.com/food-api/docs Use an ingredient id to get all available information about an ingredient, such as its image and supermarket aisle. ```APIDOC ## GET /food/ingredients/{id}/information ### Description Use an ingredient id to get all available information about an ingredient, such as its image and supermarket aisle. ### Method GET ### Endpoint https://api.spoonacular.com/food/ingredients/{id}/information ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the ingredient. ### Response #### Success Response (200) - **name** (string) - The name of the ingredient. - **localizedName** (string) - The localized name of the ingredient. - **image** (string) - The URL of the ingredient's image. - **supermarket aisle** (string) - The supermarket aisle where the ingredient can be found. #### Response Example ```json { "id": 1, "name": "apple", "localizedName": "apple", "image": "apple.jpg", "supermarket aisle": "Produce" } ``` ``` -------------------------------- ### Get Recipe Summary API Request (GET) Source: https://spoonacular.com/food-api/docs This snippet illustrates a GET request to retrieve a summary for a specific recipe using its ID. The endpoint requires the recipe ID as a path parameter. The response is a JSON object containing the recipe's summary and title. ```http GET https://api.spoonacular.com/recipes/{id}/summary ``` -------------------------------- ### Map Ingredients to Grocery Products (POST) Source: https://spoonacular.com/food-api/docs Maps a list of ingredients to products available in grocery stores. Accepts a JSON object containing an 'ingredients' array and an optional 'servings' number. Returns a list of ingredients, each with associated products. Each mapped ingredient consumes 1 point from your quota. ```JSON { "ingredients": ["eggs","bacon"], "servings": 2 } ``` ```JSON [ { "original": "eggs", "originalName": "eggs", "ingredientImage": "egg.png", "meta": [ "egg" ], "products": [ { "id": 209945, "title": "Crystal Farms Eggs - Fresh Accents Peeled Hard Cooked 2 ct Packs", "upc": "075925889498" }, { "id": 214723, "title": "Organic Valley Eggs - Organic Medium Brown", "upc": "093966811100" }, { "id": 183228, "title": "Eggland's Best Grade A Eggs Jumbo - 12 CT", "upc": "715141328615" } ] }, { "ingredientImage": "raw-bacon.png", "meta": [ "bacon" ], "original": "bacon", "originalName": "bacon", "products": [ { "id": 159164, "title": "Wright Bacon - Naturally Hickory Smoked", "upc": "079621461552" }, { "id": 87924, "title": "Sugardale Bacon", "upc": "073890006025" }, { "id": 213315, "title": "John Morrell Bacon - Applewood Smoked", "upc": "070100060877" }, { "id": 94585, "title": "Hormel Black Label Bacon Thick Cut", "upc": "037600153041" } ] } ] ``` -------------------------------- ### GET /food/wine/description Source: https://spoonacular.com/food-api/docs Get a simple description of a certain wine. This endpoint takes the name of a wine as input and returns a brief description. ```APIDOC ## GET /food/wine/description ### Description Get a simple description of a certain wine, e.g. "malbec", "riesling", or "merlot". ### Method GET ### Endpoint https://api.spoonacular.com/food/wine/description ### Parameters #### Query Parameters - **wine** (string) - Required - The name of the wine that should be paired, e.g. "merlot", "riesling", or "malbec". ### Request Example ```json { "wine": "merlot" } ``` ### Response #### Success Response (200) - **wineDescription** (string) - A description of the wine. #### Response Example ```json { "wineDescription": "Merlot is a dry red wine which is smooth and medium bodied." } ``` ``` -------------------------------- ### GET /food/wine/recommendation Source: https://spoonacular.com/food-api/docs Get a specific wine recommendation for a given wine type. This endpoint allows filtering by maximum price, minimum rating, and the number of recommendations. ```APIDOC ## GET /food/wine/recommendation ### Description Get a specific wine recommendation (concrete product) for a given wine type, e.g. "merlot". ### Method GET ### Endpoint https://api.spoonacular.com/food/wine/recommendation ### Parameters #### Query Parameters - **wine** (string) - Required - The type of wine to get a specific product recommendation for. - **maxPrice** (number) - Optional - The maximum price for the specific wine recommendation in USD. - **minRating** (number) - Optional - The minimum rating of the recommended wine between 0 and 1. For example, 0.8 equals 4 out of 5 stars. - **number** (integer) - Optional - The number of wine recommendations expected (between 1 and 100). ### Request Example ```json { "wine": "merlot", "number": 2 } ``` ### Response #### Success Response (200) - **recommendedWines** (array of objects) - A list of recommended wines. - **id** (integer) - The product ID. - **title** (string) - The product title. - **averageRating** (number) - The average rating of the product. - **description** (string) - The product description. - **imageUrl** (string) - The URL of the product image. - **link** (string) - The URL to the product. - **price** (string) - The price of the product. - **ratingCount** (number) - The number of ratings for the product. - **score** (number) - The score of the product match. - **totalFound** (integer) - The total number of wines found matching the criteria. #### Response Example ```json { "recommendedWines": [ { "id": 447938, "title": "Rombauer Merlot", "averageRating": 0.96, "description": "Enticing and lively red color; beautifully aromatic with black cherry and ripe plum. On the palate a purity of blackcurrant, cedar and mint flavors blend together seamlessly. Soft and supple, this wine has a medium-bodied mouth-feel with plush tannins that integrate with the generous finish.Our favorite pairings for this wine include chicken parmesan, cedar-planked salmon over wild rice, and mushroom pizza.", "imageUrl": "https://img.spoonacular.com/products/447938-312x231.jpg", "link": "https://click.linksynergy.com/deeplink?id=*QCiIS6t4gA&mid=2025&murl=https%3A%2F%2Fwww.wine.com%2Fproduct%2Frombauer-merlot-2008%2F116883", "price": "$25.59", "ratingCount": 5.0, "score": 0.8975 }, { "id": 430475, "title": "NV The Big Kahuna Merlot", "averageRating": 0.9, "description": "A ripe and rounded Merlot with notes of plum, blackberry, and hint of spice.", "imageUrl": "https://img.spoonacular.com/products/430475-312x231.jpg", "link": "https://www.amazon.com/Big-Kahuna-Merlot-Red-Wine/dp/B01F5XPTUW?tag=spoonacular-20", "price": "$6.99", "ratingCount": 4.0, "score": 0.823076923076923 } ], "totalFound": 21 } ``` ```