The Spoonacular Price Estimator calculates a recipe's cost per serving, making it easy to search for affordable recipes. The widget also provides a visual price breakdown that shows the cost of each individual ingredient. With this feature, you can quickly see which ingredients make a recipe expensive so you can swap out the priciest ingredients or make sure to buy them when they are on sale. Eat well for less!
Here you can visually play with that endpoint. The full documentation of the endpoint is here https://market.mashape.com/spoonacular/recipe-food-nutrition#visualize-price-breakdown.
Create a visually-appealing price estimate for your recipe. The chart calculates the prices for one serving (based on the number of servings you say the recipe makes).
You can either show the full widget (chart + table) or pick the compact view where your reader can switch between the chart and the table.