search

Search Foods

Search foods with advanced multi-word matching and ranking.

Features:

  • Multi-word query support with word-order independence
  • Intelligent ranking: exact phrase > all words > most words > any word
  • Returns complete nutrition data (nutrients array, per-100g values, meal object)
  • Brand, category, and nutrient/macro filters
  • Empty query returns common/popular foods

Results are intelligently ranked:

  1. Exact phrase at start (e.g., "chicken breast" matches "Chicken breast, raw")
  2. Exact phrase anywhere (e.g., "... chicken breast ...")
  3. All words present (any order) OR most words (N-1 for N-word query)
  4. First word OR any word present
get/api/v1/search/foods

Request

  • Base URL: https://calorieapiadmin.com
  • URL: https://calorieapiadmin.com/api/v1/search/foods
  • Auth: none declared

Query parameters

qstring

Search query (empty for common foods)

limitinteger
kinteger nullable

Alias for limit

skipinteger
brandstring nullable

Filter by brand name

brand_idinteger nullable

Filter by brand ID

categorystring nullable

Filter by category name

category_idinteger nullable

Filter by category ID

nutrient_idinteger nullable

Require this nutrient

min_amountnumber nullable

Min amount for nutrient_id

max_amountnumber nullable

Max amount for nutrient_id

min_caloriesnumber nullable
max_caloriesnumber nullable
min_proteinnumber nullable
max_proteinnumber nullable
min_carbsnumber nullable
max_carbsnumber nullable
min_fatnumber nullable
max_fatnumber nullable
match_modestring

any or all word matching

verified_onlyboolean

Only verified foods

Headers

X-API-Keystring nullable
authorizationstring nullable

Response

Successful Response

totalinteger required
skipinteger required
limitinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.