GET
/v1/searchSearch
Fuzzy, typo-tolerant food search across 784K+ foods. Relevance-ranked with quality weighting.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Required | Search query (min 2 chars). Supports fuzzy matching. |
limit | integer | Optional | Results per page (1-100, default 20) |
offset | integer | Optional | Pagination offset (0-200, default 0) |
Request
curl "https://api.chowapi.dev/v1/search?q=quaker+oatmeal&limit=5" \
-H "Authorization: Bearer chow_live_YOUR_KEY"Response
200 OK
{
"results": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Chocolate Instant Oatmeal",
"brand": null,
"barcode": "0030000575512",
"barcodes": ["0030000575512"],
"source": "branded",
"category": "Grains & Cereals",
"data_quality": 0.44,
"nutrient_basis": "per_100g",
"is_verified": false,
"nutrients": {
"calories": 371,
"protein": 11.43,
"carbs": 71.43,
"fat": 10,
"fiber": 8.6,
"sugar": 20,
"sodium": 429
},
"nutrients_per_serving": {},
"serving": {
"amount": 100,
"unit": "g",
"description": "100 grams",
"gram_weight": 100
},
"servings": [
{ "amount": 100, "unit": "g", "description": "100 grams", "gram_weight": 100 }
],
"image_url": null,
"allergens": ["dairy", "soy"],
"dietary_flags": []
}
],
"hasMore": true,
"limit": 5,
"offset": 0,
"cached": false,
"query_ms": 18
}Response fields
| Field | Type | Description |
|---|---|---|
nutrients | object | Nutrient values per 100g. Keys: calories, protein, carbs, fat, etc. No unit suffixes. |
nutrients_per_serving | object | Pre-computed nutrient values per serving. Empty if no serving data. |
nutrient_basis | string | per_100g or per_serving |
barcodes | string[] | All known barcodes for this food |
servings | array | All available serving sizes |
allergens | string[] | Known allergens (e.g. gluten, dairy, tree_nuts) |
dietary_flags | string[] | Dietary flags (e.g. vegan, gluten_free) |
hasMore | boolean | Whether more results exist beyond the current page |
cached | boolean | Whether the result was served from cache |
query_ms | number | Server-side query time in milliseconds |
Source types
The source field indicates the data origin:
| Value | Description |
|---|---|
verified | USDA Foundation Foods — lab-analyzed whole foods |
branded | USDA Branded Foods — manufacturer-reported packaged foods |
restaurant_chain | Restaurant chain nutrition data (e.g. McDonald's, Chipotle) |
restaurant_menu | Individual restaurant menu items |
community_contributed | Community-contributed food data |
Relevance scoring
Results are ranked by a composite relevance score:
| Match Type | Score |
|---|---|
| Exact name match | 100 |
| Name starts with query | 80 |
| Brand match | 70 |
| Trigram similarity | similarity x 60 |
Results with equal relevance are sorted by data_quality (descending).
Parameter behavior
Invalid or out-of-range parameter values are silently clamped rather than rejected:
| Input | Behavior |
|---|---|
limit=0 or non-numeric | Defaults to 20 |
limit=-1 | Clamped to 1 |
limit=200 | Clamped to 100 |
offset=-5 | Clamped to 0 |
offset=201 | Returns 400 error |
Errors
| Code | Status | Description |
|---|---|---|
search/query_required | 400 | Missing q parameter |
search/query_too_short | 400 | Query less than 2 characters |
search/offset_too_large | 400 | Offset exceeds 200 |