Food search

Use food search to find items by name (e.g., “banana”, “chicken breast”, “oatmeal”).

Endpoint

GET /foods/search?q=QUERY

Example

curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.macrofy.com/foods/search?q=banana"

Response (example)

[
  {
    "id": "food_123",
    "name": "Banana",
    "brand": null,
    "serving": { "amount": 118, "unit": "g" },
    "macros": { "calories": 105, "protein": 1.3, "carbs": 27, "fat": 0.4 }
  }
]

Was this page helpful?