---
search:
  tags:
    - Foods
    - GET
seo:
  description: >-
    Finds a food to use in a plan or recipe: the account's own foods and the
    food databases it uses… Reference for the GET /foods endpoint in the
    Almendra API.
sidebar:
  label: Search foods
  badge: GET
title: Search foods
type: openapi-operation
---
Finds a food to use in a plan or recipe: the account's own foods and the food databases it uses (Settings > Food databases), best 5 matches only, with no further pages. Each account can search 50 times a day (429 past that). The foods a search returns can be read and used by the account for 30 days. Values are per 100 g.

Requires the `library:read` permission.

`GET /foods`

**Responses**

- `200` — Best matches
- `400` — Invalid path parameter, query parameter or request body
- `401` — Missing or invalid API key
- `403` — The account behind the API key has no active paid plan, or the key lacks the permission this operation needs
- `429` — Rate limit exceeded (600 requests per 60 seconds); retry after \`Retry-After\` seconds
- `500` — Unexpected server error

Response example, 200:

```json
{
  "foods": [
    {
      "_id": "string",
      "name": "Pechuga de pollo, cocida",
      "type": "food",
      "source": "CENAN (2017)",
      "category": "string",
      "createdByThisAccount": true,
      "caloriesKcal": 165,
      "proteinG": 31,
      "carbsG": 0,
      "fatG": 3.6,
      "nutrients": {
        "fiber_g": 0,
        "sodium_mg": 74,
        "iron_mg": 1
      },
      "measures": [
        {
          "amount": 1,
          "description": "taza",
          "grams": 240
        }
      ]
    }
  ]
}
```
