GET /foods/search
Summary: Search foods
Operation ID: searchFoods
Auth: unknown
Operation ID: searchFoods
Auth: unknown
Description
Returns a list of foods that match the search query keywords. Supports filtering by data type and pagination.
Parameters (8)
api_key
(string, query, required)
Your API key. Use DEMO_KEY for testing.
dataType
(array, query, optional)
Filter by data type (Branded, SR Legacy, Survey (FNDDS), Foundation)
pageNumber
(integer, query, optional, default: 1)
Page number to retrieve
pageSize
(integer, query, optional, default: 50)
Number of results per page (1-200)
Constraints: {'minimum': 1, 'maximum': 200}
query
(string, query, required)
Search keywords to match against food names and descriptions
requireAllWords
(boolean, query, optional, default: False)
When true, requires all words in query to be present in result
sortBy
(string, query, optional)
Sort results by dataType.keyword or score
Constraints: {'enum': ['dataType.keyword', 'score']}
sortOrder
(string, query, optional)
Sort order (asc or desc)
Constraints: {'enum': ['asc', 'desc']}
Examples (3)
| Title | Type | URL | Action |
|---|---|---|---|
| Basic food search | curl |
https://api.nal.usda.gov/fdc/foods/search?api_key=DEMO_KEY&query=apple |
|
| Search with data type filter and pagination | curl |
https://api.nal.usda.gov/fdc/foods/search?api_key=DEMO_KEY&query=chicken%20breast&dataType=Branded&pageNumber=1&pageSize=25 |
|
| Search with sorting and exact word matching | curl |
https://api.nal.usda.gov/fdc/foods/search?api_key=DEMO_KEY&query=organic%20milk&requireAllWords=true&sortBy=score&sortOrder=desc |
Probe History
Status Codes
| Time | Status | Latency | Size |
|---|---|---|---|
| 2026-03-23 10:48:56.553469 | 404 | 1286ms | |
| 2026-03-23 10:29:26.098601 | 404 | 1360ms | |
| 2026-03-23 09:21:10.344833 | 404 | 1485ms |
Response Changes
| When | Old | New |
|---|---|---|
| 2026-03-23 10:29:26.098601 | 4edae2c53be5 |
85ae33a26d18 |
| 2026-03-23 10:48:56.553469 | 85ae33a26d18 |
f0c44496bc72 |