Recipe - Food - Nutrition

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

9.9 / 10

Latency

488ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Get list of all possible amount and unitLong values

Rapid account: Juji 555
juji555
8 years ago

I want to compare extendedIngredient amounts between ingredients in different recipes that may or may not be listed using the same unitLong. So, on my end I will do some math to convert two things listed in teaspoons and tablespoons, for example, to both be teaspoons, so I can properly compare the amounts using the same unit of measure. However, first I need a list of all possible amounts and unitLongs to know what I am working with.

I think amount will be easier so I’ll start there. Is the amount format always numerical decimal format, no matter how it was listed in the originalString? Meaning, is it always “1” instead of “one” or “.5” instead of “one half”?

Then for unitLong, what are all the possible choices? There are obvious ones like teaspoon, tablespoon, cup, etc. but I need a complete list to be able to set up the conversions for each one.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

Yes, amount will always be a decimal number like 1 instead of one or 1.5 instead of “1 1/2”.

About conversion: We use some rather advanced conversions for ingredients depending on densities etc. So one cup of butter is not the same grams as one cup of flour for example. If you want to do something on your end, this is a list of currently used long unit names - the list might change:`

ounces

grams

milliliters

pints

pounds

cups

liters

teaspoons

package

tablespoons

Join in the discussion - add comment below:

Login / Signup to post new comments