---
title: "Search USDA and Open Food Facts with provider status"
method: GET
path: "/v1/foods/search"
tags: ["foods"]
---

# Search USDA and Open Food Facts with provider status

`GET /v1/foods/search`

## Request

- Base URL: `http://localhost:4318`
- URL: `http://localhost:4318/v1/foods/search`
- Auth: HTTP bearer

## Query parameters

- `q` string, required
- `remote` boolean

## Response `200`

Success

- object
  - `query` string
  - `foods` Food[]
    - `emoji` string
    - `categories` string[]
    - `servings` object[]
      - `label` string
      - `grams` number
    - `dataset` string
    - `publishedAt` string
    - `preparation` string
    - `id` string
    - `name` string
    - `brand` string, nullable
    - `nutrients` object
      - `calories` number
      - `protein` number
      - `carbs` number
      - `fat` number
    - `source` string
    - `source_url` string, uri
  - `online` object
    - `status` 'not_requested' | 'ok' | 'cached' | 'cooldown' | 'unavailable'
    - `message` string
    - `retryAfterSeconds` number
    - `excluded` number

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid bearer token
- `409`: Revision or idempotency conflict
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/nibb/apis/nibb-api.md) · [All operations](https://skmtc.dev/nibb/apis/nibb-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nibb/apis/nibb-api/revisions/75bcd8b761ed?raw)
