Search own food history + favourites, falling back to the FatSecret/AI catalog when needed
Trigram-similarity search over the user's own logged food_logs history and favorite meals, grouped by source and capped at 5 each — always available, no AI, no subscription/quota gate. Omitting sources runs all three legs (history, favourites, catalog) — the intended default. The catalog leg (AI/FatSecret pipeline) being enabled does NOT mean it runs: it only actually executes when history/favourites did NOT already return a confident match (a strong history similarity score, or any favourite hit) OR the query names a specific measured amount (e.g. "200g chicken", "12 oz steak") that a local logged row can't answer precisely; otherwise it is skipped for free and fatsecretCatalogSkipped: true is returned instead. When it does run, it is manually quota-checked and degrades to fatsecretCatalog: null, fatsecretCatalogError: "rate_limited" | "forbidden" | "unavailable" instead of failing the whole request when the user has no AI access left. Pass an explicit sources subset omitting "catalog" (e.g. sources=history,favourites) only to hard-guarantee zero AI quota spend for a call.
Request
- Base URLhttps://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
- URLhttps://api.rewritelifestyle.ai/api/food-log/quick-add-search
- AuthHTTP bearer
Query parameters
Trigram-similarity match against the user's own logged food history and favourites.
Comma-separated: history, favourites, catalog. Omitted = all three (the default). Enabling catalog does not force it to run — see the endpoint description.
IANA timezone, used only by the catalog leg (region resolution) when requested.
Headers
Response
Example response
{
"success": true,
"query": "chicken",
"history": [
{
"id": 4821,
"name": "Chicken Breast, Grilled",
"calories": 140,
"protein": 26,
"carbs": 0,
"fat": 3,
"serving_size": "3 oz",
"food_id": "9876",
"serving_id": "57972",
"quantity": 1,
"unit": "each",
"last_logged_at": "2026-07-30"
}
],
"favourites": [],
"fatsecretCatalogSkipped": true
}Changes
No recorded changes to this operation across all 34 revisions of this API.