c
ChowAPI
GET/v1/search

Search

Fuzzy, typo-tolerant food search across 784K+ foods. Relevance-ranked with quality weighting.

Parameters

ParameterTypeRequiredDescription
qstringRequiredSearch query (min 2 chars). Supports fuzzy matching.
limitintegerOptionalResults per page (1-100, default 20)
offsetintegerOptionalPagination 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

FieldTypeDescription
nutrientsobjectNutrient values per 100g. Keys: calories, protein, carbs, fat, etc. No unit suffixes.
nutrients_per_servingobjectPre-computed nutrient values per serving. Empty if no serving data.
nutrient_basisstringper_100g or per_serving
barcodesstring[]All known barcodes for this food
servingsarrayAll available serving sizes
allergensstring[]Known allergens (e.g. gluten, dairy, tree_nuts)
dietary_flagsstring[]Dietary flags (e.g. vegan, gluten_free)
hasMorebooleanWhether more results exist beyond the current page
cachedbooleanWhether the result was served from cache
query_msnumberServer-side query time in milliseconds

Source types

The source field indicates the data origin:

ValueDescription
verifiedUSDA Foundation Foods — lab-analyzed whole foods
brandedUSDA Branded Foods — manufacturer-reported packaged foods
restaurant_chainRestaurant chain nutrition data (e.g. McDonald's, Chipotle)
restaurant_menuIndividual restaurant menu items
community_contributedCommunity-contributed food data

Relevance scoring

Results are ranked by a composite relevance score:

Match TypeScore
Exact name match100
Name starts with query80
Brand match70
Trigram similaritysimilarity 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:

InputBehavior
limit=0 or non-numericDefaults to 20
limit=-1Clamped to 1
limit=200Clamped to 100
offset=-5Clamped to 0
offset=201Returns 400 error

Errors

CodeStatusDescription
search/query_required400Missing q parameter
search/query_too_short400Query less than 2 characters
search/offset_too_large400Offset exceeds 200