Convert Amounts

GET {{baseUrl}}/recipes/convert?ingredientName=flour&sourceAmount=2.5&sourceUnit=cups&targetUnit=grams

Convert amounts like 2 cups of flour to grams.

Request Params

KeyDatatypeRequiredDescription
ingredientNamestring(Required) The ingredient which you want to convert.
sourceAmountstring(Required) The amount from which you want to convert, e.g. the 2.5 in "2.5 cups of flour to grams".
sourceUnitstring(Required) The unit from which you want to convert, e.g. the grams in "2.5 cups of flour to grams". You can also use "piece", e.g. "3.4 oz tomatoes to piece"
targetUnitstring(Required) The unit to which you want to convert, e.g. the grams in "2.5 cups of flour to grams". You can also use "piece", e.g. "3.4 oz tomatoes to piece"

RESPONSES

status: OK

{"sourceAmount":2.5,"sourceUnit":"cups","targetAmount":312.5,"targetUnit":"grams","answer":"2.5 cups flour translates to 312.5 grams."}