Search Ingredients
Runs an ingredient search on the server and returns matching ingredients — the caller organization's custom ingredients AND the requested market's standard reference ingredients, in one list where every custom-ingredient match ranks above every standard match. Pass q: "*" to browse (match everything visible for the market) instead of running a text search. Pass queries instead of q to search multiple terms in one call — each is ranked independently and results are returned as result_groups, one per input query.
application/json- body
Search query spanning the caller's custom ingredients and the market's standard reference ingredients.
Pass either q (single query) or queries (batch, 1-20 queries) —
never both, never neither.
q?|Search query text, matched against ingredient name. Pass "*" to match all ingredients visible to the caller for the requested market (browse mode) instead of running a text search. Mutually exclusive with queries.
queries?array<>|Multiple queries to search in one call, each independently ranked. Mutually exclusive with q.
market*"US"The market to search — selects the standard reference collection and restricts custom ingredients to those approved for this market.
"US"page?Page1-indexed page of results to return. Ignored in batch mode (queries).
1 <= value1per_page?|Override the number of results returned per page (or per query, in batch mode). Omit to use the server-configured default.
Successful Response
application/json- response
Paginated, tier-ranked ingredient search results.
Single-query requests (q) populate results/total_found/page.
Batch requests (queries) populate result_groups instead, one entry
per input query, in the same order. The two shapes are mutually
exclusive, mirroring the request.
results?array<>|Matching ingredients for this page — every custom-ingredient match first (ranked by usage), then every standard match (ranked by relevance). Present for single-query (q) requests.
total_found?|A lower bound on matching ingredients, not an exact total: the custom-ingredient count is exact, but the standard reference count reflects only what this page returned, not the full corpus. Don't use it as a precise pagination total. Present for single-query (q) requests.
page?|The 1-indexed page number returned. Present for single-query (q) requests.
result_groups?array<>|One result group per input query, in request order. Present for batch (queries) requests.
curl -X POST 'https://api.bettermenu.live/studio/ingredients/search' \ -H 'Content-Type: application/json' \ -d '{ "market": "US"}'{ "results": [ { "id": "string", "name": "string", "kind": "string", "market": "string", "used_in_recipes": 0, "source": "string", "score": 0 } ], "total_found": 0, "page": 0, "result_groups": [ { "position": 0, "query": "string", "results": [ { "id": "string", "name": "string", "kind": "string", "market": "string", "used_in_recipes": 0, "source": "string", "score": 0 } ], "total_found": 0 } ]}