Returns a list of foods that matched search (query) keywords
Search for foods using keywords. Results can be filtered by dataType and there are options for result page sizes or sorting.
Request
- Base URL: https://api.nal.usda.gov/fdc
- URL: https://api.nal.usda.gov/fdc/v1/foods/search
- Auth: API key in query parameter api_key
Query parameters
One or more search terms. The string may include search operators
Optional. Filter on a specific data type; specify one or more values in an array.
Optional. Maximum number of results to return for the current page. Default is 50.
Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
Optional. The sort direction for the results. Only applicable if sortBy is specified.
Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods
Response
List of foods that matched search terms
Example response
[
{
"totalHits": 1034,
"foods": [
{
"fdcId": 45001529,
"dataType": "Branded",
"description": "BROCCOLI",
"foodNutrients": [
{
"number": 303,
"name": "Iron, Fe",
"amount": 0.53,
"unitName": "mg",
"derivationCode": "LCCD",
"derivationDescription": "Calculated from a daily value percentage per serving size measure"
}
],
"publicationDate": "4/1/2019",
"brandOwner": "Supervalu, Inc.",
"gtinUpc": "041303020937",
"additionalDescriptions": "Coon; sharp cheese; Tillamook; Hoop; Pioneer; New York; Wisconsin; Longhorn"
}
]
}
]Changes
No recorded changes to this operation across all 1 revision of this API.