---
title: "Search foods (local food_items + configured provider, e.g. FatSecret)"
method: GET
path: "/api/meals/foods/search"
tags: ["Meals"]
---

# Search foods (local food_items + configured provider, e.g. FatSecret)

`GET /api/meals/foods/search`

## Request

- Base URL: `https://api.hiyd.ai`
- URL: `https://api.hiyd.ai/api/meals/foods/search`
- Auth: HTTP bearer

Returns unified lightweight search hits. Local (cached/custom) foods come first with a uuid `id`; provider hits have `id: null` and must be imported via POST /api/meals/foods/import before logging. Provider outages never fail the request; local results are returned with `provider_error: true`.

## Query parameters

- `q` string
- `page` number
- `pageSize` number
- `category` 'breakfast' | 'lunch' | 'dinner' | 'snack' | 'beverage'
- `food_type` string

## Response `200`

Unified food search hits

- object
  - `success` boolean
  - `foods` object[]
    - `id` string, uuid, nullable
    - `external_source` string, nullable
    - `external_id` string, nullable
    - `name` string
    - `brand` string, nullable
    - `calories` number, nullable
    - `basis_description` string, nullable
  - `count` number
  - `page` number
  - `pageSize` number
  - `provider` string, nullable
  - `provider_error` boolean

---

[API](https://skmtc.dev/hiyd/apis/hiyd-backend-api.md) - [All operations](https://skmtc.dev/hiyd/apis/hiyd-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hiyd/apis/hiyd-backend-api/revisions/23598d347e1b?raw)
