

Cooking ingredient densities: grams per US cup, tablespoon, teaspoon and mL.
ExactCup API is a free Food & Drink API that requires no API key, is served over HTTPS and supports CORS, so it can be called from the browser.
Free JSON API for ingredient densities: grams per US cup, tablespoon, teaspoon and mL for 80+ cooking ingredients. No API key, no sign-up, CORS enabled, CC BY 4.0.
Details from exactcup.github.io.

Unified API suite · now live
Geocode an address, validate an email, track a flight or pull stock data with one account, one dashboard and one API key.
Dietary fiber per serving and per 100 g, split into soluble and insoluble, for ~200 common foods
The ExactCup API is provided by ExactCup (exactcup.github.io). Free JSON API for ingredient densities: grams per US cup, tablespoon, teaspoon and mL for 80+ cooking ingredients. No API key, no sign-up, CORS enabled, CC BY 4.0.
Yes. The ExactCup API is listed in the Food & Drink category of the public-apis directory, which only includes APIs that are free or have a free tier. Check its documentation for rate limits and paid plans.
No. The ExactCup API requires no authentication, so you can start making requests without signing up.
Yes. The ExactCup API supports CORS, so front-end JavaScript can call it directly.
Yes. The ExactCup API is served over HTTPS, so it's safe to use in production.