Search foods or retrieve one sample record
Provide either q for a case-insensitive name search or id for an exact public_id lookup.
get/api/foods
Request
- Base URL: https://www.nutrientsdb.com
- URL: https://www.nutrientsdb.com/api/foods
- Auth: none declared
Query parameters
qstring
Food name fragment. Minimum 2 characters.
idinteger
Exact NutrientsDB public_id from the sample.
limitinteger
Maximum search results. Values above 20 are capped at 20.
Response
A search result or exact food record.
Example response
{
"sample": {
"food_count": 1000,
"nutrient_count": 86
},
"foods": [
{
"public_id": 2923506,
"name": "Turkey, drumstick, meat only, raw"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.