Open ingredient density dataset
Grams per cup for 139 ingredients, as JSON and CSV, free to use
Every gram-per-cup figure behind this site, as two files you can download and use however you like: 139 ingredients across 13 categories, in JSON and CSV. No key, no sign-up, no rate limit — they are static files.
Download
- /api/ingredients.json — the full dataset with metadata, cup standards and every row.
- /api/ingredients.csv — the same rows, ready for Excel, Numbers or Google Sheets.
- /api/spices.json — 5 spices and herbs by the teaspoon, with per-row provenance.
What is in each row
| Field | Meaning |
|---|---|
| id | Stable identifier, and the slug of that ingredient's page on this site. |
| name | Display name. |
| category | Ingredient group, e.g. Flours, Fats and Oils. |
| gramsPerUsCup | Grams in one US customary cup of 236.5882365 ml. |
| gramsPerMetricCup | Grams in one 250 ml metric cup — UK, Australia, New Zealand, Canada. |
| gramsPerImperialCup | Grams in one 284.130625 ml imperial cup — older British recipes. |
| gramsPerTablespoon | US tablespoon, one sixteenth of a US cup. |
| gramsPerTeaspoon | US teaspoon, one forty-eighth of a US cup. |
| gramsPerMillilitre | Bulk density in g/ml, for converting to any volume unit at all. |
| url | The page on this site for that ingredient. |
How the numbers were made
Every figure is grams in one US cup, spooned and levelled — the ingredient is spooned into a dry measuring cup and swept flat, never scooped through the bag or pressed down, except where the name says packed. The metric and imperial figures are derived from the US figure by volume ratio, because the density of an ingredient does not change with the size of the cup.
Licence
CC0 1.0 Universal — public domain. Use it commercially, change it, republish it, build a product on it. No permission needed and no conditions attached. If you would like to credit it anyway: ingredient density data from gramstocupconverter.com.
Frequently asked questions
Can I use this data in a commercial product?
Yes. The dataset is released under CC0 1.0, which places it in the public domain. You can use it commercially, modify it and redistribute it without asking. A link back is appreciated but not required.
Is there a live API endpoint?
No, and deliberately so. These are two static files served from a CDN, which means no rate limits, no keys, no downtime and nothing to sign up for. Fetch ingredients.json once and cache it; it is a small file and it changes rarely.
Where do the densities come from?
They are exactly the figures this site's own converters use — the file is generated from that table at build time, so the download can never disagree with what the pages say. They assume the spooned-and-levelled method unless the name itself says packed.
How accurate is a density table?
Within a few percent for dry goods, and better than that for liquids. Flour is the least consistent: how you fill the cup changes the weight more than which flour you use. That is exactly why a recipe that gives grams is easier to repeat than one that gives cups.
How often does the data change?
Rarely. The file carries a version and an updated date so you can tell. It is currently version 1.0, updated September 2026.
Does the dataset include spices?
Spices are in a separate file, /api/spices.json, because they are measured by the teaspoon rather than the cup and carry their own provenance. It currently holds 5 entries, each with a verified flag saying whether the figure has been read back from USDA FoodData Central directly.