Food Log

Personalized food-name autocomplete — driven by user + community search history

Substring-matches (LIKE '%term%') against the user's own prior logged selections first (personal tier), then the community-wide top selections from the last 30 days (global tier). Prefix matches rank above non-prefix substring matches. Zero LLM calls. Returns an empty array for queries under 2 characters.

get/api/food-log/autocomplete

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/food-log/autocomplete
  • Auth
    HTTP bearer

Query parameters

qstring required
Example:chicken

Substring to match (≥2 chars)

limitnumber
Example:8

Max suggestions (1–20, default 8)

Response

unknown required

Example response

{
  "success": true,
  "query": "chob",
  "suggestions": [
    {
      "name": "Chobani Greek Yogurt 2% Plain",
      "source": "personal",
      "pickCount": 12
    },
    {
      "name": "Chobani 0% Plain Greek Yogurt",
      "source": "global",
      "pickCount": 47
    },
    {
      "name": "Chobani Vanilla Greek Yogurt",
      "source": "global",
      "pickCount": 22
    }
  ]
}

Changes

No recorded changes to this operation across all 34 revisions of this API.